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)
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_sigmask@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `__pthread_unwind@GLIBC_PRIVATE'
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_once@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_barrier_wait@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_create@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_cancel@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `__pthread_get_minstack@GLIBC_PRIVATE'
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_detach@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_barrier_init@GLIBC_2.2.5 '
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.2.5 '
        •
collect2: error: ld returned 1 exit status
        •
Makefile:5314: recipe for target 'dmesg' failed
        •
make[2]: *** [dmesg] Error 1

Adding this after configure:

sed -i 's/dmesg_LDADD.*lrt/&\ -lpthread/' Makefile

Then it builds properly. I haven't looked to see how util-linux 2.23.2 did it, but kind of strange.

Sincerely,

William Harrington
_______________________________________________
Clfs-dev mailing list
[email protected]
http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org

Reply via email to