Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 516244 - dev-libs/nss-3.16.1 ABI_X86="32 64" - nss-abi_x86_64.amd64/cmd/modutil/pk11.c:176: undefined reference to `SECMOD_InternaltoPubMechFlags'
Summary: dev-libs/nss-3.16.1 ABI_X86="32 64" - nss-abi_x86_64.amd64/cmd/modutil/pk11.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 516362 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-04 01:06 UTC by PM
Modified: 2014-07-07 14:51 UTC (History)
21 users (show)

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


Attachments
gzipped build log (build.log.gz,68.34 KB, application/gzip)
2014-07-04 01:08 UTC, PM
Details
dev-libs:nss-3.16.1:20140706-062455.log.lz (for reference) (dev-libs:nss-3.16.1:20140706-062455.log.lz,38.29 KB, application/x-lzip)
2014-07-06 06:35 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PM 2014-07-04 01:06:24 UTC
Building of dev-libs/nss-3.16.1 fails during linking. 

x86_64-pc-linux-gnu-gcc -o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil  -fPIC -DLINUX2_1 -m64 -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -DNSPR20 -UDEBUG -DNDEBUG -D_REENTRANT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/include -I../../dist/public/sectools -I../../dist/private/sectools -I../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/include/dbm -I../../dist/public/seccmd -I../../dist/public/nss -I../../dist/public/dbm -I../../dist/private/seccmd -I../../dist/private/nss -I../../dist/private/dbm -O2 -march=native -pipe -ggdb  -I/usr/include/nspr  Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/pk11.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/instsec.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/install.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/installparse.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/install-ds.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lex.Pk11Install_yy.o -Wl,-O1 -Wl,--as-needed -L/usr/lib64  -m64 -m64 -m64 ../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib/libjar.a ../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib/libsectool.a  -L../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib -lssl3 -lsmime3 -lnss3 -L../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib -lnssutil3 -L/var/tmp/portage/dev-libs/nss-3.16.1/temp/amd64-fake-dir -lplc4 -lplds4 -lnspr4  -lpthread  -ldl -lc -lz
Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/pk11.o: In function `LoadMechanismList':
/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss-abi_x86_64.amd64/cmd/modutil/pk11.c:176: undefined reference to `SECMOD_InternaltoPubMechFlags'
collect2: error: ld returned 1 exit status
../../coreconf/rules.mk:242: recipe for target 'Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil' failed

Attaching full build log.

Reproducible: Always




Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.15.3-gentoo x86_64)
=================================================================
System uname: Linux-3.15.3-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9450_@_2.66GHz-with-gentoo-2.2
KiB Mem:     8166584 total,   5035148 free
KiB Swap:    4095996 total,   4095996 free
Timestamp of tree: Thu, 03 Jul 2014 23:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.2.5-r4, 3.3.5, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.11.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.6.4, 4.7.4, 4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo multimedia sunrise steam-overlay roslin qt dupa
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=n --autounmask-write"
FCFLAGS="-O2 -march=native -pipe -ggdb"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=native -pipe -ggdb"
GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/multimedia /usr/local/portage/layman/sunrise /usr/local/portage/layman/steam /usr/local/portage/layman/roslin /usr/local/portage/layman/qt /usr/local/portage/moje"
USE="X Xaw3d a52 aac aalib acl acpi adobe-cff alsa amd64 amr amrnb amrwb apng async audiofile automount avahi avresample bash-completion berkdb bfq bineditor bluetooth bluray branding bzip2 c++0x cairo cdda cddb cdparanoia cdr chdir clang cli consolekit cracklib crypt css cuda cups curl cxx dbus dirac disk-partition divx djvu dri dts dvd dvdr ebook editor emboss emovix enca encode exchange exif faac faad fam fat fdk ffmpeg fftw firefox firefox3 flac fontconfig fortran g3dvl gd gdbm geoip gif glitz gmedia gnuplot gphoto2 gpm gtk hddtemp iconv id3 id3tag imagemagick inotify iostats ipod jpeg kde kde4 kdehiddenvisibility kipi kompare kpathsea kqemu ladspa lame laptop lastfm latex lcms libass libcaca libnotify libsamplerate lm_sensors lto lzma lzo mad matroska midi mjpeg mmap mmx mmxext mng modules moodbar mp3 mp3tunes mp4 mpeg mplayer mtp multilib musicbrainz ncurses networkmanager nls nptl nsplugin ntfs nvidia ogg okteta openal opencl opencore-amr opengl openmp optimized-qmake opus pam pango pch pcre pdf plasma png policykit portage ppds private-headers pulseaudio qt3 qt3support qt4 qthelp raster readline realmedia roe scanner schroedinger sdl secure-delete semantic-desktop sensord session shaders slang sndfile solver soundtouch sourceview sparse spell sse sse2 sse3 sse4 sse41 sse4_1 sse4a ssl ssse3 startup-notification steamruntime suid svg swat symlink syslog tcpd theora threads tiff truetype udev udisks unicode upnp upower usb vaapi vamp vcd vdpau vorbis wifi wmf wmp wxwidgets wxwindows x264 xcb xcomposite xml xscreensaver xv xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 PM 2014-07-04 01:08:35 UTC
Created attachment 380148 [details]
gzipped build log
Comment 2 Ben Kohler gentoo-dev 2014-07-04 01:13:17 UTC
Seeing the same thing here on amd64, but notably it only fails with ABI_X86="64 32", it succeeds with ABI_X86="64"
Comment 3 ganthore 2014-07-04 06:17:17 UTC
I am experiencing this problem as well. I do have both 32 and 64 bit ABIs enabled.

x86_64-pc-linux-gnu-gcc -o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil  -fPIC -DLINUX2_1 -m64 -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -DNSPR20 -UDEBUG -DNDEBUG -D_REENTRANT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/include -I../../dist/public/sectools -I../../dist/private/sectools -I../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/include/dbm -I../../dist/public/seccmd -I../../dist/public/nss -I../../dist/public/dbm -I../../dist/private/seccmd -I../../dist/private/nss -I../../dist/private/dbm -O2 -pipe -march=core-avx2  -I/usr/include/nspr  Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/pk11.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/instsec.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/install.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/installparse.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/install-ds.o Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lex.Pk11Install_yy.o -Wl,-O1 -Wl,--as-needed -L/usr/lib64  -m64 -m64 -m64 ../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib/libjar.a ../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib/libsectool.a  -L../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib -lssl3 -lsmime3 -lnss3 -L../../dist/Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/lib -lnssutil3 -L/var/tmp/portage/dev-libs/nss-3.16.1/temp/amd64-fake-dir -lplc4 -lplds4 -lnspr4  -lpthread  -ldl -lc -lz
Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/pk11.o: In function `LoadMechanismList':
pk11.c:(.text+0x78c): undefined reference to `SECMOD_InternaltoPubMechFlags'
collect2: error: ld returned 1 exit status
make[2]: *** [Linux2.6_x86_64_x86_64-pc-linux-gnu-gcc_glibc_PTH_64_OPT.OBJ/modutil] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss-abi_x86_64.amd64/cmd/modutil'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss-abi_x86_64.amd64/cmd'
make: *** [libs] Error 2
make: Leaving directory `/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss-abi_x86_64.amd64'
 * ERROR: dev-libs/nss-3.16.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/nss-3.16.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/nss-3.16.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/nss-3.16.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/nss-3.16.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss-abi_x86_64.amd64'
 * S: '/var/tmp/portage/dev-libs/nss-3.16.1/work/nss-3.16.1/nss'
