GNOME Bugzilla – Bug 765712
tests: Fix compilation
Last modified: 2016-05-09 08:15:52 UTC
The compilation fails with this message: /bin/bash ../../libtool --tag=CC --mode=link clang -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -Wall -g -O0 -L/opt/gnome/jh/lib -L/opt/gnome/jh/lib -L/opt/gnome/jh/lib -o thread thread.o ../../glib/libglib-2.0.la -lm libtool: link: clang -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -Wall -g -O0 -o .libs/thread thread.o -L/opt/gnome/jh/lib ../../glib/.libs/libglib-2.0.so -lm -Wl,-rpath -Wl,/opt/gnome/jh/lib /usr/bin/ld: thread.o: undefined reference to symbol 'pthread_getname_np@@GLIBC_2.12' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:1726: recipe for target 'thread' failed The attached patch fixes this issue at least in my setup. :)
Created attachment 326925 [details] [review] tests: Fix compilation Commit 99bdfd1b added the use of pthread_setname_np, nonetheless it is need to link against pthread. This patch adds that dependency to LDFLAGS.
Review of attachment 326925 [details] [review]: I'll commit this with a slightly reworded commit message. Thanks!
*** Bug 765714 has been marked as a duplicate of this bug. ***
*** Bug 766159 has been marked as a duplicate of this bug. ***