Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457062 - =sys-devel/gcc-4.6.3 on sparc - /work/gcc-4.6.3/libiberty/make-relative-prefix.c:199:1: internal compiler error: Segmentation fault
Summary: =sys-devel/gcc-4.6.3 on sparc - /work/gcc-4.6.3/libiberty/make-relative-prefi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.6-stable
  Show dependency tree
 
Reported: 2013-02-13 10:38 UTC by Agostino Sarubbo
Modified: 2013-11-07 03:22 UTC (History)
5 users (show)

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


Attachments
build log (gcc-4.6.3:20130213-101229.log,930.72 KB, text/plain)
2013-02-13 10:38 UTC, Agostino Sarubbo
Details
jmorgan_build_log (gcc-4.6.3.log.tgz,63.62 KB, application/x-gzip-compressed-tar)
2013-05-08 03:55 UTC, Jack Morgan (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-02-13 10:38:58 UTC
Created attachment 338760 [details]
build log

This seems strange but when I committed the stable keyword worked for me.


Portage 2.1.11.31 (default/linux/sparc/13.0, gcc-4.5.4, glibc-2.15-r3, 2.6.39.4 sparc64)                                                                                            
=================================================================                                                                                                                   
System uname: Linux-2.6.39.4-sparc64-sun4v-with-gentoo-2.1                                                                                                                          
Timestamp of tree: Wed, 13 Feb 2013 03:00:01 +0000                                                                                                                                  
ld GNU ld (GNU Binutils) 2.22                                                                                                                                                       
app-shells/bash:          4.2_p37                                                                                                                                                   
dev-lang/python:          2.7.3-r2, 3.2.3                                                                                                                                           
dev-util/cmake:           2.8.9                                                                                                                                                     
dev-util/pkgconfig:       0.28                                                                                                                                                      
sys-apps/baselayout:      2.1-r1                                                                                                                                                    
sys-apps/openrc:          0.11.8                                                                                                                                                    
sys-apps/sandbox:         2.5                                                                                                                                                       
sys-devel/autoconf:       2.13, 2.69                                                                                                                                                
sys-devel/automake:       1.9.6-r3, 1.11.6                                                                                                                                          
sys-devel/binutils:       2.22-r1                                                                                                                                                   
sys-devel/gcc:            4.5.4                                                                                                                                                     
sys-devel/gcc-config:     1.7.3                                                                                                                                                     
sys-devel/libtool:        2.4-r1                                                                                                                                                    
sys-devel/make:           3.82-r4                                                                                                                                                   
sys-kernel/linux-headers: 3.6 (virtual/os-headers)                                                                                                                                  
sys-libs/glibc:           2.15-r3                                                                                                                                                   
Repositories: gentoo                                                                                                                                                                
ACCEPT_KEYWORDS="sparc"                                                                                                                                                             
ACCEPT_LICENSE="*"                                                                                                                                                                  
CBUILD="sparc-unknown-linux-gnu"                                                                                                                                                    
CFLAGS="-O2 -mcpu=ultrasparc -pipe"                                                                                                                                                 
CHOST="sparc-unknown-linux-gnu"                                                                                                                                                     
CONFIG_PROTECT="/etc"                                                                                                                                                               
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/usr/portage/distfiles/"
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going y -1"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j24"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl berkdb bzip2 cli cracklib crypt cxx dri fortran gcc64 gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre readline session sparc ssl tcpd unicode zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU"
USE_PYTHON="2.7 3.2"
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2013-02-14 01:05:50 UTC
Can you build 4.5 with the 4.6 compiler?
Comment 2 Agostino Sarubbo gentoo-dev 2013-02-14 14:09:17 UTC
(In reply to comment #1)
> Can you build 4.5 with the 4.6 compiler?

For some reason now I have only 4.5.4 and with it, I can't build 4.6.3
Comment 3 Agostino Sarubbo gentoo-dev 2013-03-12 11:50:03 UTC
The sparc team decided to move it back to ~arch.
Comment 4 seraph@xs4all.nl 2013-03-16 18:06:53 UTC
I see you're using a sun4v system.  On my T2000, gcc will only build properly if I use "MAKEOPTS=-j1".  I don't have that issue with any other packages.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2013-03-16 21:06:35 UTC
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/libiberty/make-relative-prefix.c: In function ‘split_directories’:
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/libiberty/make-relative-prefix.c:199:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

To get the preprocessed source, add -save-temps to the failing compiler line and attach the .i file it produces.
Comment 6 Agostino Sarubbo gentoo-dev 2013-03-17 08:31:51 UTC
(In reply to comment #4)
> I see you're using a sun4v system.  On my T2000, gcc will only build
> properly if I use "MAKEOPTS=-j1".  I don't have that issue with any other
> packages.

@dirtyepic: Jos is right, with makeopts = -j1 it works.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2013-03-17 09:21:03 UTC
It's strange that an ICE could be triggered by something like that though.  In any case we still need the preprocessed code so we have a self-contained testcase to reliably reproduce this.

Or are you saying that when you run the command on its own it works?
Comment 8 Jack Morgan (RETIRED) gentoo-dev 2013-04-14 13:50:43 UTC
I'm able to reproduce this bug when MAKEOPTS is greater than (see comment #4). For example, gcc-4.5.4 merges gcc-4.6.3. On another system, gcc-4.6.3 was able to merge gcc-4.6.3 with MAKEOPTS=j3.

I'm also able to remerge world with gcc-4.6.3. I suggest closing this bug.
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2013-04-23 05:28:57 UTC
I'm confused.  You can or can't reproduce a build failure with higher than -j1?
Comment 10 Jack Morgan (RETIRED) gentoo-dev 2013-05-08 02:24:56 UTC
If you have gcc-4.5.4 (latest stable) and try to upgrade to gcc-4.6.3 with MAKEOPTS higher then -j1 it will fail. I was able to reproduce this defect. If you change MAKEOPTS=-j1, you can upgrade to gcc-4.6.3.

In addition, I was able to remerge gcc-4.6.3 with gcc-4.6.3 with MAKEOPTS=-j3 as well as remerge world with gcc-4.6.3. 

In summary, this defect is only present in gcc-4.5.4 based on my testing.
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2013-05-08 02:50:25 UTC
That's weird because I have seen reports of the opposite.  It's probably a transient parallel build issue.  Ago offered me access to a sparc machine but I just haven't had time to look into it.  Maybe we should just force -j1 on sparc for 4.5/4.6 for now and see if it crops up again later.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2013-05-08 02:52:30 UTC
Btw, did it fail at the same point (libiberty/make-relative-prefix.c)?  One report I saw failed somewhere else.
Comment 13 Jack Morgan (RETIRED) gentoo-dev 2013-05-08 03:53:08 UTC
no, it fails here...

/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/gcc/c-family/c-ada-spec.c: In function 'print_ada_declaration':
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/gcc/c-family/c-ada-spec.c:3034:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
make[3]: *** [c-family/c-ada-spec.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/gcc/dbxout.c: In function 'dbxout_finish_complex_stabs':
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/gcc/dbxout.c:888:4: warning: ignoring return value of 'fwrite_unlocked', declared with attribute warn_unused_result [-Wunused-result]
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/gcc/dbxout.c:915:7: warning: ignoring return value of 'fwrite_unlocked', declared with attribute warn_unused_result [-Wunused-result]
rm gcc.pod gfortran.pod


attaching build log
Comment 14 Jack Morgan (RETIRED) gentoo-dev 2013-05-08 03:55:03 UTC
Created attachment 347694 [details]
jmorgan_build_log
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2013-11-07 03:22:09 UTC
I'd say this was a hardware issue if multiple people weren't hitting it.  So I've made 4.6 and 4.7 build with -j1 for now.  We can revisit for 4.8.

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?r1=1.602&r2=1.603