Re: skalibs: how to properly detect posix_spawnp() when using uclibc-ng?

From: Eric Le Bihan <>
Date: Fri, 12 Aug 2016 10:48:26 +0200


Le Wed, 10 Aug 2016 21:47:36 +0200,
Laurent Bercot <> a écrit :

> On 10/08/2016 21:29, Laurent Bercot wrote:
> > 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.
> Eric: please test building the latest skalibs git head against
> uclibc-ng and tell me if it works. In particular, I'd like to know
> whether the posix_spawn autodetection works both when your compiler
> links dynamically by default (CC=gcc) and when you force it to link
> statically (CC="gcc -static").

Unfortunately, it does not work. The modification assumes that the
check for clock_gettime() will result in $rt_lib being set to -lrt, but
it is not the case for uclibc-ng, where this function is available in
the C runtime:

$ nm i686-buildroot-linux-uclibc/sysroot/lib/ \
  | grep clock_gettime
00002308 T clock_gettime
00002308 t __GI_clock_gettime
$ nm i686-buildroot-linux-uclibc/sysroot/lib/ \
  | grep clock_gettime
0000d5dd T clock_gettime

I modified ./configure to perform a more complicated test to handle
this case (see attached patch) but the build of the skaware programs
still fails because the -lrt sysdep is not added by default. Shouldn't
the deps-exe and deps-lib files of these programs be updated to add

BTW, I noticed that `s6-uevent-spawner` calls posix_spawnp() directly
instead of using child_spawn0().

So, for buildroot-s6, I ended up forcing -lrt in the runtime test
for posix_spawnp() in the ./configure script and passing LDLIBS=-lrt
to `make` when uclibc is selected [1].


Best regards,


Received on Fri Aug 12 2016 - 08:48:26 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC