Created attachment 392744 [details] build.log Similar bug with different package: https://bugs.gentoo.org/show_bug.cgi?id=528742 When building lxqt-base/liblxqt-mount with gcc 4.9.2 on i686, I get the following error: /usr/lib/ccache/bin/i686-pc-linux-gnu-g++ -fPIC -O3 -march=native -pipe -fomit-frame-pointer -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wl,-no-undefined -Wall -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,liblxqtmount.so.0 -o liblxqtmount.so.0.7.0 CMakeFiles/lxqtmount.dir/lxqtmount.cpp.o CMakeFiles/lxqtmount.dir/rzmountproviders.cpp.o CMakeFiles/lxqtmount.dir/rzmountproviders_udisks2.cpp.o CMakeFiles/lxqtmount.dir/moc_lxqtmount.cxx.o CMakeFiles/lxqtmount.dir/moc_rzmountproviders.cxx.o /usr/lib/qt4/libQtCore.so /usr/lib/qt4/libQtGui.so /usr/lib/qt4/libQtDBus.so -llxqt -Wl,-rpath,/usr/lib/qt4: /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local': (.text+0x11): undefined reference to `__stack_chk_fail' collect2: error: ld returned 1 exit status CMakeFiles/lxqtmount.dir/build.make:198: recipe for target 'liblxqtmount.so.0.7.0' failed The same result reproduces even without ccache. Other libraries, e.g. lxqt-globalkeys, build fine, maybe -Wl,-no-undefined causes liblxqt-mount to fail. I found a workaround: if I remove -Wl,--as-needed from LDFLAGS, liblxqt-mount builds successfully. I don't understand this behavior, seems that ld erroneously omits libc.so with --as-needed, but libc.so is really needed for __stack_chk_fail. My binutils version is 2.24-r3, glibc is 2.20-r1.
Created attachment 392746 [details] emerge.info
please try upgrading to binutils-2.25.1-r1
I reproduced this issue with binutils-2.24-r3 in 32-bit chroot. Upgrade to binutils-2.25.1-r1 fixed it.
*** This bug has been marked as a duplicate of bug 503500 ***