After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765712 - tests: Fix compilation
tests: Fix compilation
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 765714 766159 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-04-28 09:15 UTC by Víctor Manuel Jáquez Leal
Modified: 2016-05-09 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Fix compilation (831 bytes, patch)
2016-04-28 09:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2016-04-28 09:15:38 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. :)
Comment 1 Víctor Manuel Jáquez Leal 2016-04-28 09:15:42 UTC
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.
Comment 2 Allison Karlitskaya (desrt) 2016-04-28 09:18:24 UTC
Review of attachment 326925 [details] [review]:

I'll commit this with a slightly reworded commit message.  Thanks!
Comment 3 Matthias Clasen 2016-05-02 01:29:37 UTC
*** Bug 765714 has been marked as a duplicate of this bug. ***
Comment 4 Garrett Regier 2016-05-09 08:15:52 UTC
*** Bug 766159 has been marked as a duplicate of this bug. ***