Thorsten Glaser wrote in <dcc7333-54da-3e2-5ea7-3bcae4adf1f at tarent.de>: |On Fri, 18 Feb 2022, Steffen Nurpmeso wrote: | |>|Ouch, completely bogus. |> |> It is a nice hint imho. | |Nope. It hardcodes a path into the *host* system. Absolutely wrong, |on multiple counts. (It would also trigger, say, on a glibc system |with musl installed.) Well it may look secondarily. This is musl libc in the end. And note it does not, as per the snippet you removed, perform any action on its own, it just gives a hint for a specific configure option which does. I am using the same mechanism (i have not invented it) in my ~/.profile, for setting LC_ALL. |> That .. does not seem to be true for native musl systems? | |Link statically. Nah. For hello world you mean? Well despite Theo de Raadt ranting (as its -static) .. requires special or at least non-standardized flags itself. On AlpineLinux there is no static musl, and never has been in the past seven years i use it. But wait, i track musl for almost as long, too: #?0|kent:musl.git$ git grep -i LOCPA master master:WHATSNEW:- MUSL_LOCPATH search was broken with multiple components master:src/locale/locale_map.c: if (!libc.secure) path = getenv("MUSL_LOCPATH"); Never heard of it. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Thorsten Glaser
2022-Feb-18 17:47 UTC
detecting musl (was Re: Call for testing: OpenSSH 8.9)
(retopiccing and trimming Cc) On Fri, 18 Feb 2022, Steffen Nurpmeso wrote:> Well it may look secondarily. This is musl libc in the end. > And note it does not, as per the snippet you removed, perform any > action on its own, it just gives a hint for a specific configure > option which does.I don?t understand what you are trying to say here.> |>|Ouch, completely bogus. > |> > |> It is a nice hint imho. > | > |Nope. It hardcodes a path into the *host* system. Absolutely wrong, > |on multiple counts. (It would also trigger, say, on a glibc system > |with musl installed.)> I am using the same mechanism (i have not > invented it) in my ~/.profile, for setting LC_ALL.It?s plain wrong, that?s what it is. lrwxrwxrwx 1 root root 25 2. Okt 14:47 /lib/ld-linux.so.2 -> i386-linux-gnu/ld-2.31.so* lrwxrwxrwx 1 root root 25 15. Jan 2021 /lib/ld-musl-x86_64.so.1 -> x86_64-linux-musl/libc.so* This Debian system just has both, so you cannot use this to detect musl. (Similarily, you cannot use this to detect a pure-static musl system; I?m told the suckless people have interest in these.)> |Link statically. > > Nah. For hello world you mean?Yes, link the hello world statically so strings will show MUSL_LOCPATH occurring. You can use -static for this, or the distro is broken.> #?0|kent:musl.git$ git grep -i LOCPA master > master:WHATSNEW:- MUSL_LOCPATH search was broken with multiple components > master:src/locale/locale_map.c: if (!libc.secure) path = getenv("MUSL_LOCPATH");Yes, this is where it comes from.> Never heard of it.It?s probably their equivalent of glibc LOCPATH: a path where a user can install custom locales into. See: https://serverfault.com/a/1093896/189656 gl hf, //mirabilos -- Infrastrukturexperte ? tarent solutions GmbH Am Dickobskreuz 10, D-53121 Bonn ? http://www.tarent.de/ Telephon +49 228 54881-393 ? Fax: +49 228 54881-235 HRB AG Bonn 5168 ? USt-ID (VAT): DE122264941 Gesch?ftsf?hrer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg **************************************************** /?\ The UTF-8 Ribbon ??? Campaign against Mit dem tarent-Newsletter nichts mehr verpassen: ??? HTML eMail! Also, https://www.tarent.de/newsletter ??? header encryption! ****************************************************