[Clfs-dev] Util Linux 2.24 and multilib

Pierre Labastie pierre.labastie at neuf.fr
Fri Nov 8 12:28:48 PST 2013


Le 07/11/2013 19:11, William Harrington a écrit :
> Greetings,
> 
> Ran into a problem with multilib:
> 
> dmesg_LDADD is only including -lrt   and it needs -lpthread to build
> successfully.
> 
>> /mnt/clfs/cross-tools/bin/../lib/gcc/x86_64-aprico-linux-gnu/4.8.2/../../../../x86_64-aprico-linux-gnu/bin/ld:
> warning: libpthread.so.0, needed by /mnt/clfs/tools/lib/../lib64/librt.so, not
> found (try using -rpath or -rpath-link)
>
Looks like you have found another instance of the issue that lead to this thread:
http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg18465.html

Actually, it is librt which loads libpthread (using rpath to search for it),
so -lpthread is not necessary, except that at link time, rpath is not always
used, depending on whether binutils was configured with sysroot capability or not.

The (not really evident at first sight) proper fix is to add --with-sysroot
to binutils configure. It is not documented in top configure, but in ld's
configure.

Now, to the question, how did it work for version 2.23.2? I have no clue.
Maybe your /etc/ld.so.conf was set differently, Or util-linux passed -lpthread...

Regards,
Pierre




More information about the Clfs-dev mailing list