Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73834 - gcc 3.4.3-r1 internal compiler error with -g3/-ggdb3 in CFLAGS and non-default locale
Summary: gcc 3.4.3-r1 internal compiler error with -g3/-ggdb3 in CFLAGS and non-defaul...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-08 13:09 UTC by Maurice van der Pot (RETIRED)
Modified: 2005-07-14 02:17 UTC (History)
0 users

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


Attachments
Fixes internal compiler errors with gimp (and probably mplayer) (fix.patch,1.37 KB, patch)
2005-02-16 13:27 UTC, Maurice van der Pot (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice van der Pot (RETIRED) gentoo-dev 2004-12-08 13:09:31 UTC
When emerging the gimp 2.0.6 with -g3 and/or -ggdb3 in my CFLAGS, I get this:

if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -g -march=pentium4 -O0 -pipe -g3 -ggdb3 -Wall -MT gimp-composite-sse.o -MD -MP -MF ".deps/gimp-composite-sse.Tpo" \
  -c -o gimp-composite-sse.o `test -f 'gimp-composite-sse.c' || echo './'`gimp-composite-sse.c; \
then mv -f ".deps/gimp-composite-sse.Tpo" ".deps/gimp-composite-sse.Po"; \
else rm -f ".deps/gimp-composite-sse.Tpo"; exit 1; \
fi
In file included from gimp-composite-sse.c:46:
gimp-composite-x86.h:245: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make: *** [gimp-composite-sse.o] Error 1

A possibly useful reference (although it's old):
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6707

This has been reproduced on g2boojum's AMD as well as on my P4 with these settings:

Portage 2.0.51-r8 (!/home/griffon26/cvs-wa/gentoo-x86/profiles/default-linux/x86/2004.2/gcc34, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-rc3 i686)
=================================================================
System uname: 2.6.9-rc3 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.2.3-r5,dev-lang/python-2.3.4 [2.3.4 (#1, Jun  9 2004, 22:56:04)]
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.2.3-r5, 2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.7.9, 1.8.5-r2, 1.6.3, 1.4_p6, 1.9.3, 1.5
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O0 -pipe -g3 -ggdb3"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-march=pentium4 -O0 -pipe -g3 -ggdb3"
FEATURES="autoaddcvs autoconfig ccache cvs digest distlocks fixpackages noclean nostrip sandbox sfperms sign userpriv usersandbox"
MAKEOPTS="-j4"
USE="X alsa apache2 avi bitmap-fonts bonobo cdr crypt cscope debug dedicated dga dvd encode ethereal f77 fam fastcgi fbcon fortran freetds gd gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jikes jpeg libwww mad mcal memlimit mikmod mmx motif mozilla mpeg mpi mysql ncurses nls nocd oggvorbis opengl pam pdflib perl plotutils png pnp qt quicktime readline samba sdl slang snmp sse ssl svga tcltk tcpd tiff truetype trusted usb wmf wxwindows x86 xml xml2 xmms xosd xv xvid zlib"
Comment 1 Maurice van der Pot (RETIRED) gentoo-dev 2004-12-23 13:21:16 UTC
Got another one. This time with Mplayer.

Here are some interesting facts:
- only fails with -g3 and/or -ggdb3
- fails in a completely different function for different users/environments
- only fails with non-default locale, exporting LANG="" makes it succeed
  (but only when entering the compiler invocation on the command line)

During emerge (with userpriv):

cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -march=pentium4 -O2 -pipe -g3 -ggdb3 -fno-stack-protector -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -Inative -I.. -I../libmpdemux -I../loader -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -D_GNU_SOURCE -o vf_spp.o vf_spp.c
vf_spp.c: In function `softthresh_mmx':
vf_spp.c:292: 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/mplayer-1.0_pre5-r4/temp/ccaXbO5L.out file, please attach this to your bugreport.
make[1]: *** [vf_spp.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre5-r4/work/MPlayer-1.0pre5/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2

!!! ERROR: media-video/mplayer-1.0_pre5-r4 failed.
!!! Function src_compile, Line 441, Exitcode 2
!!! Failed to build MPlayer!
!!! If you need support, post the topmost build error, NOT this status message.

After failure, copying over to normal user's home dir and chowning everything,
then entering the compiler command line:

prompt> cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -march=pentium4 -O2 -g3 -ggdb3 -fno-stack-protector -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -Inative -I.. -I../libmpdemux -I../loader -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -D_GNU_SOURCE -o vf_spp.o vf_spp.c
vf_spp.c: In function `open':
vf_spp.c:577: 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 /tmp/ccFrOs1w.out file, please attach this to your bugreport.

After exporting LANG="" and entering the same command as the same user:
compilation succeeds

And one other thing. Normally I don't set LANG for root, but if I set it 
manually from the command line and I directly enter the compiler command line,
I see behaviour consistent with the above. However, if I do 'make' instead
compilation succeeds no matter what LANG is set to. If I do emerge, it also
doesn't seem to matter what LANG is set to, but it always fails!?!
This is probably some mistake on my part.
Comment 2 Maurice van der Pot (RETIRED) gentoo-dev 2005-02-16 13:27:04 UTC
Created attachment 51376 [details, diff]
Fixes internal compiler errors with gimp (and probably mplayer)

I can't think of a good name for the patch. It was taken from the upstream bug
report and modified so it would apply cleanly to gcc 3.4.3.20050110.

I have verified that it fixes the problem I had with compiling the gimp.
Comment 3 Maurice van der Pot (RETIRED) gentoo-dev 2005-04-22 15:41:13 UTC
Will this be integrated any time soon?
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-14 02:17:15 UTC
Closing as this is fixed in 3.4.4