platform-testers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [platform-testers] coreutils-8.15.74-be17e3 build failure on FreeBSD


From: Jim Meyering
Subject: Re: [platform-testers] coreutils-8.15.74-be17e3 build failure on FreeBSD 9.0 x86
Date: Sun, 05 Aug 2012 15:33:29 +0200

Nelson H. F. Beebe wrote:
> My normal builds of coreutils-8.15.74-be17e3 failed on
> FreeBSD 9.0 x86 like this:
...
> That got further, then died with
>
>         CCLD     timeout
>       timeout.o: In function `settimeout':
>       /local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:118: undefined 
> reference to `timer_create'
>       /local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:120: undefined 
> reference to `timer_settime'
>       /local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:125: undefined 
> reference to `timer_delete'
>
> I tried again with
>
>       % make LIBS=-lpthread
>
> but the same failure occurred.
>
> Yet another try with
>
>       % make LIBS='-lpthread -lrt'
>
> still failed; the symbols in -lrt provide these names:
>
>       00000100 T __timer_create
>       000000a0 T __timer_delete
>       00000060 T __timer_getoverrun
>       00000080 T __timer_gettime
>       00000030 T __timer_oshandle
>       00000040 T __timer_settime

Hi Nelson,

In preparing for coreutils-8.18, I tried to build on that same
FreeBSD 9.0 system, and it still failed just as it did for you, above.

The root cause is that you have an empty /usr/local/lib/librt.a, but
configure found that -lrt worked before it added the -L/usr/local/lib
it required in order to get a working -liconv.
The problem: using -L/usr/local/lib meant our -lrt (required for the timer_*
functions) would then resolve to the empty /usr/local/lib/librt.a:

    freebsd$ nm /usr/local/lib/librt.a

    empty.o:
    00000000 T empty

We want the one in /usr/lib:

    freebsd$ nm /usr/lib/librt.a|grep timer_c
             U __sys_ktimer_create
    00000100 T __timer_create
    00000100 W _timer_create
    00000100 W timer_create

If you simply remove the empty library, all should be well:

    rm -f /usr/local/lib/librt.a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]