Comment 4 tman 2014-07-04 07:52:06 UTC
i have same problem here:

Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.15.3-gentoo x86_64)
=================================================================
System uname: Linux-3.15.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3740QM_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:    24627364 total,  21590296 free
KiB Swap:   25598972 total,  25598972 free
Timestamp of tree: Fri, 04 Jul 2014 07:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.3.5, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo bitcoin steam-overlay bumblebee printer-drivers lokal
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/mnt/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/mnt/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/portage"
Comment 5 Paolo Pedroni 2014-07-04 11:11:13 UTC
Same problem, ABI_X86="64 32" as well.
Comment 6 microcai 2014-07-04 13:00:16 UTC
*** Bug 516362 has been marked as a duplicate of this bug. ***
Comment 7 microcai 2014-07-04 13:04:21 UTC
I was complietely confused !

after ABI_X86="64 -32" emerge nss, it got successed!

then, ABI_X86="64 32" magically passed the build.

now nss-3.16.1  build successfully with ABI_X86="64 32".
Comment 8 Jouni Kosonen 2014-07-04 13:31:07 UTC
(In reply to microcai from comment #7)
> after ABI_X86="64 -32" emerge nss, it got successed!
> then, ABI_X86="64 32" magically passed the build.

That's what I see here as well.

ABI_X86="64" ebuild dev-libs/nss-3.16.1.ebuild merge
followed by normal emerge passed.

It's as if the 64-bit part of the emerge uses the installed version of -lnss3 (in my case it was the one installed from 3.16-r1) but only when doing a multilib emerge.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-04 14:29:01 UTC
Apologies all -- I had this issue (or ome that was very similar) initially when I did the version bump of 3.16.1, but then I could not reproduce when I went back to try and fix it so I thought I must have been seeing things.

I will trace this down ASAP.  The gx86-multilib nss-3.14 attempt had a similar issue with using on-system libs during linking, as I recall, so the issue is probably somewhere in the build system.
Comment 10 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-04 14:48:31 UTC
OK, I still can't reproduce this.  Could a few of you let me know which version of nss was still installed, when the attempts at nss-3.16.1 were failing?  Jouni reported 3.16-r1..  It may also be pertinent to know which version of emul-linux-x86-baselibs (if any) is or was installed.
Comment 11 Graham Murray 2014-07-04 14:57:07 UTC
For me it failed with dnss-3.16 and emul-linux-baselibs-20140508-r12 already installed.
Comment 12 Sander Sweers 2014-07-04 15:16:41 UTC
$genlop -e dev-libs/nss
Wed Apr  9 16:46:42 2014 >>> dev-libs/nss-3.16
Fri Jul  4 15:10:21 2014 >>> dev-libs/nss-3.16.1

$genlop -e app-emulation/emul-linux-x86-baselibs
Thu May 29 21:42:48 2014 >>> app-emulation/emul-linux-x86-baselibs-20140508-r6
Fri Jul  4 17:07:48 2014 >>> app-emulation/emul-linux-x86-baselibs-20140508-r14

I used the workaround from https://bugs.gentoo.org/show_bug.cgi?id=516244#c7
Comment 13 Paolo Pedroni 2014-07-04 16:57:19 UTC
(In reply to Ian Stakenvicius from comment #10)
> OK, I still can't reproduce this.  Could a few of you let me know which
> version of nss was still installed, when the attempts at nss-3.16.1 were
> failing?  Jouni reported 3.16-r1..  It may also be pertinent to know which
> version of emul-linux-x86-baselibs (if any) is or was installed.

dev-libs/nss-3.16-r1
app-emulation/emul-linux-x86-baselibs-20140508-r14
Comment 14 Guy 2014-07-04 17:23:34 UTC
eix dev-libs/nss
[U] dev-libs/nss
     Available versions:  3.15.4^t{tbz2} (~)3.15.5^t{tbz2} 3.16^t{tbz2} (~)3.16.1^t {+cacert +nss-pem utils ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  3.16^t{tbz2}(07:54:37 PM 03/20/2014)(cacert nss-pem utils)
     Homepage:            http://www.mozilla.org/projects/security/pki/nss/
     Description:         Mozilla's Network Security Services library that implements PKI support
Comment 15 Guy 2014-07-04 17:36:32 UTC
Per comment #7, this may or may not mean anything as well:

# ABI_X86="64" emerge -1 dev-libs/nss && ABI_X86="64 32" emerge -1 dev-libs/nss
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-libs/nss-3.16.1::gentoo
>>> Installing (1 of 1) dev-libs/nss-3.16.1
>>> Jobs: 1 of 1 complete                           Load avg: 0.82, 0.63, 0.33
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Calculating dependencies... done!
[ebuild   R    ] dev-libs/nss-3.16.1  ABI_X86="32*" 
[blocks B      ] <=app-emulation/emul-linux-x86-baselibs-20140508-r12 ("<=app-emulation/emul-linux-x86-baselibs-20140508-r12" is blocking dev-libs/nss-3.16.1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (app-emulation/emul-linux-x86-baselibs-20140508-r8:0/0::gentoo, installed) pulled in by
    ~app-emulation/emul-linux-x86-baselibs-20140508 required by (app-emulation/emul-linux-x86-gtklibs-20140508-r1:0/0::gentoo, installed)

  (dev-libs/nss-3.16.1:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-libs/nss-3.15.4[abi_x86_32(-)] required by (www-plugins/adobe-flash-11.2.202.378:0/0::gentoo, installed)
    >=dev-libs/nss-3.16 required by (www-client/seamonkey-2.26:0/0::gentoo, installed)
    >=dev-libs/nss-3.16 required by (www-client/firefox-29.0.1:0/0::gentoo, installed)
    dev-libs/nss required by (www-plugins/adobe-flash-11.2.202.378:0/0::gentoo, installed)                                                                                                
    >=dev-libs/nss-3.14.3:0/0= required by (www-client/chromium-36.0.1985.49:0/0::gentoo, installed)                                                                                      
    >=dev-libs/nss-3.16 required by (mail-client/thunderbird-24.6.0:0/0::gentoo, installed)
    >=dev-libs/nss-3.14.3:= required by (www-client/chromium-36.0.1985.49:0/0::gentoo, installed)
    >=dev-libs/nss-3.12.9 required by (app-office/libreoffice-4.2.4.2:0/0::gentoo, installed)
    >=dev-libs/nss-3.11:0/0= required by (net-misc/networkmanager-0.9.8.10:0/0::gentoo, installed)
    dev-libs/nss
Comment 16 Ben Kohler gentoo-dev 2014-07-04 18:02:52 UTC
A few notes, after some investigation:

1.  This can happen regardless of what emul-linux-x86-* you have installed.  I have reproduced it even without any of those at all.

2.  This happens only when building nss-3.16.1[abi_x86_32,abi_x86_64] while an older version like nss-3.16 is already installed.  If you first disable abi_x86_32 on nss to get it up to 3.16.1, then subsequent builds with abi_x86_64 enabled will work.

Comment #8 seems to be on the right track, but I think it may be header-related.  This bug report has some patches that are applied in 3.16.1, these patches directly affect the code we're seeing errors on:  https://bugzilla.mozilla.org/show_bug.cgi?id=977869

The actual fix here is a bit over my head though.
Comment 17 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-04 19:58:29 UTC
+++ ./ChangeLog
@@ -4,0 +5,3 @@
+  04 Jul 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> nss-3.16.1.ebuild:
+  fixed whatever strange environment issue it was that caused bug 516244
+


So the big thing that was curious to me here is that it would never fail when running 'ebuild /usr/portage/dev-libs/nss/nss-3.16.1.ebuild install' rather than 'emerge -1 nss'.  The only thing I could think of that was different is the way that the environment is built/treated/sandboxed, and although there shouldn't be a difference, perhaps this difference affects how calling tc-export with different values interacts with the environment.

I dropped the tc-export calls in favour of directly calling $(tc-getWHATEVER) when necessary, and it seems we are back to building consistently again.

Fix committed to VCS, please test; if nobody reports any continuing issues I will close the bug.
Comment 18 Torsten Kaiser 2014-07-04 20:13:19 UTC
I doubt the header theory, but agree with the rest of comment #16.

I hit the same error and tried several things to fix it: emul-linux-x86-baselibs was unmerged, because I got file collising when trying to upgrade nspr, so it should really not matter.

I then tried to unmerge nss before retrying to build it again: That still got me the same error. I think because preserve-libs saved the .so's so it could still link against the wrong version. But all headers should have been gone, which very strongly points to the .so and not any header.

According to the release notes from 3.16.1 the function SECMOD_InternalToPubMechFlags is new in that version: That matches this error, because any older .so will not have this function and linking will fail.

OK: The workaround first with ABI_X86="64" then the multilib build just finished successfully for me.
Comment 19 Paolo Pedroni 2014-07-05 16:45:07 UTC
(In reply to Ian Stakenvicius from comment #17)
> Fix committed to VCS, please test; if nobody reports any continuing issues I
> will close the bug.

Whatever you did, it now works. Thanks!
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-06 06:34:15 UTC
(In reply to Ian Stakenvicius from comment #17)
> Fix committed to VCS, please test; if nobody reports any continuing issues I
> will close the bug.

Bad news but with today's morning rsync I'm still having the failure.
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-06 06:35:37 UTC
Created attachment 380288 [details]
dev-libs:nss-3.16.1:20140706-062455.log.lz (for reference)
Comment 22 Paolo Pedroni 2014-07-07 07:41:22 UTC
(In reply to Michał Górny from comment #20)
> (In reply to Ian Stakenvicius from comment #17)
> > Fix committed to VCS, please test; if nobody reports any continuing issues I
> > will close the bug.
> 
> Bad news but with today's morning rsync I'm still having the failure.

With today's morning rsync it worked out fine.
Comment 23 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-07 14:47:23 UTC
(In reply to Michał Górny from comment #21)
> Created attachment 380288 [details]
> dev-libs:nss-3.16.1:20140706-062455.log.lz (for reference)

OK, so the main difference here seems to be that you're using distcc.  We may be able to limit the bug to just that use-case now.  I'll test and see if I can reproduce.
Comment 24 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-07 14:51:09 UTC
last incident report was likely a result of an out-of-date portage tree, so closing bug as fixsed.