I am not the author of this check, I simply took it from config.guess https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob;f=config.guess;h=256083a70d35921d544b15f4f51749af89d18b89;hb=HEAD (Ctrl+F musl) However, I was the one who requested the musl detection in config.guess and the maintainer implemented the check like this for reasons of portability.
Perhaps the problem is the else case in this statement. Maybe it should be: LIBC="glibc" if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl then LIBC="musl" fi On 03/25/2018 06:47 AM, luigi scarso wrote: > On Sat, Mar 24, 2018 at 6:43 PM, Mojca Miklavec > <mojca.miklavec.li...@gmail.com> wrote: >> On 24 March 2018 at 18:36, luigi scarso <luigi.sca...@gmail.com> wrote: >>> On Sat, Mar 24, 2018 at 5:51 PM, Mojca Miklavec wrote: >>>> I reverted the change for now until someone can come up with a working >>>> command. >>> can you send me offlist the relevant *lua *sh script ? >>> I cannot reproduce the error now with linux/zsh. >> >> echo "Henri's test:" >> if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl >> then >> echo "This is musl" >> else >> echo "This is libc" >> fi >> >> # not sure about the exact form >> echo "Arthur's test:" >> if command -v ldd --version 2>&1 | fgrep -q '^musl' >> then >> echo "This is musl" >> else >> echo "This is libc" >> fi >> >> Mojca >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___________________________________________________________________________________ > > > % cat ./test-musl.zsh > if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q "^musl" > then > echo "1 libc=musl" > else > echo "1 libc=glibc" > fi > > if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q '^musl' > then > echo "2 libc=musl" > else > echo "2 libc=glibc" > fi > > if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl > then > echo "3 libc=musl" > else > echo "3 libc=glibc" > fi > > > % zsh ./test-musl.zsh > 1 libc=glibc > 2 libc=glibc > 3 libc=glibc > > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________