Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137225 - gcc 4.1.1 fails while compiling menuconfig for kernel 2.6.17
Summary: gcc 4.1.1 fails while compiling menuconfig for kernel 2.6.17
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-18 21:46 UTC by Yan-Fa Li
Modified: 2006-06-19 11:11 UTC (History)
1 user (show)

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


Attachments
gcc output (cclmnFUf.out,108.93 KB, text/plain)
2006-06-18 21:49 UTC, Yan-Fa Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yan-Fa Li 2006-06-18 21:46:40 UTC
when I try to compile menuconfig for the linux kernel the gcc compiler fails with an internal error on line 482 in scripts/kconfig/conf.c with:

  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'check_conf':
scripts/kconfig/conf.c:482: 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/cclmnFUf.out file, please attach this to your bugreport.
make[1]: *** [scripts/kconfig/conf.o] Error 1
make: *** [menuconfig] Error 2

If I patch the code and re-order the increment outside of the comparison it compiles.  This looks like a gcc-4.1.1 bug, but I will leave it to compiler experts to do the final diagnosis.

Patch follows:--- scripts/kconfig/conf.c.orig 2006-06-18 21:42:55.000000000 -0700
+++ scripts/kconfig/conf.c      2006-06-18 21:43:16.000000000 -0700
@@ -479,8 +479,10 @@
        if (sym && !sym_has_value(sym)) {
                if (sym_is_changable(sym) ||
                    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
-                       if (!conf_cnt++)
+                       if (!conf_cnt) {
                                printf(_("*\n* Restart config...\n*\n"));
+                               ++conf_cnt;
+                       }
                        rootEntry = menu_get_parent_menu(menu);
                        conf(rootEntry);
                }


-------------------------emerge-info-----output------------------------
Portage 2.1 (default-linux/x86/2005.1, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1.86GHz
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CXXFLAGS="-Os -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer prelink sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib alsa apache2 apm audiofile avi bash-completion bashcompletion berkdb bitmap-fonts browserplugin bzip2 cairo cddb cdparanoia cli crypt cscope css cups curl divx4linux dlloader dmi doc dri dts dv dvb dvd dvdr dvdread edl eds effects emboss encode esd examples extensions extraengine fam fame fastcgi ffmpeg flac foomaticdb fortran frontendonly gdbm gif gnome gnutls gpm graphviz gstreamer gtk gtk2 hal ieee1394 imagemagick imlib inkjar ipod iproute2 ipv6 isdnlog java jbig jce jpeg kde kdebase-startkde lcms ldap libcaca libg++ libwww lirc live lzo mad matroska mikmod mjpeg mmext mmx mmxext mng motif mozsvg mp3 mpeg mpm-threadpool musicbrainz mysql mythtv ncurses nls nptl nptlonly nsplugin nvidia offensive ogg oggvorbis opengl oss pam pcre pdflib perl pic plugin png pppd python qt quicktime readline real reflection rtc ruby samba sdl session sndfile spell spl sqlite sse sse2 ssl svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts usb utf8 v4l2 video_cards_nvidia vim-with-x visualization vorbis win32codecs wmf xanim xcomposite xinerama xinetd xml xml2 xmms xorg xprint xscreensaver xv xvid xvmc zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Yan-Fa Li 2006-06-18 21:49:14 UTC
Created attachment 89506 [details]
gcc output
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2006-06-18 21:57:03 UTC
bwah.

was this gentoo-sources?
Comment 3 Yan-Fa Li 2006-06-18 22:31:16 UTC
yes it was gentoo sources

* sys-kernel/gentoo-sources
     Available versions:  2.4.31-r1 2.4.32-r4 ~2.4.32-r5 2.6.14-r7 2.6.15-r1 2.6.15-r7 2.6.15-r8 2.6.16 2.6.16-r1 2.6.16-r2 2.6.16-r3 2.6.16-r4 2.6.16-r5 2.6.16-r6 2.6.16-r7 2.6.16-r8 2.6.16-r9 2.6.16-r10 2.6.17
     Installed:           2.6.16 2.6.16-r6 2.6.16-r7 2.6.16-r8 2.6.16-r9 2.6.16-r10 2.6.17
     Homepage:            http://dev.gentoo.org/~dsd/genpatches
     Description:         Full sources including the gentoo patchset for the 2.6 kernel tree

Actually.  I'm having trouble with all var++ constructs all over the source so I'm rolling back to 4.1.0-r1 as we type.  I will leave 4.1.1 installed for testing.  I'm using the CFLAG=-Os, this could be the cause of the breakage.  If 4.1.0-r1 also starts to exhibit problems I will build 4.1.1 without -Os and see what happens.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2006-06-18 22:59:24 UTC
i'm pretty sure something got screwed with your 4.1.1 installation though i can't imagine what.  -Os shouldn't be messing with anything, as the toolchain eclass automatically strips it and replaces it with -O2 when build GCC.  in addition to that, the kernel Makefile also throws away user defined CFLAGS when doing it's thing.  you can see that in the first line of the preprocessor output you posted:

// /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1 -quiet -MD scripts/kconfig/.conf.o.d scripts/kconfig/conf.c -quiet -dumpbase conf.c -mtune=pentiumpro -auxbase-strip scripts/kconfig/conf.o -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -o - -frandom-seed=0

the only thing i can think of is some bizarre interaction due to using 4.1.1 on a stable keyworded system, though i've never run across this before.
Comment 5 Yan-Fa Li 2006-06-19 02:55:41 UTC
Thanks Ryan.  The system is now downgraded to 4.1.0 and currently successfully building 2.6.17.  I will try rebuilding gcc-4.1.1 again tomorrow and attempt to rebuild the  kernel.  If it doesn't exhibit the problem I'll put it down to a bizarre toolchain corruption issue and close the bug.
Comment 6 Yan-Fa Li 2006-06-19 11:11:37 UTC
downgrading to 4.1.0 and then rebuilding 4.1.1 with that allowed me to successfully build 2.6.17.  Seems like something was corrupt in my gcc toolchain.