Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269283 - sys-devel/gcc-4.x (ALL 4.x) freezes when compiling
Summary: sys-devel/gcc-4.x (ALL 4.x) freezes when compiling
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-10 18:10 UTC by Menno Schaap
Modified: 2010-09-01 10:05 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Menno Schaap 2009-05-10 18:10:33 UTC
When I compile gcc-4.x (have suffered it with any version), it hangs without any error, the last message is " Source compiled "  and then it hangs,

it is perfectly described in bug #186278
Also it was filed before in bug#165435

What I do is CTRL+C, then with the command " ebuild install, qmerge" I am still able to install.

My systems is a few years old, but completely up to date. This means I only have this problem with compiling gcc,just as described in #186278

I have tried very save CFLAGS, but this gives no improvement.

Please tell me what info I could sent or what I could to or test. An output from the logfile, does not seem usefull to me, since no error is indicated. Just " Source Compiled"  and nothing.

Thanks a lot!

Reproducible: Always




Portage 2.1.6.11 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-i686-AMD_Athlon-tm-_XP_3200+-with-glibc2.0
Timestamp of tree: Sun, 10 May 2009 07:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="nl_NL@euro"
LC_ALL="nl_NL@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="nl en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/big/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acl acpi alsa avi berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dv dvd dvdread emboss encode esd evo exif fam fbcondecor ffmpeg firefox foomaticdb fortran gdbm gif gimp gnome gphoto2 gpm gstreamer gtk gtk2 hal iconv ieee1394 imlib ipv6 isdnlog java jpeg ldap libnotify libwww mad mbox midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis opengl openmp oss pam pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection scanner sdl session spell spl sse ssl startup-notification svg swfdec sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml2 xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Sebastian Luther (few) 2009-05-12 20:37:00 UTC
Please try other versions of sandbox (older and newer). Is the problem still present for gcc-4.4.0?
Comment 2 Menno Schaap 2009-05-13 04:50:52 UTC
(In reply to comment #1)
> Please try other versions of sandbox (older and newer). Is the problem still
> present for gcc-4.4.0?
> 

I will try different sandbox version (or compile one without it). It is still present with 4.4.0. I will keep you posted. Thanks
Comment 3 Menno Schaap 2009-05-13 18:04:42 UTC
(In reply to comment #1)
> Please try other versions of sandbox (older and newer). Is the problem still
> present for gcc-4.4.0?

OUTPUT without errors, just frozen at "source compiled" 
=========================================================
/mnt/big/tmp/portage/sys-devel/gcc-4.1.2/work/build
/mnt/big/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2
>>> Source compiled.
==========================================================

I tried gcc-4.1.2 and 4.4.0 with sandbox-1.9, sandbox-1.4 and formerly sandbox-1.6-r2; no luck.. Thanks for the suggestion anyway!!!


Comment 4 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-13 18:19:26 UTC
Just a guess, but is CONFIG_SYSVIPC set in the running kernel?
If you've got /proc/config.gz enables, you can do:
zcat /proc/config.gz |grep CONFIG_SYSVIPC
To see.
Comment 5 Menno Schaap 2009-05-13 18:26:04 UTC
(In reply to comment #4)
> Just a guess, but is CONFIG_SYSVIPC set in the running kernel?
> If you've got /proc/config.gz enables, you can do:
> zcat /proc/config.gz |grep CONFIG_SYSVIPC
> To see.
> 

Thanks for the suggestion!!!!
@usr/src/linux $ grep SYSVIPC .config
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y

Comment 6 Menno Schaap 2009-05-13 18:27:15 UTC
PROOF THAT THE EMERGE IS IN FACT SUCCESFUL, IS RUNNING EBUILD AFTERWARDS:

#ebuild /usr/portage/sys-devel/gcc/gcc-4.1.2.ebuild compile
>>> Existing ${T}/environment for 'gcc-4.1.2' will be sourced. Run 'clean'
>>> to start with a fresh environment.
* gcc-4.1.2-uclibc-patches-1.0.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
* [ ok ]
* gcc-4.1.2-patches-1.3.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
* [ ok ]
* gcc-4.1.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
* [ ok ]
* checking ebuild checksums ;-) ...
* [ ok ]
* checking auxfile checksums ;-) ...
* [ ok ]
* checking miscfile checksums ;-) ...
* [ ok ]
* checking gcc-4.1.2-uclibc-patches-1.0.tar.bz2 ;-) ...
* [ ok ]
* checking gcc-4.1.2-patches-1.3.tar.bz2 ;-) ...
* [ ok ]
* checking gcc-4.1.2.tar.bz2 ;-) ...
* [ ok ]
>>> Checking gdc-0.24-src.tar.bz2's mtime...
>>> Checking gcc-4.1.2-uclibc-patches-1.0.tar.bz2's mtime...
>>> Checking gcc-4.1.2-patches-1.3.tar.bz2's mtime...
>>> Checking gcc-4.1.2.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
>>> It appears that 'gcc-4.1.2' is already compiled; skipping.
>>> Remove '/mnt/big/tmp/portage/sys-devel/gcc-4.1.2/.compiled' to
>>> force compilation.
Comment 7 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-13 19:00:46 UTC
(In reply to comment #6)

Could you post the output of:
 emerge -pv coreutils
 which tee
It might be some oddity in tee ( info from bug 186278 ) that's causing this.

Comment 8 Menno Schaap 2009-05-13 19:33:01 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> Could you post the output of:

>  emerge -pv coreutils
[ebuild   R   ] sys-apps/coreutils-7.1  USE="acl nls -caps -gmp (-selinux) -static -vanilla -xattr" 
>  which tee
/usr/bin/tee

> It might be some oddity in tee ( info from bug 186278 ) that's causing this.
> 
I hope I posted al info you need, I do not exactly understand the role of tee in this. Could I post something else or recompile coreutils or a different version? Quite a sharp look of suspecting tee from 186278 ;-)

