Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304571 - dev-libs/nss-3.12.5-r1 fails to compile
Summary: dev-libs/nss-3.12.5-r1 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-02-11 15:30 UTC by Metin Akat
Modified: 2010-02-12 14:06 UTC (History)
7 users (show)

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


Attachments
strace output of shlibsign (strace.out,13.50 KB, text/plain)
2010-02-11 23:57 UTC, ecroy
Details
nss-3.12.5-r1-reorder.patch (nss-3.12.5-r1-reorder.patch,1.09 KB, text/plain)
2010-02-12 03:03 UTC, Jory A. Pratt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Metin Akat 2010-02-11 15:30:30 UTC
dev-libs/nss-3.12.5-r1 fails to compile with the following errors:

make[2]: Entering directory `/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign'             
i686-pc-linux-gnu-gcc -o Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/shlibsign.o -c -O2 -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1  -ansi -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR -DXP_UNIX -DSHLIB_SUFFIX=\"so\" -DSHLIB_PREFIX=\"lib\" -UDEBUG -DNDEBUG -D_REENTRANT -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/include/nspr   -I../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/dbm -I../../../dist/public/seccmd  -O2 -march=i686 -pipe shlibsign.c                   
i686-pc-linux-gnu-gcc -o Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/shlibsign -O2 -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1  -ansi -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR -DXP_UNIX -DSHLIB_SUFFIX=\"so\" -DSHLIB_PREFIX=\"lib\" -UDEBUG -DNDEBUG -D_REENTRANT -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/include/nspr   -I../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/dbm -I../../../dist/public/seccmd  -O2 -march=i686 -pipe Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/shlibsign.o -Wl,-O1     -L../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib -lplc4 -lplds4 -lnspr4  -lpthread  -ldl -lc                                                                                                            
../../../coreconf/nsinstall/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/nsinstall -t -m 775 Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/shlibsign ../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/bin                                
cd mangle; make libs                                                                                                                 
make[3]: Entering directory `/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/mangle'      
i686-pc-linux-gnu-gcc -o Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/mangle.o -c -O2 -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1  -ansi -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR -DXP_UNIX -DSHLIB_SUFFIX=\"so\" -DSHLIB_PREFIX=\"lib\" -UDEBUG -DNDEBUG -D_REENTRANT -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/include/nspr   -I../../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/include -I../../../../dist/public/nss -I../../../../dist/private/nss  -O2 -march=i686 -pipe mangle.c                                                                         
i686-pc-linux-gnu-gcc -o Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/mangle -O2 -fPIC -DLINUX1_2 -Di386 -D_XOPEN_SOURCE -DLINUX2_1  -ansi -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR -DXP_UNIX -DSHLIB_SUFFIX=\"so\" -DSHLIB_PREFIX=\"lib\" -UDEBUG -DNDEBUG -D_REENTRANT -DNSS_ENABLE_ECC -DUSE_UTIL_DIRECTLY -I/usr/include/nspr   -I../../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/include -I../../../../dist/public/nss -I../../../../dist/private/nss  -O2 -march=i686 -pipe Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/mangle.o -Wl,-O1      -L../../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib -lplc4 -lplds4 -lnspr4  -lpthread  -ldl -lc
../../../../coreconf/nsinstall/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/nsinstall -t -m 775 Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/mangle ../../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/bin
make[3]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/mangle'
cd Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ ; sh /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/./sign.sh /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ \
        /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ Linux \
        /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib/libsoftokn3.so
/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/shlibsign -v -i /var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib/libsoftokn3.so
moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB
/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign/./sign.sh: line 2:  5188 Aborted                 ${2}/shlibsign -v -i ${5}
make[2]: *** [../../../dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib/libsoftokn3.chk] Error 134
make[2]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd/shlibsign'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/nss/cmd'
make: *** [libs] Error 2
 * ERROR: dev-libs/nss-3.12.5-r1 failed:
 *   nss make failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 2622:  Called die
 * The specific snippet of code:
 *       emake -j1 CC="$(tc-getCC)" || die "nss make failed"
 *
 * If you need support, post the output of 'emerge --info =dev-libs/nss-3.12.5-r1',
 * the complete build log and the output of 'emerge -pqv =dev-libs/nss-3.12.5-r1'.
 * The complete build log is located at '/var/tmp/portage/dev-libs/nss-3.12.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/nss-3.12.5-r1/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5'

>>> Failed to emerge dev-libs/nss-3.12.5-r1, Log file:

>>>  '/var/tmp/portage/dev-libs/nss-3.12.5-r1/temp/build.log'

 * Messages for package dev-libs/nss-3.12.5-r1:

 * ERROR: dev-libs/nss-3.12.5-r1 failed:
 *   nss make failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 2622:  Called die
 * The specific snippet of code:
 *       emake -j1 CC="$(tc-getCC)" || die "nss make failed"
 *
 * If you need support, post the output of 'emerge --info =dev-libs/nss-3.12.5-r1',
 * the complete build log and the output of 'emerge -pqv =dev-libs/nss-3.12.5-r1'.
 * The complete build log is located at '/var/tmp/portage/dev-libs/nss-3.12.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/nss-3.12.5-r1/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5'
