Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513846 - =cross-x86_64-w64-mingw32/gcc-4.8.3 - libstdc++-v3/libsupc++/cp-demangle.c:3932: undefined reference to `__stack_chk_guard'
Summary: =cross-x86_64-w64-mingw32/gcc-4.8.3 - libstdc++-v3/libsupc++/cp-demangle.c:39...
Status: RESOLVED DUPLICATE of bug 513706
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 12:14 UTC by Bertrand Jacquin
Modified: 2014-07-09 15:58 UTC (History)
0 users

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


Attachments
build.log (build.log.xz,44.77 KB, application/x-xz)
2014-06-19 12:15 UTC, Bertrand Jacquin
Details
emerge --info (info.log,17.32 KB, text/x-log)
2014-06-19 12:15 UTC, Bertrand Jacquin
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,124.77 KB, application/x-bzip)
2014-06-19 13:26 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2014-06-19 12:14:59 UTC
When upgrading a crossdev toolchain from gcc-4.8.2 to gcc-4.8.3, the following error occur :

# emerge -uva1t =cross-x86_64-w64-mingw32/gcc-4.8.3
(..)
Calculating dependencies... done!
[ebuild     U  ] cross-x86_64-w64-mingw32/gcc-4.8.3:4.8::x-portage [4.8.2:4.8::x-portage] USE="cxx nptl openmp (-altivec) -awt -doc (-fixed-point) -fortran -gcj -go -graphite -hardened -libssp -mudflap -multilib -multislot -nls -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 0 kB
(..)
libtool: link:  /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/./gcc -nostdinc++ -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include    -shared -nostdlib /usr/x86_64-w64-mingw32/lib/dllcrt2.o /usr/x86_64-w64-mingw32/lib/crtbegin.o  .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o  -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive  -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/./gcc -L/usr/x86_64-w64-mingw32/bin -L/usr/x86_64-w64-mingw32/mingw/lib/../lib -L/usr/x86_64-w64-mingw32/mingw/lib -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt /usr/x86_64-w64-mingw32/lib/crtend.o  -Wl,-O1 -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver   -o .libs/libstdc++-6.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libstdc++.dll.a
../libsupc++/.libs/libsupc++convenience.a(cp-demangle.o): In function `d_print_comp':
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:3932: undefined reference to `__stack_chk_guard'
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:4935: undefined reference to `__stack_chk_guard'
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:4935: undefined reference to `__stack_chk_fail'
../libsupc++/.libs/libsupc++convenience.a(cp-demangle.o): In function `d_print_mod_list':
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:4995: undefined reference to `__stack_chk_guard'
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:5079: undefined reference to `__stack_chk_guard'
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/cp-demangle.c:5079: undefined reference to `__stack_chk_fail'
../libsupc++/.libs/libsupc++convenience.a(cp-demangle.o): In function `d_demangle_callback':
(..)
collect2: error: ld returned 1 exit status
Makefile:545: recipe for target 'libstdc++.la' failed
make[5]: *** [libstdc++.la] Error 1
make[5]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src'
Makefile:575: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3/src'
Makefile:480: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3'
Makefile:386: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build/x86_64-w64-mingw32/libstdc++-v3'
Makefile:9222: recipe for target 'all-target-libstdc++-v3' failed
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.8.3/work/build'
Makefile:851: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: cross-x86_64-w64-mingw32/gcc-4.8.3::x-portage failed (compile phase):
 *   emake failed

Attached full log and emerge --info

Reproducible: Always
Comment 1 Bertrand Jacquin 2014-06-19 12:15:28 UTC
Created attachment 379242 [details]
build.log
Comment 2 Bertrand Jacquin 2014-06-19 12:15:40 UTC
Created attachment 379244 [details]
emerge --info
Comment 3 Bertrand Jacquin 2014-06-19 13:26:02 UTC
Created attachment 379254 [details]
gcc-build-logs.tar.bz2
Comment 4 Bertrand Jacquin 2014-06-19 13:26:35 UTC
Note that almost the same apply for =cross-i686-w64-mingw32/gcc-4.8.3
Comment 5 SpanKY gentoo-dev 2014-06-19 21:47:19 UTC
we probably need to restrict the auto-ssp logic to known targets only, like linux and freebsd
Comment 6 Bernd Feige 2014-06-23 15:39:18 UTC
Same here with i686-w64-mingw32, x86_64-w64-mingw32 or i686-pc-mingw32 - note that https://bugs.gentoo.org/show_bug.cgi?id=513706 is related. The problem appears to be that most of gcc is built with -fno-stack-protector flag (unconditionally, not considering settings in /usr/i686-w64-mingw32/etc/portage/make.conf) and then some library functions are built without the -fno-stack-protector flag which now leads to the reported problem because -fstack-protector is default.
Comment 7 SpanKY gentoo-dev 2014-06-24 21:29:50 UTC

*** This bug has been marked as a duplicate of bug 513706 ***