Thanks again!
Comment 9 Menno Schaap 2009-05-13 19:52:57 UTC
I had one "emerge gcc" running, which was frozen, relevant "ps aux" listed below (tee was not in the proces list). Perhaps this helps?



root     19099  0.0  0.2   6272  2732 tty1     SN+  20:35   0:00 /bin/bash /usr/lib/portage/bin/ebuild.sh compile
root     19120  0.0  0.3   7040  3120 tty1     SN+  20:35   0:00 /bin/bash /usr/lib/portage/bin/ebuild.sh compile
root     20190  0.0  0.1   4900  1300 tty1     SN+  20:45   0:00 /bin/sh
root     21314  0.0  0.1   5328  2008 tty1     SN+  20:35   0:00 make -j2 LDFLAGS=-Wl,-O1 STAGE1_CFLAGS=-O LIBPATH=/usr/lib/gcc/i686-pc-linux-gnu/4.3.2 BOOT_CFLAGS= -march=athlon-xp -O2 -pipe bootstrap-lean
Comment 10 Menno Schaap 2009-05-14 19:44:24 UTC
I guess the problem is a segfault during the compile. Running down /var/log/messages, the only segfaults I find is during compilation of gcc. I do not believe in hardware problems since "world" compiles fine, including heavy packages.

Looked like glibc related. I upgraded glibc, but look at the last line:

May  9 20:47:49 karel fixincl[14627]: segfault at 40020000 ip 400aa133 sp bfa9dc4c error 4 in libc-2.8.so[40039000+134000]
May 10 09:54:13 karel fixincl[23831]: segfault at 40020000 ip 400aa133 sp bf86c31c error 4 in libc-2.8.so[40039000+134000]
May 13 18:59:33 karel fixincl[13982]: segfault at 40022000 ip 400aa133 sp bfc1b19c error 4 in libc-2.8.so[40039000+134000]
May 13 20:45:30 karel fixincl[20165]: segfault at 40020000 ip 400aa133 sp bf95ea2c error 4 in libc-2.8.so[40039000+134000]
May 14 06:31:39 karel fixincl[11901]: segfault at 40020000 ip 400aa133 sp bf99ca0c error 4 in libc-2.8.so[40039000+134000]
May 14 19:05:29 karel fixincl[14780]: segfault at 40020000 ip 400aa133 sp bfda000c error 4 in libc-2.8.so[40039000+134000]
May 14 19:34:03 karel fixincl[16510]: segfault at 4024d000 ip 400b9133 sp bf8ce29c error 4 in libc-2.8.so[40048000+134000]
May 14 21:29:49 karel fixincl[11249]: segfault at 40254000 ip 400ba5e3 sp bfc2620c error 4 in libc-2.9.so[40049000+137000]

