[Clfs-dev] Util Linux 2.24 and multilib

William Harrington kb0iic at berzerkula.org
Thu Nov 7 10:11:15 PST 2013


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 at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to  
`__pthread_unwind at GLIBC_PRIVATE'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_once at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_barrier_wait at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_create at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_cancel at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to  
`__pthread_get_minstack at GLIBC_PRIVATE'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_detach at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_barrier_init at GLIBC_2.2.5 
'
	•
/mnt/clfs/tools/lib/../lib64/librt.so: undefined reference to `pthread_attr_setstacksize at 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


More information about the Clfs-dev mailing list