config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: config.guess returns incorrect platform for alpine


From: Cheng XU
Subject: Re: config.guess returns incorrect platform for alpine
Date: Wed, 4 Nov 2020 14:31:05 -0800

Thanks for the info. However, it seems that the referenced issue is only valid for the old version of Alpine. For the latest version, the `ldd --version` works just fine. As shown in the below, the old config.guess reports the correct result in a fresh alpine docker container, while the new config.guess does not. Therefore, I think we should just keep the original `ldd --version` check. There is no harm to do so.
$ docker run --rm -it -v $(pwd):/data -w /data alpine:latest
/data # ldd --version
musl libc (x86_64)
Version 1.1.24
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname
/data # ./config-2020-08-17.guess --version
GNU config.guess (2020-08-17)

Originally written by Per Bothner.
Copyright 1992-2020 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/data # ./config-2020-08-17.guess
x86_64-pc-linux-musl
/data # ./config-2020-10-22.guess --version
GNU config.guess (2020-10-22)

Originally written by Per Bothner.
Copyright 1992-2020 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/data # ./config-2020-10-22.guess
x86_64-pc-linux-gnu

Moreover, even if I install the compiler, the new config.guess still reports the incorrect result.
/data # apk add gcc
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libgcc (9.3.0-r2)
(2/11) Installing libstdc++ (9.3.0-r2)
(3/11) Installing binutils (2.34-r1)
(4/11) Installing gmp (6.2.0-r0)
(5/11) Installing isl (0.18-r0)
(6/11) Installing libgomp (9.3.0-r2)
(7/11) Installing libatomic (9.3.0-r2)
(8/11) Installing libgphobos (9.3.0-r2)
(9/11) Installing mpfr4 (4.0.2-r4)
(10/11) Installing mpc1 (1.1.0-r1)
(11/11) Installing gcc (9.3.0-r2)
Executing busybox-1.31.1-r19.trigger
OK: 129 MiB in 25 packages
/data # ./config-2020-10-22.guess
x86_64-pc-linux-gnu

Best Regards,

Cheng
On Nov 3, 2020, 8:34 PM -0800, Ben Elliston <bje@air.net.au>, wrote:
On Tue, Nov 03, 2020 at 06:14:43AM -0800, Cheng XU wrote:

Due to a recent change
(https://github.com/TeX-Live/installer/commit/ff98be775bf48aa576cbc25aa337dd5626af6550),
the config.guess will incorrectly report `x86_64-pc-linux-gnu`
instead of `x86_64-pc-linux-musl` for alpine docker image.

To fix the problem, may I suggest to keep the original detection
script using ldd. The reason is that the compiler is not installed
in a fresh alpine docker image. Whereas, the ldd is available by
default. Therefore, I think using ldd to detect musl libc is much
reliable.

Please see the thread starting at:
https://lists.gnu.org/archive/html/config-patches/2020-09/msg00002.html

for why your solution is not workable. You will need to add a compiler
installation to your docker image, sorry.

Ben

reply via email to

[Prev in Thread] Current Thread [Next in Thread]