Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390515 - dev-libs/nspr doesn't linking with libpthread
Summary: dev-libs/nspr doesn't linking with libpthread
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 12:34 UTC by Tibor Vago
Modified: 2012-11-13 23:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nspr-4.8.9.ebuild.patch (nspr-4.8.9.ebuild.patch,569 bytes, patch)
2011-11-16 00:28 UTC, Tibor Vago
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tibor Vago 2011-11-14 12:34:25 UTC
When I was try to install firefox and thunderbird their dependencies nss doesn't compile because libnspr.so.4 doesn't linked with libpthread:

[ . . . ]
x86_64-gentoo-freebsd8.2-gcc -o FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/baddbdir -O -fPIC -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -DXP_UNIX -UDEBUG -DNDEBUG -D_THREAD_SAFE -D_REENTRANT -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/X11R6/include -I/usr/include/nspr -I../../../dist/FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I/usr/include/nspr -I../../../dist/FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/include/dbm -I../../../dist/public/seccmd -I../../../dist/public/dbm  -w -O2 -march=native -pipe FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/baddbdir.o \
-Wl,-O1 -Wl,--as-needed -Wl,--allow-multiple-definition ../../../dist/FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/lib/libsectool.a  -L../../../dist/FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/lib -lssl3 -lsmime3 -lnss3 -L../../../dist/FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/lib -lnssutil3 -L/usr/lib64 -lplc4 -lplds4 -lnspr4  -pthread
/usr/lib64/libnspr4.so: undefined reference to `pthread_create'
/usr/lib64/libnspr4.so: undefined reference to `pthread_condattr_init'
/usr/lib64/libnspr4.so: undefined reference to `pthread_setschedparam'
/usr/lib64/libnspr4.so: undefined reference to `pthread_getschedparam'
collect2: ld returned 1 exit status
gmake[2]: *** [FreeBSD8.2_x86_64-gentoo-freebsd8.2-gcc_64_OPT.OBJ/baddbdir] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.13.1/work/nss-3.13.1/mozilla/security/nss/cmd/tests'
gmake[1]: *** [libs] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.13.1/work/nss-3.13.1/mozilla/security/nss/cmd'
gmake: *** [libs] Error 2
emake failed
[ . . . ]

After I manualy add "-lpthread" to link command line the nss compile without error.
Comment 1 Tibor Vago 2011-11-14 12:36:08 UTC
"libnspr4.so.8" the right library name what from missing libpthread
Comment 2 Tibor Vago 2011-11-16 00:28:14 UTC
Created attachment 292715 [details, diff]
nspr-4.8.9.ebuild.patch

Patch for nspr-4.8.9.ebuild to link nspr shared libraries with libpthread.
Comment 3 Tibor Vago 2011-11-16 00:29:41 UTC
Please test if posibble and apply on portage tree.
Comment 4 Naohiro Aota gentoo-dev 2011-11-29 11:02:40 UTC
I can't reproduce the error...

$ ldd /usr/lib/libnspr4.so.8
/usr/lib/libnspr4.so.8:
	libthr.so.3 => /lib/libthr.so.3 (0x281dc000)
	libc.so.7 => /lib/libc.so.7 (0x28090000)

# emerge -pv nspr nss
[ebuild   R    ] dev-libs/nspr-4.8.9  USE="-debug" 0 kB
[ebuild   R    ] dev-libs/nss-3.13.1  USE="-utils" 0 kB
Comment 5 Jory A. Pratt gentoo-dev 2012-02-26 15:58:03 UTC
I have just added 4.9 to the tree, give it a spin, I have reworked pkg-config so you should get proper linking now.
Comment 6 Naohiro Aota gentoo-dev 2012-11-13 23:18:14 UTC
Cannot reproduce. Reopen if you still have an error.