Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646512 - sys-devel/gcc-6.4.0-r1: internal compiler error: Segmentation fault w/ g++-v6/ext/alloc_traits.h (was: sys-devel/clang-5.0.1)
Summary: sys-devel/gcc-6.4.0-r1: internal compiler error: Segmentation fault w/ g++-v6...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-03 20:30 UTC by Porcupine of the Moon
Modified: 2018-02-11 13:17 UTC (History)
2 users (show)

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


Attachments
emerge-info (emerge-info,7.23 KB, text/plain)
2018-02-03 20:30 UTC, Porcupine of the Moon
Details
emerge -pqv (emerge-pqv,302 bytes, text/plain)
2018-02-03 20:31 UTC, Porcupine of the Moon
Details
build.log (build.log,234.43 KB, text/plain)
2018-02-03 20:32 UTC, Porcupine of the Moon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Porcupine of the Moon 2018-02-03 20:30:56 UTC
Created attachment 517680 [details]
emerge-info

sys-devel/clang-5.0.1 fails to build. internal compiler error: Segmentation fault

Please see the attachments.
Comment 1 Porcupine of the Moon 2018-02-03 20:31:23 UTC
Created attachment 517682 [details]
emerge -pqv
Comment 2 Porcupine of the Moon 2018-02-03 20:32:33 UTC
Created attachment 517684 [details]
build.log
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 16:39:07 UTC
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_construct.h:61:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/memory:64,
                 from /usr/lib64/llvm/5/include/llvm/Support/Casting.h:21,
                 from /var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/include/clang/Basic/LLVM.h:22,
                 from /var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/include/clang/Basic/IdentifierTable.h:19,
                 from /var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/include/clang/AST/DeclarationName.h:16,
                 from /var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/include/clang/AST/ODRHash.h:16,
                 from /var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/lib/AST/ODRHash.cpp:16:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/ext/alloc_traits.h: In instantiation of ‘struct __gnu_cxx::__alloc_traits<std::allocator<clang::RawComment*> >’:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_vector.h:75:28:   required from ‘struct std::_Vector_base<clang::RawComment*, std::allocator<clang::RawComment*> >’
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_vector.h:214:11:   required from ‘class std::vector<clang::RawComment*>’
/var/tmp/portage/sys-devel/clang-5.0.1/work/x/y/cfe-5.0.1.src/include/clang/AST/RawCommentList.h:194:29:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/ext/alloc_traits.h:60:53: internal compiler error: Segmentation fault
     typedef typename _Base_type::const_pointer      const_pointer;
                                                     ^~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-05 18:28:55 UTC
Please check dmesg for any indications that you might have run out of memory. Also, I don't think it causes any harm here but it is generally a good idea to run emerge in a directory that is guaranteed to exist throughout the build.
Comment 5 Porcupine of the Moon 2018-02-05 19:54:07 UTC
I don't think it's a memory problem. I have 16GB RAM and about 10GB free disk space on /. Didn't find something related with dmesg either. But as an update: I managed to build clang after removing the by default activated llvm_targets_AMDGPU llvm_targets_BPF llvm_targets_NVPTX. I don't need them since I have Intel graphics.

However, I have a suspicion that something might not be alright with my compiler: Also firefox-58.0.1 fails to build. Here without any error message. 

Similar problim with net-libs/webkit-gtk-2.18.6:
Here build stops with 
"/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/unique_ptr.h:210:78: internal compiler error: Segmentation fault
       : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { }"

and 

"ERROR: net-libs/webkit-gtk-2.18.6::gentoo failed (compile phase):
ninja -v -j5 -l0 failed"

Also libreoffice-5.4.4.2 fails to build with;

"Internal error (Segmentation fault)."

Do you have any idea what I can do?
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-05 20:10:07 UTC
Yes, looks like you have a serious compiler problem. For the record, I'm using the same version without issues. Reassigning to the relevant experts.
Comment 7 Porcupine of the Moon 2018-02-11 13:17:55 UTC
Problem solved: Turns out there was a gcc update I overlooked.
After 

emerge --ask --oneshot sys-devel/libtool

and 

revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

the segmentation faults disappeared and I was able to build everything without errors.