Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 588664

Summary: cross-powerpc-e300c3-linux-gnu/gcc-4.9.3 - .../work/gcc-4.9.3/libstdc++-v3/src/c++98/ctype.cc:64:3: internal compiler error: Segmentation fault (USE=vtv)
Product: Gentoo Linux Reporter: Pál Csányi <csanyipal>
Component: Current packagesAssignee: Gentoo Crossdev team <crossdev>
Status: RESOLVED DUPLICATE    
Severity: normal CC: awilfox.gentoo, csanyipal, nbowler
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 627914    
Attachments: emerge--info
emerge -pqv
1. part of build.log
2. part of build.log
3. part of build.log
4. part of build.log
5. part of build.log
Relevant log from build.log (each segfault encountered on make -j4)
GDB backtrace

Description Pál Csányi 2016-07-12 09:02:42 UTC
Created attachment 440426 [details]
emerge--info

Hi,
I try to update my system with
eix-sync
emerge --update --deep --with-bdeps=y --newuse @world

on my Linux 4.4.4-gentoo #3 SMP Mon Mar 14 20:54:16 CET 2016 x86_64 Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz GenuineIntel GNU/Linux

but get an ERROR:
 * Messages for package cross-powerpc-e300c3-linux-gnu/gcc-4.9.3:

 * ERROR: cross-powerpc-e300c3-linux-gnu/gcc-4.9.3::gentoo-b2 failed (compile phase):
 *   emake failed

Is this a bug?
Comment 1 Pál Csányi 2016-07-12 09:03:14 UTC
Created attachment 440428 [details]
emerge -pqv
Comment 2 Pál Csányi 2016-07-12 09:05:14 UTC
The build.log is too big to attach it here.
Comment 3 Pál Csányi 2016-07-13 07:32:29 UTC
Created attachment 440548 [details]
1. part of build.log
Comment 4 Pál Csányi 2016-07-13 07:33:12 UTC
Created attachment 440550 [details]
2. part of build.log
Comment 5 Pál Csányi 2016-07-13 07:33:46 UTC
Created attachment 440552 [details]
3. part of build.log
Comment 6 Pál Csányi 2016-07-13 07:34:20 UTC
Created attachment 440554 [details]
4. part of build.log
Comment 7 Pál Csányi 2016-07-13 07:34:55 UTC
Created attachment 440556 [details]
5. part of build.log
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2016-07-16 06:25:16 UTC
(In reply to Pál Csányi from comment #2)
> The build.log is too big to attach it here.

Use compression next time, please.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2016-07-16 06:37:00 UTC
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/work/gcc-4.9.3/libstdc++-v3/src/c++98/ctype.cc: In member function ‘void std::ctype<char>::_M_narrow_
init() const’:
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/work/gcc-4.9.3/libstdc++-v3/src/c++98/ctype.cc:64:3: internal compiler error: Segmentation fault
   ctype<char>::
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
Makefile:534: recipe for target 'ctype.lo' failed
make[5]: *** [ctype.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2016-07-16 06:37:44 UTC
You ran out of memory.
Comment 11 Pál Csányi 2016-07-16 09:25:47 UTC
(In reply to Jeroen Roovers from comment #10)
> You ran out of memory.

How could it be?
This happen on Acer Aspire V3-571 laptop with 4GB of RAM?
Comment 12 Pál Csányi 2016-07-16 09:39:32 UTC
How much RAM memory is needed to compile this package successfully?
Comment 13 SpanKY gentoo-dev 2016-07-20 04:42:39 UTC
look in `dmesg` to see if you ran out of memory

try building with USE=-vtv to see if that helps
Comment 14 Pál Csányi 2016-07-27 17:55:10 UTC
dmesg -w does no show any message and especially no out of memory message.

Just installed 4GB RAM more so I have the maximum installable 8GB of RAM on this laptop: Acer Aspire V3-571.

I just tried to build the package with USE=-vtv but get the same message:
>>> Failed to emerge cross-powerpc-e300c3-linux-gnu/gcc-4.9.3, Log file:

>>>  '/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/temp/build.log'

 * Messages for package cross-powerpc-e300c3-linux-gnu/gcc-4.9.3:

 * ERROR: cross-powerpc-e300c3-linux-gnu/gcc-4.9.3::gentoo-b2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=cross-powerpc-e300c3-linux-gnu/gcc-4.9.3::gentoo-b2'`,
 * the complete build log and the output of `emerge -pqv '=cross-powerpc-e300c3-linux-gnu/gcc-4.9.3::gentoo-b2'`.
 * The complete build log is located at '/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/temp/environment'.
 * Working directory: '/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/work/build'
 * S: '/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/work/gcc-4.9.3'
 * 
 * Please include /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-4.9.3/work/gcc-build-logs.tar.bz2 in your bug report.

So what is this? 8GB of RAM is not enough?

What can I do next to solve this problem?
Comment 15 A. Wilcox (awilfox) 2016-11-27 20:49:26 UTC
The issue is USE=vtv.  I can reliably cause multiple segmentation faults building a GCC targeted for PowerPC (crossdev or native) when USE=vtv is enabled.  Disabling it fixes the issue.

I'm not sure if a use mask would be feasible since there are many different triplets for PowerPC crossdev.  Perhaps an ewarn on use vtv && (use ppc || use ppc64 || (is_crosscompile && [[ ${CTARGET} == powerpc* ]])) or such.
Comment 16 A. Wilcox (awilfox) 2016-11-27 20:50:22 UTC
Created attachment 454562 [details]
Relevant log from build.log (each segfault encountered on make -j4)
Comment 17 A. Wilcox (awilfox) 2016-11-27 20:51:40 UTC
Created attachment 454564 [details]
GDB backtrace
Comment 18 m.manico 2017-08-19 15:09:16 UTC
I seem to be hit by this issue when cross-compiling on amd64 for arm7v. Most notably, it took me to set "make -j1" to finally get some helpful output:

<snip>
vtv_start.c:56:1: warning: constructor priorities from 0 to 100 are reserved for the implementation
 {
 ^
vtv_start.c:64:3: internal compiler error: Segmentation fault
   = { };
   ^
Please submit a full bug report,...
</snip>
Comment 19 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-28 18:57:00 UTC

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