From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24305 invoked from network); 20 Sep 2020 12:19:27 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2020 12:19:27 -0000 Received: (qmail 11906 invoked by uid 550); 20 Sep 2020 12:19:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11888 invoked from network); 20 Sep 2020 12:19:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced.org; s=default; t=1600604353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PXZVABl57UBBmUcaxkxO9D7PduCATL1fAmJCPvuRkm0=; b=XSl09sBuzX5E0AoX0dKmef6EbVgNBL3GBCqdxIpFqRK1okkAswW/QvEaroTu526XdoYUza yjwfkL8sPM2JTsY1f3oupZFcLbSv0dPktdCNwAcbGaHVC8trcige/gO9Rh7xaVJ1tjWov8 pwCNRHVYseuxXA55xzaI5NZivETvZKc= To: musl@lists.openwall.com, "Dmitry V. Levin" , Bruno Haible Cc: config-patches@gnu.org References: <4768019.hHWyC0TzgU@omega> <20200920101249.GA29409@altlinux.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ariadne Conill Message-ID: <9987c415-e8b9-d2e4-5488-8049718b1326@dereferenced.org> Date: Sun, 20 Sep 2020 06:19:10 -0600 MIME-Version: 1.0 In-Reply-To: <20200920101249.GA29409@altlinux.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10 Hello, On 2020-09-20 04:12, Dmitry V. Levin wrote: > On Sat, Sep 19, 2020 at 03:30:54PM +0200, Bruno Haible wrote: >> The value of $host_os, determined by the current config.guess, is: >> - On Alpine Linux 3.9: linux-musl >> - On Alpine Linux 3.10: linux-gnu >> - On Alpine Linux 3.12: linux-musl >> >> The reason is that config.guess tests 'ldd --version'. However, in >> Alpine Linux 3.10, /usr/bin/ldd has been replaced with a shell script >> that does not understand the --version option: >> >> $ cat /usr/bin/ldd >> #!/bin/sh >> exec /lib/ld-musl-x86_64.so.1 --list -- "$@" >> $ /usr/bin/ldd --version 2>&1 >> /lib/ld-musl-x86_64.so.1: cannot load --version: No such file or directory >> >> Find attached a proposed fix. More details in >> . >> >> Bruno > >> >From 6e8da56c68ad94175d67acfc6257e614fe74e01d Mon Sep 17 00:00:00 2001 >> From: Bruno Haible >> Date: Sat, 19 Sep 2020 15:24:59 +0200 >> Subject: [PATCH] * config.guess: Fix determination of musl libc on Alpine >> Linux 3.10. >> >> --- >> ChangeLog | 5 +++++ >> config.guess | 14 ++++++-------- >> 2 files changed, 11 insertions(+), 8 deletions(-) >> >> diff --git a/ChangeLog b/ChangeLog >> index 4f106db..834f4e5 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,8 @@ >> +2020-09-19 Bruno Haible >> + >> + * config.guess: Don't use 'ldd --version' to determine the presence of >> + musl libc, as this fails on Alpine Linux 3.10. >> + >> 2020-09-08 Elad Lahav >> Ben Elliston >> >> diff --git a/config.guess b/config.guess >> index 9aff91c..8d70ec2 100755 >> --- a/config.guess >> +++ b/config.guess >> @@ -2,7 +2,7 @@ >> # Attempt to guess a canonical system name. >> # Copyright 1992-2020 Free Software Foundation, Inc. >> >> -timestamp='2020-08-17' >> +timestamp='2020-09-19' >> >> # This file is free software; you can redistribute it and/or modify it >> # under the terms of the GNU General Public License as published by >> @@ -150,17 +150,15 @@ Linux|GNU|GNU/*) >> #elif defined(__dietlibc__) >> LIBC=dietlibc >> #else >> + #include >> + #ifdef __DEFINED_va_list >> + LIBC=musl >> + #else >> LIBC=gnu >> #endif >> + #endif >> EOF >> eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" >> - >> - # If ldd exists, use it to detect musl libc. >> - if command -v ldd >/dev/null && \ >> - ldd --version 2>&1 | grep -q ^musl >> - then >> - LIBC=musl >> - fi >> ;; >> esac >> > > Is this __DEFINED_va_list macro the official way of detecting musl? > It looks very fragile to me. There is no official way of detecting musl. Ariadne