[multicat-devel] Build issue: undefined reference to clock_nanosleep

Jörg Krause joerg.krause at embedded.rocks
Sun Mar 20 18:33:34 CET 2016


On So, 2016-03-20 at 00:28 +0100, Jörg Krause wrote:
> The uClibc can be configured to be build without clock_nanosleep()
> support (UCLIBC_HAS_ADVANCED_REALTIME is not set). The ADI GNU
> toolchain [1] for the Blackfin target architecture uses a uClibc
> built
> with UCLIBC_HAS_ADVANCED_REALTIME unset and therefore has no supprt
> for
> clock_nanosleep().
> 
> As multicat does not check for clock_nanosleep() and
> sets HAVE_CLOCK_NANOSLEEP unconditionally if __APPLE__ is not
> defined,
> the build with this toolchain fails:
> 
>   util.c:243: undefined reference to `_clock_nanosleep'
> 
> The proper way to handle this issue would be to add a check for
> clock_nanosleep().
> 
> [1] https://sourceforge.net/projects/adi-toolchain/files/

As it turned out, the ADI toolchain sets UCLIBC_HAS_ADVANCED_REALTIME,
but do not use NPTL as thread implementation, which is required for
clock_nanosleep().

I'll prepare a patch to allow building multicat with the uClibc, if the
C library is configured without NPTL support.

Best regards
Jörg Krause


More information about the multicat-devel mailing list