The problem occured with glibc-2.8, as well as glibc-2.9 (glibc-2.9_p20081201)

Does this help any further?
Comment 11 Menno Schaap 2009-05-19 18:56:50 UTC
The problem seems to isolate around "fixincludes", as can be read in the Temporary Build directory:
TMPDIR/portage/sys-devel/gcc-4.3.2-r3/work/gcc-4.3.2/fixincludes

From the README some information, however, this is too lowlevel for me...

GCC MAINTAINER INFORMATION
==========================

If you are having some problem with a system header that is either
broken by the manufacturer, or is broken by the fixinclude process,
then you will need to alter or add information to the include fix
definitions file, ``inclhack.def''.  Please also send relevant
information to gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org and,
please, to me:  bkorb@gnu.org.

To make your fix, you will need to do several things:

1.  Obtain access to the AutoGen program on some platform.  It does
    not have to be your build platform, but it is more convenient.

2.  Edit "inclhack.def" to reflect the changes you need to make.
    See below for information on how to make those changes.

3.  Run the "genfixes" shell script to produce a new copy of
    the "fixincl.x" file.

4.  Rebuild the compiler and check the header causing the issue.
    Make sure it is now properly handled.  Add tests to the
    "test_text" entry(ies) that validate your fix.  This will
    help ensure that future fixes won't negate your work.

5.  Go into the fixinc build directory and type, "make check".
    You are guaranteed to have issues printed out as a result.
    Look at the diffs produced.  Make sure you have not clobbered
    the proper functioning of a different fix.  Make sure your
    fix is properly tested and it does what it is supposed to do.

6.  Now that you have the right things happening, syncronize the
    $(srcdir)/tests/base directory with the $(builddir)/tests/res
    directory.  The output of "make check" will be some diffs that
    should give you some hints about what to do.

7.  Rerun "make check" and verify that there are no issues left.


Thanks for looking into this!
Comment 12 Menno Schaap 2009-05-19 19:00:34 UTC
> May 14 21:29:49 karel fixincl[11249]: segfault at 40254000 ip 400ba5e3 sp
> bfc2620c error 4 in libc-2.9.so[40049000+137000]
> 
> The problem occured with glibc-2.8, as well as glibc-2.9 (glibc-2.9_p20081201)
> 

FYI:
Compiling with or without glibc-omitfp made no difference

Comment 13 Menno Schaap 2009-05-19 19:29:10 UTC
Tried now gcc-4.4.0 again with CFLAGS AND CXXFLAGS=""

got a segfault of fixincludes again, but without reference to glibc:

fixincl[3725]: segfault at 40254000 ip 08056994 sp bfa56e30 error 4 in fixincl[8048000+1b000]

What does Error code 4 mean?

Thanks.
Comment 14 Mark Loeser (RETIRED) gentoo-dev 2009-08-03 00:48:17 UTC
I can't reproduce this, and it if was a real failure with the package, others would be running into this as well.  I'm guessing it is some sort of hardware issue on your system.
Comment 15 chadernook 2009-11-15 11:28:06 UTC
I have a similar error

fixincl[7876]: segfault at 2baa37b7a000 ip 0000000000409fc8 sp 00007fff72fc4910 error 4 in fixincl[400000+1a000]

I have good reason to believe that this is caused by a corrupt file somewhere in my system. 
Comment 16 Menno Schaap 2009-11-15 13:52:51 UTC
> 
> I have good reason to believe that this is caused by a corrupt file somewhere
> in my system. 
> 

I think you are right. I have this problem for almost 2 years now without a clue. I have ran emerge -a (!!) system and world and the problem still persists.
I can finish the " emerge -a " builds but only with --skip-first, after a failed gcc built. I am not getting any further on this. I have re-read the upgrade guide for upgrading from gcc-3.4 to 4.x, muddled with GCC_SPECS and so on. But no change.

I doubt that it is hardware related since " emerge -a world " works fine, except for gcc. Even openoffice builds without problems...

If you find anything useful please let me know. Thanks!
Comment 17 Stefan Bauer 2010-06-09 13:18:16 UTC
Seems to be related to #278895.
Comment 18 chadernook 2010-09-01 10:05:22 UTC
Actually, more specifically I meant that I believed an include (a .h), is corrupt and fixincl crashes on 'fixing' it. I can't quite remember whether I had any solid evidence of this though.