Created attachment 517680 [details] emerge-info sys-devel/clang-5.0.1 fails to build. internal compiler error: Segmentation fault Please see the attachments.
Created attachment 517682 [details] emerge -pqv
Created attachment 517684 [details] build.log
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.
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.
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?
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.
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.