Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 336712 - net-libs/xulrunner-1.9.2.9 fails w/ undefined reference to `std::__throw_bad_alloc()' when gcc is built with -Wmissing-include-dirs
Summary: net-libs/xulrunner-1.9.2.9 fails w/ undefined reference to `std::__throw_bad_...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-10 10:55 UTC by Justin Lecher (RETIRED)
Modified: 2012-07-04 07:42 UTC (History)
1 user (show)

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


Attachments
build.log (xulrunner-1.9.2.9-r1:20100920-083126.log.gz,233.88 KB, application/octet)
2010-09-20 10:14 UTC, Justin Lecher (RETIRED)
Details
Package list (packages,32.17 KB, text/plain)
2010-09-20 10:17 UTC, Justin Lecher (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2010-09-10 10:55:03 UTC
../staticlib/components/libremoteservice.a ../../staticlib/components/libspellchecker.a ../../staticlib/components/libzipwriter.a ../../staticlib/libdomplugins_s.a ../../staticlib/libmozipc_s.a ../../staticlib/libmozipdlgen_s.a ../../staticlib/libchromium_s.a ../../staticlib/libgfxipc_s.a ../../staticlib/libxpcom_core.a ../../staticlib/libucvutil_s.a ../../staticlib/libgkgfx.a ../../staticlib/libmozreg_s.a ../../staticlib/libmorkreader_s.a ../../staticlib/libgtkxtbin.a ../../staticlib/libgfxpsshar.a ../../staticlib/libthebes.a  ../../extensions/java/xpcom/src/libjavaxpcom.a -Wl,--no-whole-archive -lsqlite3   -L../../dist/bin -L../../dist/lib  -L../../dist/bin -L../../dist/lib -ljpeg  -L../../modules/libimg/png -lmozpng ../../gfx/qcms/libmozqcms.a -L/var/tmp/portage/net-libs/xulrunner-1.9.2.9/work/mozilla-1.9.2/dist/bin -lmozjs -Wl,-R/usr/lib64 -L/usr/lib64 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lcrmf -lcairo -lpixman-1 -lfreetype -lfontconfig    -L/usr/lib64 -lXrender -lcairo -lX11    -lz  -lhunspell-1.2   -L/usr/lib -levent -Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -pthread -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   -L/usr/lib64 -lX11  -lXext  -pthread -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -pthread -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lXt -lgthread-2.0 -lfreetype -lz -lstartup-notification-1   -lasound -ldl -lm  -lrt    
../../staticlib/libdomplugins_s.a(PluginProcessParent.o): In function `std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_allocate(unsigned long)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
../../staticlib/libdomplugins_s.a(PluginThreadChild.o): In function `std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_allocate(unsigned long)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
../../staticlib/libmozipc_s.a(GeckoChildProcessHost.o): In function `RunnableMethod':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
../../staticlib/libmozipc_s.a(GeckoChildProcessHost.o): In function `std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_allocate(unsigned long)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
../../staticlib/libmozipc_s.a(RPCChannel.o):/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/ext/new_allocator.h:87: more undefined references to `std::__throw_bad_alloc()' follow
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: libxul.so: hidden symbol `std::__throw_bad_alloc()' isn't defined
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[3]: *** [libxul.so] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.2.9/work/mozilla-1.9.2/toolkit/library'
make[2]: *** [libs_tier_toolkit] Error 2
make[2]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.2.9/work/mozilla-1.9.2'
make[1]: *** [tier_toolkit] Error 2
make[1]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.2.9/work/mozilla-1.9.2'
make: *** [default] Error 2
emake failed
 * ERROR: net-libs/xulrunner-1.9.2.9 failed:
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 7600:  Called _eapi2_src_compile
 *     ebuild.sh, line  662:  Called die



$ einfo =net-libs/xulrunner-1.9.2.9
Portage 2.2_rc78 (default/linux/amd64/10.0, gcc-4.4.4-asneeded, glibc-2.12.1-r1, 2.6.35-gentoo-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.35-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 10 Sep 2010 08:30:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.67
sys-devel/automake:  1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wmissing-prototypes -Wno-pointer-sign"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/hddtemp/ /usr/share/nano /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wenum-compare -Wno-invalid-offsetof"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--verbose --jobs=12 --load-average=8 --keep-going -t"
FEATURES="assume-digests buildsyspkg ccache collision-protect distlocks fixlafiles fixpackages multilib-strict news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g"
GENTOO_MIRRORS=" 	ftp://ftp.gentoo.mesh-solutions.com/gentoo/ 	ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ 	ftp://de-mirror.org/distro/gentoo/ 	ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu,--sort-common"
LINGUAS="en"
MAKEOPTS="-j6 -l8"
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="/data/layman/sunrise /data/layman/science /data/local/portage-overlay /data/local/dummy"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X acl acpi additions alsa amd64 apbs automount bash-completion berkdb blas branding bzip2 cairo cblas cleartype cli cracklib cups custom-optimization cxx dbus deprecated discouraged double-precision dri dts dvdr emboss fastcgi fbcon fbcondecor fbsplash fftw fortran gd gdbm gecko gif glibc-omitfp gmp gnome gnome-keyring gpm grub gtk hddtemp icc iconv ifc imlib java javascript jpeg lapack largefile ldap libsexy libv4l2 lm_sensors md5sum mmap mmx mmxext modules mp3 mudflap multicall multilib multiprocess multiuser nano-syntax ncurses network-cron networking nls nptl nptlonly nsplugin numpy nvidia opengl openmp openssl optimize-cflags pam pcre perl png pppd pymol python qt-static qt3support readline reflection rrdcgi rtsp sdl sensord session smp sse sse2 ssl ssse3 startup-notification svg svgz swat sysfs system-sqlite tcpd tiff truetype type1 unicode v4l v4l2 vorbis x264 xcb xcomposite xinerama xorg xulrunner zlib" ALSA_CARDS="hda-intel" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia v4l" 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
Comment 1 Jory A. Pratt gentoo-dev 2010-09-11 17:15:28 UTC
If you can produce with ccache disable feel free to reopen.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2010-09-11 18:38:58 UTC
Same w/o ccache.
Comment 3 Jory A. Pratt gentoo-dev 2010-09-16 03:56:33 UTC
(In reply to comment #2)
> Same w/o ccache.
> 

Okay Just, I have been unable to catch up with you on irc, so here we are. If you could test with simplier CFLAGS would be appreciated, I have yet been able to hit the error even using make-3.82 with gcc-4.5.1.

CFLAGS="-O2 -march=core2 -msse3 -pipe" something along those lines would work, after that just a matter of adding yours back one at a time to find which one is actually breaking the build.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2010-09-19 20:39:48 UTC
I really tried everything, but nothing worked. Any idea what can be the cause to this error?
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 10:14:41 UTC
Created attachment 248104 [details]
build.log
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 10:17:35 UTC
Created attachment 248106 [details]
Package list

I can reproduce it on all machines, which have similar setups. Perhaps you find some hints in my package list.
Comment 7 Jory A. Pratt gentoo-dev 2010-09-22 00:17:49 UTC
(In reply to comment #6)
> Created an attachment (id=248106) [details]
> Package list
> 
> I can reproduce it on all machines, which have similar setups. Perhaps you find
> some hints in my package list.
> 

Can you recompile gcc and retest with ipc enabled. This appears to be related to a binutils update without recompiling the compiler to update the abi in libstdc++-v3 which would result in the undefined reference to `std::__throw_bad_alloc()'
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2010-09-22 14:08:45 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=248106) [details] [details]
> > Package list
> > 
> > I can reproduce it on all machines, which have similar setups. Perhaps you find
> > some hints in my package list.
> > 
> 
> Can you recompile gcc and retest with ipc enabled. This appears to be related
> to a binutils update without recompiling the compiler to update the abi in
> libstdc++-v3 which would result in the undefined reference to
> `std::__throw_bad_alloc()'
> 

No change, any other package to recompile?
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2011-01-05 14:58:34 UTC
Probably I found the reason:
Compiling gcc-4.5.2 with

CFLAGS="-march=native -O2 -pipe -Wmissing-include-dirs"
CXXFLAGS="-march=native -O2 -pipe -Wmissing-include-dirs"

makes xulrunner fail. Compiling gcc w/o the warning lets xulrunner compile.
Comment 10 Cyprien Nicolas (fulax) 2011-01-05 16:46:12 UTC
Reproducible here, rebuiling sys-devel/gcc-4.5.2 with jlec's CFLAGS, rebuilding toolchain and then xulrunner-1.9.2.

xulrunner-2.0 is not affected.
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2011-01-14 12:56:16 UTC
@toolchain
What Is your opinion on that? What Kind of test do you need?

Warning flags should not break the compiler.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2011-01-14 22:39:24 UTC
Let me make sure I have this right:

build gcc w/ CFLAGS including "-Wmissing-include-dirs"
build xulrunner-1.9 w/ any CFLAGS = error
?

What about before with 4.4.4?  Did you build with -Wmissing-include-dirs then?  I don't see it in your CFLAGS.
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2011-01-15 00:16:39 UTC
Reproduced.
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2011-01-15 09:08:53 UTC
(In reply to comment #13)
> Reproduced.
> 

so you need some additional info? gcc-4.4 was also affected.
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2011-01-16 05:53:55 UTC
No, that's all I need.  I have no idea how to start debugging this though.
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2011-01-16 10:24:27 UTC
(In reply to comment #15)
> No, that's all I need.  I have no idea how to start debugging this though.
> 

I hit another interesting bug with mozilla products and gcc, where we also think it is the compiler rather then the package, #346821
Comment 17 Jory A. Pratt gentoo-dev 2011-10-31 21:46:42 UTC
toolchain issue nothing to do with mozilla.
Comment 18 SpanKY gentoo-dev 2011-11-20 05:47:06 UTC
(In reply to comment #7)

binutils should not affect the libstdc++ ABI

(In reply to comment #15)

what are the symbols in your libstdc++.so ?

$ readelf -sW libstdc++.so | c++filt | grep __throw_bad_alloc
   479: 000000000006a970    50 FUNC    GLOBAL DEFAULT   12 std::__throw_bad_alloc()@@GLIBCXX_3.4
Comment 19 SpanKY gentoo-dev 2011-11-20 05:48:06 UTC
(In reply to comment #11)

some configure tests can be affected by warning flags.  not terribly unusual.
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2012-07-04 07:42:02 UTC
net-libs/xulrunner was punted from tree wrt bug 403415 so closing this bug too.