Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 534082 - lxqt-base/liblxqt-mount-0.7.0 - ld: /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local': (.text+0x11): undefined reference to `__stack_chk_fail'
Summary: lxqt-base/liblxqt-mount-0.7.0 - ld: /usr/lib/libc_nonshared.a(stack_chk_fail_...
Status: RESOLVED DUPLICATE of bug 503500
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: LxQt maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-31 10:26 UTC by Maxim Mikityanskiy
Modified: 2015-09-25 04:30 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,14.43 KB, text/plain)
2014-12-31 10:26 UTC, Maxim Mikityanskiy
Details
emerge.info (emerge.info,4.75 KB, text/plain)
2014-12-31 10:27 UTC, Maxim Mikityanskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Mikityanskiy 2014-12-31 10:26:57 UTC
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.
Comment 1 Maxim Mikityanskiy 2014-12-31 10:27:19 UTC
Created attachment 392746 [details]
emerge.info
Comment 2 SpanKY gentoo-dev 2015-09-18 19:16:23 UTC
please try upgrading to binutils-2.25.1-r1
Comment 3 Alexander Tsoy 2015-09-25 00:20:55 UTC
I reproduced this issue with binutils-2.24-r3 in 32-bit chroot. Upgrade to binutils-2.25.1-r1 fixed it.
Comment 4 SpanKY gentoo-dev 2015-09-25 04:30:19 UTC

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