On 10/08/2016 18:02, Eric Le Bihan wrote:
> Hi!
>
> The ./configure script of skalibs tries to detect if posix_spawnp() is
> available on the system by generating a runtime test and executing it.
>
> For whichever reason, uclibc-ng provides this function in librt.a, not
> in libc.a. So the runtime test fails when trying to link the test program.
>
> Adding -lrt to the command line to build the test program should fix this,
> but how to properly do it?
According to
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
putting the spawn.h functions in librt is valid, so uclibc-ng is conforming
and my autodetection is incorrect. I need to fix the configure script.
This is annoying, because uclibc-ng's (and glibc's, too) librt depends on
libpthread. That means, among other things, that if you link dynamically,
you will pull in libpthread.so, and use thread-safe functions even if your
program is single-threaded. Why didn't uclibc-ng do away with that historical
ugliness?
The best solution, of course, is to mark uClibc and all its breed as
obsolescent, and encourage users to switch to musl. :P
--
Laurent
Received on Wed Aug 10 2016 - 19:29:36 UTC