Summary: | sys-devel/gcc-5.4.0-r3 fails to build - libgomp/task.c:115:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Zhu Sha Zang <zhushazang> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, jstein, kensington, leio, slyfox |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=667104 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 260867 | ||
Attachments: |
Build Log
Environment Gcc build log asked by emerge Information pqv return |
Description
Zhu Sha Zang
2017-06-08 01:57:01 UTC
Created attachment 475576 [details]
Build Log
Created attachment 475578 [details]
Environment
Created attachment 475580 [details]
Gcc build log asked by emerge
Created attachment 475582 [details]
Information
Created attachment 475584 [details]
pqv return
Does it work if you remove -Wstack-protector from CFLAGS? Yeah, worked. I was able to compile til the end. But why. If you don't mind, can you explain what happened here? Best regards. Looking at the last error in the log: checking for inttypes.h... /var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/task.c: In function ‘GOMP_task’: /var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/task.c:115:1: error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector] GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *), Then a few lines later: checking for stdint.h... libtool: compile: /var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/build/./gcc/xgcc -B/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-l inux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp -I/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/config/linux/x86 -I/var/tmp/notmpfs/portag e/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/config/linux -I/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/config/posix -I/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp -I/var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/w ork/gcc-5.4.0/libgomp/../include -Wall -Werror -pthread -ftls-model=initial-exec -g -march=core2 -mtune=generic -O2 -pipe -Wstack-protector -MT work.lo -MD -MP -MF .deps/work.Tpo -c /var/tmp/notmpfs/portage/sys-devel/gcc-5.4.0-r3/work/gcc-5.4.0/libgomp/work.c -o work.o > /dev/null 2>&1 yes checking for unistd.h... cc1: all warnings being treated as errors So, the combination of -Wstack-protector in your CFLAGS (enabling stack-protector warnings) and -Werror from the build system (treat all warnings as fatal errors) causes the build failure. Marking as a blocker of bug #260867, as we don't normally permit -Werror in our build systems. *** This bug has been marked as a duplicate of bug 618426 *** Re-opening for reconsideration in light of https://wiki.gentoo.org/wiki/Project:Toolchain/Support_policies I guess this is an edge case from additional warnings being added by user CFLAGS. I broke it in bug #581406 and I'll fix it. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c84f250076a6a6f33202c022a256b34284d91111 commit c84f250076a6a6f33202c022a256b34284d91111 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-10-27 19:17:52 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-10-27 19:21:54 +0000 sys-devel/gcc: cut 1.11 patchset for 5.4.0 Eight new patches: + 99_all_remove-lieee.patch: drop assumed -lieee from -mieee-fp + 100_all_libgfortran-Werror.patch: + 101_all_libgomp-Werror.patch + 102_all_libitm-Werror.patch + 103_all_libatomic-Werror.patch + 104_all_libbacktrace-Werror.patch + 105_all_libsanitizer-libbacktrace-Werror.patch: pull in all -Werror patches from 8.2.0 + 106_all_libstdcxx-no-vtv.patch: drop libvtv RPATH from libstdc++ Bug: https://bugs.gentoo.org/667104 Bug: https://bugs.gentoo.org/475350 Bug: https://bugs.gentoo.org/229059 Bug: http://gcc.gnu.org/PR38436 Bug: https://bugs.gentoo.org/433435 Bug: http://gcc.gnu.org/PR54724 Bug: https://bugs.gentoo.org/582524 Bug: https://gcc.gnu.org/PR85884 Closes: https://bugs.gentoo.org/621178 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-5.4.0-r6.ebuild | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) |