From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B789F1F4B4 for ; Sat, 19 Sep 2020 13:13:08 +0000 (UTC) Received: from localhost ([::1]:60728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJcfr-0005xi-Hk for normalperson@yhbt.net; Sat, 19 Sep 2020 09:13:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJcfo-0005x6-F8; Sat, 19 Sep 2020 09:13:04 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.25]:26172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJcfl-0002QH-Ud; Sat, 19 Sep 2020 09:13:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1600521178; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=inGO4R10WRfA5SUwodgCFlbAEbYEyq+7AP8f9FWUtyw=; b=p0DGUmQ3SxVClDgk/lUbtf1D/O0blSqNd5etJ4xAun4BJ+pDBCr+rnXEYsMsdAIbll 74drnqAedToi+z3ZjheCEELwhXWHA8BefPlFVhTKTYNM5wlUyHmDzCXZbLHvODqyiHln sdtSWLQjYiwiuyPKkojJC6lcad0ivB6nhanw2iKbvh6bxNj0CCbaaBFQenTUNM8URp9Q mEE+bloknskaX/jgrhLmLWmJWs1coOVbyVYl7sMzxF5T1h2WATjVWWz7g6McqCkc0rtk nIJmpdsn/9m6k/5mXSD0EdEV/5WKJ3Wb88ye3qOtHfVahAkQi+8ESpAXTnjwieBdnemn z4zg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyPs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.10.7 DYNA|AUTH) with ESMTPSA id z05f0fw8JDCv70X (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 19 Sep 2020 15:12:57 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org, noloader@gmail.com Subject: Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30 Date: Sat, 19 Sep 2020 15:12:55 +0200 Message-ID: <4884197.be5NI9L3Sv@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.25; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 09:12:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: grep-devel@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Jeffrey Walton wrote in : > Hi Everyone, > > grep-3.4-almost.19-ff30 fails self test on Alpine Linux 3.10 with > BusyBox, triplet x86_64-pc-linux-gnu. > > ... > FAIL: test-hard-locale > FAIL: test-setlocale_null-mt-all > > Attached are config.log and test-suite.log. The cause of these two failures is the wrong triplet: $host_os is - on Alpine Linux 3.10: linux-gnu, - on Alpine Linux 3.9 and 3.12: linux-musl. The triplet comes from config.guess. The test there uses ldd ('ldd --version' in particular). But on Alpine Linux 3.10 /usr/bin/ldd has been replaced with a shell script that does not understand the --version option. This patch fixes it. Part of it can be removed once config.guess will have been corrected. 2020-09-19 Bruno Haible Fix recognition of musl libc on Alpine Linux 3.10. Reported by Jeffrey Walton in . * m4/musl.m4 (gl_MUSL_CANONICAL_HOST): New macro. (gl_MUSL_LIBC): Require it. * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise. * modules/setlocale-null (Files): Add m4/musl.m4. diff --git a/m4/musl.m4 b/m4/musl.m4 index 252054c..343c71a 100644 --- a/m4/musl.m4 +++ b/m4/musl.m4 @@ -1,4 +1,4 @@ -# musl.m4 serial 1 +# musl.m4 serial 2 dnl Copyright (C) 2019-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,10 +9,40 @@ dnl with or without modifications, as long as this notice is preserved. # . # From Bruno Haible. +# There are three ways to test for musl libc: +# a. Look at the 'ldd --version' output. This is how config.guess +# does it. But it fails on Alpine Linux 3.10, because on this system +# 'ldd' is a shell script that does not understand the '--version' +# option. +# b. Test whether the header file exists. +# c. Test whether the header file defines the macro +# __DEFINED_va_list. +# We use a+c. + AC_DEFUN_ONCE([gl_MUSL_LIBC], [ - AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_MUSL_CANONICAL_HOST]) case "$host_os" in *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;; esac ]) + +# Like AC_CANONICAL_HOST, except for a fix regarding Alpine Linux 3.10. + +AC_DEFUN([gl_MUSL_CANONICAL_HOST], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + linux*-gnu*) + AC_EGREP_CPP([actually_musl], + [#include + #ifdef __DEFINED_va_list + actually_musl + #endif + ], + [host=`echo "$host" | sed -e 's/gnu.*/musl/'` + host_os=`echo "$host_os" | sed -e 's/gnu.*/musl/'` + ]) + ;; + esac +]) diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4 index c1ee1f7..20c5c99 100644 --- a/m4/setlocale_null.m4 +++ b/m4/setlocale_null.m4 @@ -1,4 +1,4 @@ -# setlocale_null.m4 serial 2 +# setlocale_null.m4 serial 3 dnl Copyright (C) 2019-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SETLOCALE_NULL], [ - AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_MUSL_CANONICAL_HOST]) AC_REQUIRE([gl_PTHREADLIB]) AC_CHECK_HEADERS_ONCE([threads.h]) diff --git a/modules/setlocale-null b/modules/setlocale-null index 2774004..d8c57a2 100644 --- a/modules/setlocale-null +++ b/modules/setlocale-null @@ -7,6 +7,7 @@ lib/setlocale_null.c lib/setlocale-lock.c lib/windows-initguard.h m4/setlocale_null.m4 +m4/musl.m4 m4/threadlib.m4 m4/visibility.m4