Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 482376

Summary: =sci-astronomy/galaxy-2.2 - Underlinking- zfuncs.o: undefined reference to symbol 'pthread_create@@GLIBC_2.1'
Product: Gentoo Linux Reporter: Andrew Savchenko <bircoph>
Component: Current packagesAssignee: Kacper Kowalik (Xarthisius) (RETIRED) <xarthisius>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, sci-astronomy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 372079    
Attachments: build.log
environment
galaxy-2.2-pthread.patch
galaxy-2.2.ebuild.patch

Description Andrew Savchenko gentoo-dev 2013-08-24 22:27:44 UTC
Hello,

galaxy-2.2 suffers from underlinking with -lpthread:

i686-pc-linux-gnu-g++ -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1,--as-needed -pipe galaxy.o zfuncs.o `pkg-config --libs gtk+-3.0` -o galaxy       
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: zfuncs.o: undefined reference to symbol 'pthread_create@@GLIBC_2.1'

Can be fixed by adding -lpthread to the compilation command.
Comment 1 Andrew Savchenko gentoo-dev 2013-08-24 22:28:02 UTC
Created attachment 356920 [details]
build.log
Comment 2 Andrew Savchenko gentoo-dev 2013-08-24 22:28:31 UTC
Created attachment 356922 [details]
environment
Comment 3 Andrew Savchenko gentoo-dev 2013-08-24 22:32:07 UTC
Created attachment 356924 [details, diff]
galaxy-2.2-pthread.patch

Fix underlinking with pthread. This also moves pthread CFLAGS modification from ebuild to Makefie patch, because we need to patch anyway.
Comment 4 Andrew Savchenko gentoo-dev 2013-08-24 22:32:55 UTC
Created attachment 356926 [details, diff]
galaxy-2.2.ebuild.patch

Apply patch and remove flags mangling because it is moved to the ebuild.
Comment 5 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-08-25 10:19:35 UTC
+  25 Aug 2013; Kacper Kowalik <xarthisius@gentoo.org> galaxy-2.2.ebuild:
+  Append -pthread to ldflags for proper linking of threading library. Fixes bug
+  #482376 by Andrew Savchenko <bicorph@gmail.com>