mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30
       [not found]   ` <4884197.be5NI9L3Sv@omega>
@ 2020-09-19 14:12     ` Jeffrey Walton
  2020-09-19 21:00       ` Ariadne Conill
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey Walton @ 2020-09-19 14:12 UTC (permalink / raw)
  To: musl

Hi Everyone,

An FYI from testing a grep release candidate. The RC experienced 3
failures on Alpine Linux.

Bruno Haible tracked down the cause.

I usually update a package's config.guess and config.sub according to
https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html.
I may have contributed to the problem by using the latest config.guess
and config.sub.

I'm not sure if there is anything actionable for Musl or Alpine.

Jeff

On Sat, Sep 19, 2020 at 9:12 AM Bruno Haible <bruno@clisp.org> wrote:
>
> Jeffrey Walton wrote in
> <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00020.html>:
>
> > 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  <bruno@clisp.org>
>
>         Fix recognition of musl libc on Alpine Linux 3.10.
>         Reported by Jeffrey Walton <noloader@gmail.com> in
>         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00020.html>.
>         * 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.
>  # <https://lists.gnu.org/archive/html/bug-gnulib/2018-02/msg00079.html>.
>  # 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 <bits/alltypes.h> exists.
> +# c. Test whether the header file <stdarg.h> 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 <stdarg.h>
> +         #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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30
  2020-09-19 14:12     ` [musl] Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30 Jeffrey Walton
@ 2020-09-19 21:00       ` Ariadne Conill
  2020-09-19 21:05         ` Ariadne Conill
  0 siblings, 1 reply; 3+ messages in thread
From: Ariadne Conill @ 2020-09-19 21:00 UTC (permalink / raw)
  To: musl, Jeffrey Walton

Hello,

On 2020-09-19 08:12, Jeffrey Walton wrote:
> Hi Everyone,
> 
> An FYI from testing a grep release candidate. The RC experienced 3
> failures on Alpine Linux.
> 
> Bruno Haible tracked down the cause.
> 
> I usually update a package's config.guess and config.sub according to
> https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html.
> I may have contributed to the problem by using the latest config.guess
> and config.sub.
> 
> I'm not sure if there is anything actionable for Musl or Alpine.

This was curious, so I looked into it.

/usr/bin/ldd was changed to be a shell script in the Alpine musl 
1.1.22-r1 package.  This was done to improve the output of the ldd command.

The problem with this package is that shell script was:

exec /lib/ld-musl-$ARCH.so.1 --list -- "$@"

In Alpine musl 1.1.22-r3, the shell script was changed to:

exec /lib/ld-musl-$ARCH.so.1 --list "$@"

This allowed --version to work again as expected.

I don't think that GNU needs to have a workaround for this.  We can 
simply backport 1.1.22-r3 to Alpine 3.10 to resolve the bug.

Ariadne

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30
  2020-09-19 21:00       ` Ariadne Conill
@ 2020-09-19 21:05         ` Ariadne Conill
  0 siblings, 0 replies; 3+ messages in thread
From: Ariadne Conill @ 2020-09-19 21:05 UTC (permalink / raw)
  To: musl, Jeffrey Walton

Hello,

On 2020-09-19 15:00, Ariadne Conill wrote:
> Hello,
> 
> On 2020-09-19 08:12, Jeffrey Walton wrote:
>> Hi Everyone,
>>
>> An FYI from testing a grep release candidate. The RC experienced 3
>> failures on Alpine Linux.
>>
>> Bruno Haible tracked down the cause.
>>
>> I usually update a package's config.guess and config.sub according to
>> https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html. 
>>
>> I may have contributed to the problem by using the latest config.guess
>> and config.sub.
>>
>> I'm not sure if there is anything actionable for Musl or Alpine.
> 
> This was curious, so I looked into it.
> 
> /usr/bin/ldd was changed to be a shell script in the Alpine musl 
> 1.1.22-r1 package.  This was done to improve the output of the ldd command.
> 
> The problem with this package is that shell script was:
> 
> exec /lib/ld-musl-$ARCH.so.1 --list -- "$@"
> 
> In Alpine musl 1.1.22-r3, the shell script was changed to:
> 
> exec /lib/ld-musl-$ARCH.so.1 --list "$@"
> 
> This allowed --version to work again as expected.
> 
> I don't think that GNU needs to have a workaround for this.  We can 
> simply backport 1.1.22-r3 to Alpine 3.10 to resolve the bug.

While looking into doing a backport, I saw that Natanael Copa already 
backported this fix to 3.10 as musl 1.1.22-r2 package.  So if you are 
using latest 3.10.x release, you would already have this fix.

Ariadne

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-19 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m2imce1gpu.fsf@meyering.net>
     [not found] ` <CAH8yC8mn1YMN+fgzJBKEk9+y0qTqfO2zHbWUyO2ekVq-PimX3Q@mail.gmail.com>
     [not found]   ` <4884197.be5NI9L3Sv@omega>
2020-09-19 14:12     ` [musl] Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30 Jeffrey Walton
2020-09-19 21:00       ` Ariadne Conill
2020-09-19 21:05         ` Ariadne Conill

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).