Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126960 - [4.1/ICE] gcc-4.1.0 won't compile on power3
Summary: [4.1/ICE] gcc-4.1.0 won't compile on power3
Status: VERIFIED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR28326
Whiteboard:
Keywords:
Depends on:
Blocks: 134972
  Show dependency tree
 
Reported: 2006-03-20 06:50 UTC by Markus Rothe (RETIRED)
Modified: 2006-11-14 06:48 UTC (History)
1 user (show)

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


Attachments
cc5bgxoP.out (cc5bgxoP.out,144.24 KB, text/plain)
2006-03-20 06:51 UTC, Markus Rothe (RETIRED)
Details
gcc-4.1.0.ebuild.diff (gcc-4.1.0.ebuild.diff,795 bytes, patch)
2006-03-30 10:47 UTC, Markus Rothe (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Rothe (RETIRED) gentoo-dev 2006-03-20 06:50:08 UTC
Hi,

I just tried to compile gcc-4.1.0 on a power3 machine and it failed. It build just fine on power5 and G5. Here comes the output:

[...]
make[4]: Entering directory `/var/tmp/portage/gcc-4.1.0/work/build/gcc'
make[4]: `crtend.o' is up to date.
make[4]: `crtbeginS.o' is up to date.
make[4]: `crtendS.o' is up to date.
make[4]: `crtbeginT.o' is up to date.
make[4]: `ecrti.o' is up to date.
make[4]: `ecrtn.o' is up to date.
make[4]: `ncrti.o' is up to date.
make[4]: `ncrtn.o' is up to date.
make[4]: `crtsavres.o' is up to date.
make[4]: Leaving directory `/var/tmp/portage/gcc-4.1.0/work/build/gcc'
./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/var/tmp/portage/gcc-4.1.0/work/build/gcc/../ld -O2  -O2 -O2 -pipe -mtune=power3 -mcpu=power3  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc -I/var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc/. -I/var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc/../include -I/var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc/../libcpp/include  -fPIC -mstrict-align -DL_muldi3  -c /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc/libgcc2.c -o libgcc/./_muldi3.o
/var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/gcc/libgcc2.c:520: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/gcc-4.1.0/temp/cc5bgxoP.out file, please attach this to your bugreport.
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/gcc-4.1.0/work/build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.0/work/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.0/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.0 failed.
!!! Function gcc_do_make, Line 1361, Exitcode 2
!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.


$ emerge --info
Portage 2.0.54 (default-linux/ppc/ppc64/2006.0/64bit-userland/power3, gcc-3.4.5, glibc-2.3.4.20041102-r2, 2.6.15-gentoo-r7 ppc64)
=================================================================
System uname: 2.6.15-gentoo-r7 ppc64 POWER3 (630+)
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mtune=power3 -mcpu=power3"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mtune=power3 -mcpu=power3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc64 alsa apache2 apm arts berkdb bitmap-fonts bzip2 cli ctype cups curl dba dri eds emboss encode esd expat fastbuild foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gmp gnome gnutls gpm gstreamer gtk2 ibm imlib ipv6 jpeg kde libg++ libwww mad memlimit mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png posix python qt quicktime readline sdl session simplexml soap sockets spell spl ssl tcpd tokenizer truetype truetype-fonts type1-fonts udev unicode vorbis webdav xml xmms xsl xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 Markus Rothe (RETIRED) gentoo-dev 2006-03-20 06:51:11 UTC
Created attachment 82663 [details]
cc5bgxoP.out
Comment 2 Markus Rothe (RETIRED) gentoo-dev 2006-03-30 02:24:20 UTC
CFLAGS="-O2 -pipe" and it builds fine. should we filter out CFLAGS="-mtune=power3 -mcpu=power3"?
Comment 3 Markus Rothe (RETIRED) gentoo-dev 2006-03-30 09:15:39 UTC
should I report this upstream?
Comment 4 Markus Rothe (RETIRED) gentoo-dev 2006-03-30 10:47:54 UTC
Created attachment 83447 [details, diff]
gcc-4.1.0.ebuild.diff

how about this?
Comment 5 SpanKY gentoo-dev 2006-03-30 10:56:11 UTC
gcc shouldnt ICE

filtering flags ignores the problem
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-03-30 11:01:56 UTC
Did you try building a vanilla tarball?  I'll look into this and see if I can track down a fix, or get a bug submitted upstream with the testcase if there is none.
Comment 7 Markus Rothe (RETIRED) gentoo-dev 2006-03-30 11:16:38 UTC
would USE="vanilla" emerge =gcc-4.1.0 do it?
Comment 8 Markus Rothe (RETIRED) gentoo-dev 2006-03-31 06:07:05 UTC
ok. I did it by hand:

$ mkdir gcc-4.1.0-temp
$ cd gcc-4.1.0-temp/
$ tar xfj /usr/portage/distfiles/gcc-4.1.0.tar.bz2
$ mkdir build
$ cd build/
$ ../gcc-4.1.0/configure --prefix=/usr --bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0 --includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include --datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0 --mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/man --infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/info --with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include/g++-v4 --host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
[...]
$ make LDFLAGS="" STAGE1_CFLAGS="-O" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap

[...]
make[4]: Entering directory `/root/gcc-4.1.0-temp/build/gcc'
make[4]: `crtend.o' is up to date.
make[4]: `crtbeginS.o' is up to date.
make[4]: `crtendS.o' is up to date.
make[4]: `crtbeginT.o' is up to date.
make[4]: `ecrti.o' is up to date.
make[4]: `ecrtn.o' is up to date.
make[4]: `ncrti.o' is up to date.
make[4]: `ncrtn.o' is up to date.
make[4]: `crtsavres.o' is up to date.
make[4]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/root/gcc-4.1.0-temp/build/gcc/../ld -O2  -O2 -O2 -pipe -mtune=power3 -mcpu=power3  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-4.1.0/gcc -I../../gcc-4.1.0/gcc/. -I../../gcc-4.1.0/gcc/../include -I../../gcc-4.1.0/gcc/../libcpp/include  -fPIC -mstrict-align -DL_muldi3  -c ../../gcc-4.1.0/gcc/libgcc2.c -o libgcc/./_muldi3.o
{standard input}: Assembler messages:
{standard input}:85: Warning: Unary operator - ignored because bad operand follows
{standard input}:85: Warning: zero assumed for missing expression
{standard input}:86: Error: Unrecognized opcode: `m'
{standard input}:96: Error: Unrecognized opcode: `m'
{standard input}:1199: Error: unassigned file number 2
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make: *** [profiledbootstrap] Error 2



So... unless it is not a bug in the way gentoo is building gcc the bug the bug is in gcc, is it? (because I didn't patched anything)
Comment 9 Markus Rothe (RETIRED) gentoo-dev 2006-03-31 06:17:09 UTC
oh... I just saw that the message actualy isn't the same, but the error happens at the same file.

Sorry.. what does this mean?
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2006-05-25 22:31:43 UTC
Can you try 4.1.1 for me?
Comment 11 Markus Rothe (RETIRED) gentoo-dev 2006-05-26 04:27:22 UTC
same result with gcc-4.1.1
Comment 12 Markus Rothe (RETIRED) gentoo-dev 2006-05-30 22:55:59 UTC
report this bug upstream?
Comment 13 Mark Loeser (RETIRED) gentoo-dev 2006-05-31 15:26:32 UTC
If you have a reduced testcase and such, sure.  I'm going to hopefully have time to get to this in the next few days.  I've been pretty busy with my new job.
Comment 14 Markus Rothe (RETIRED) gentoo-dev 2006-07-12 12:29:19 UTC
(In reply to comment #5)
> gcc shouldnt ICE
> 
> filtering flags ignores the problem
> 

According to my tests gcc 4.2 builds fine with those CFLAGS/BOOT_CFLAGS. Would this be a reson for filtering them out in 4.1.1? I mean, it is fixed in next major release. if the upstream bug will resolve the issue in 4.1 series then we can still remove that filter. Sounds reasonable?
Comment 15 Markus Rothe (RETIRED) gentoo-dev 2006-09-06 09:01:06 UTC
sys-devel/gcc-4.2.0_alpha20060902 merges just fine. can I add the ebuild hack (CFLAGS filter) to gcc-4.1?
Comment 16 SpanKY gentoo-dev 2006-09-23 04:16:07 UTC
does the 4.1.2 snaps work ?  if not, then this can be reported upstream
Comment 17 Tom Gall (RETIRED) gentoo-dev 2006-11-14 06:48:15 UTC
-mtune=power3 -mcpu=power3 is the problem here. (least for gcc 4.1.1 which I've marked stable)

It's not a great work around but it at least gets us moving forward. I've captured the mtune and mcpu problem and forwarded it off to a gcc maintainer friend of mine. We'll see if he comes back with anything.

I'm going to mark this one as an upstream resolution given the 4.2 information.
Comment 18 Tom Gall (RETIRED) gentoo-dev 2006-11-14 06:48:30 UTC
stick a fork in it