metin-sfco loxs #



And here is my emerge --info


 # emerge --info
Portage 2.1.7.17 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.29-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-i686-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-2.0.1
Timestamp of tree: Thu, 11 Feb 2010 14:45:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirrors.ludost.net/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en bg"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/turbogears2"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emacs emboss encode evo fam firefox flac fontforge fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 java jpeg kde libnotify lm_sensors mad mikmod mng modules mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png postgres ppds pppd python qt3support qt4 quicktime readline reflection sdl semantic-desktop session spell spl sqlite ssl startup-notification svg symlink sysfs tcpd thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en bg" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

metin-sfco loxs #


Reproducible: Always

Steps to Reproduce:
Comment 1 Jory A. Pratt gentoo-dev 2010-02-11 16:17:31 UTC
This is most likely related to sandbox, if you would please downgrade to 2.1 and retest.
Comment 2 Metin Akat 2010-02-11 17:29:50 UTC
No, downgrading to sandbox 2.1 doesn't solve the problem
Comment 3 Jeremy 2010-02-11 17:41:16 UTC
I'm having same issue. Downgrading sandbox to 2.1 didn't help.

Re-running the command line right before the error shows that shlibsign is aborting (even as root, out of the sandbox). Some simple hacking around on shlibsign.c on my machine points to line 474 in softokn_Init():
   crv = pFunctionList->C_Initialize(&initArgs);

pFunctionList, C_Initialize, and initArgs all look like valid pointers, so the issue is somewhere down that rabbit hole I guess.



(In reply to comment #1)
> This is most likely related to sandbox, if you would please downgrade to 2.1
> and retest.
> 

Comment 4 Walter Meinl 2010-02-11 19:55:31 UTC
Interestingly, on my i686 machine I've gotten the same error "line 2:  5188 Aborted" but with another number, I've had no problem on my amd64 machine. Sandbox version on both machines is the same.
Comment 5 Metin Akat 2010-02-11 20:25:42 UTC
Yeah, same here. Just updated my amd64 machine. No problems with it.
Comment 6 Jory A. Pratt gentoo-dev 2010-02-11 20:32:29 UTC
If someone could please get me an strace of the failure might help to get this resolved much sooner.
Comment 7 ecroy 2010-02-11 23:57:13 UTC
Created attachment 219293 [details]
strace output of shlibsign
Comment 8 ecroy 2010-02-12 00:04:51 UTC
sign.sh sets LD_LIBRARY_PATH to

/var/tmp/portage/dev-libs/nss-3.12.5-r1/work/nss-3.12.5/mozilla/security/dist/Linux2.6_x86_i686-pc-linux-gnu-gcc_glibc_PTH_OPT.OBJ/lib

Removing the LD_LIBRARY_PATH line from sign.sh leads to successfull execution of shlibsign and emerge continuing normally - although the line is probably there for a reason...
Comment 9 Jory A. Pratt gentoo-dev 2010-02-12 02:22:39 UTC
Index: nss-3.12.5-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.12.5-r1.ebuild,v
retrieving revision 1.2
diff -u -B -r1.2 nss-3.12.5-r1.ebuild
--- nss-3.12.5-r1.ebuild	11 Feb 2010 20:52:15 -0000	1.2
+++ nss-3.12.5-r1.ebuild	12 Feb 2010 02:22:00 -0000
@@ -54,6 +54,7 @@
 	export BUILD_OPT=1
 	export NSS_USE_SYSTEM_SQLITE=1
 	export NSPR_INCLUDE_DIR=`pkg-config --cflags-only-I nspr | sed 's/-I//'`
+	export NSPR_LIB_DIR="/usr/$(get_libdir)"
 	export NSDISTMODE=copy
 	export NSS_ENABLE_ECC=1
 	export XCFLAGS="${CFLAGS}"

If someone can make that single line change and retest and post your results it would be helpful.
Comment 10 Jory A. Pratt gentoo-dev 2010-02-12 03:03:45 UTC
Created attachment 219301 [details]
nss-3.12.5-r1-reorder.patch

I would rather this tested, this would be much easier for all of us in the long run. If you find it allows you a proper compile which it should, I will push it to the tree.
Comment 11 Mark Kowarsky (RETIRED) gentoo-dev 2010-02-12 04:22:07 UTC
(In reply to comment #10)
> Created an attachment (id=219301) [details]
> nss-3.12.5-r1-reorder.patch
> 
> I would rather this tested, this would be much easier for all of us in the long
> run. If you find it allows you a proper compile which it should, I will push it
> to the tree.
> 
Applying the patch to the ebuild allows me to build nss (I no longer have the error present in this bug).
Comment 12 Bob Raitz 2010-02-12 06:46:00 UTC
Had the issue, tried the fix, it worked twice. Curiously, it wasn't an issue for my amd64. |shrug|
Comment 13 Metin Akat 2010-02-12 08:23:00 UTC
I can confirm that the patch works for me as well.
Comment 14 ecroy 2010-02-12 08:29:57 UTC
Works for me - thanks for the fix!
Comment 15 Jory A. Pratt gentoo-dev 2010-02-12 14:06:55 UTC
Thanks for testing, commited to cvs :)