Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138173 - [4.1/build] fails to build on i[3-5]86 with -g
Summary: [4.1/build] fails to build on i[3-5]86 with -g
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR22313
Whiteboard:
Keywords:
: 149236 161111 (view as bug list)
Depends on:
Blocks: 155417
  Show dependency tree
 
Reported: 2006-06-27 03:00 UTC by Loz Hygate
Modified: 2007-01-09 12:50 UTC (History)
5 users (show)

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


Attachments
gcc41-pr22313.patch (gcc41-pr22313.patch,1.39 KB, patch)
2006-10-21 19:19 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loz Hygate 2006-06-27 03:00:59 UTC
gcc-4.1.1 failed with the following error:

stage1/xgcc -Bstage1/ -B/usr/i586-pc-linux-gnu/bin/ -c   -march=pentium -O2 -pipe -g -fprofile-use -freorder-blocks-and-partition -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute     -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/. -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../include -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/../libcpp/include     /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/gcc/c-lex.c -o c-lex.o
{standard input}: Assembler messages:
{standard input}:2969: Error: invalid sections for operation on `.LCFI22' and `.LCFI21'
{standard input}:3038: Error: invalid sections for operation on `.LCFI38' and `.LCFI37'
{standard input}:3232: Error: invalid sections for operation on `.LCFI76' and `.LCFI75'
{standard input}:3269: Error: invalid sections for operation on `.LCFI83' and `.LCFI82'
make[2]: *** [c-lex.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/gcc'
make[1]: *** [stagefeedback_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.1 failed.
Call stack:
  ebuild.sh, line 1540:   Called dyn_compile
  ebuild.sh, line 940:   Called src_compile
  ebuild.sh, line 1249:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1468:   Called gcc_do_make
  toolchain.eclass, line 1342:   Called die

!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, and the call stack if relevant.

emerge --info:
Portage 2.1.1_pre1-r1 (default-linux/x86/2006.0, gcc-3.4.6/vanilla, glibc-2.4-r1, 2.6.15-gentoo-r1 i586)
=================================================================
System uname: 2.6.15-gentoo-r1 i586 Pentium 75 - 200
Gentoo Base System version 1.12.1
dev-lang/python:     2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
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: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=pentium -Os -pipe -g"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium -Os -pipe -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j1"
PKGDIR="/packages/miffy"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="x86 apache2 berkdb bitmap-fonts cli crypt dri eds emboss encode fortran gdbm gpm imap ipv6 isdnlog libg++ libwww maildir mp3 ncurses nls nptl nptlonly ogg pam pcre pdflib perl pppd python readline reflection sasl session spell spl ssl tcpd truetype-fonts type1-fonts udev vorbis xml xorg zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Note, there are currently no packages in the overlay directory
Comment 1 SpanKY gentoo-dev 2006-06-27 17:33:57 UTC
and it fails to emerge at the same place everytime ?
Comment 2 Loz Hygate 2006-06-28 05:33:56 UTC
I've only tried it twice (takes a very long time to build on this machine). It failed at the same place both times.
Comment 3 Loz Hygate 2006-07-03 03:14:10 UTC
I did an emerge sync and emerge -u world at the weekend. This installed a new version of binutils, but the gcc build failed at the same place.
Comment 4 Loz Hygate 2006-07-31 04:28:44 UTC
Probably a red herring but http://kernelslacker.livejournal.com/44342.html could be relevant.

gcc-3.4.6-r2 is the latest version of gcc that I've managed to build.
Comment 5 Loz Hygate 2006-07-31 05:07:12 UTC
This looks a lot more like it:

http://gcc.gnu.org/ml/gcc-bugs/2006-01/msg01686.html
Comment 6 Marcin Gryszkalis 2006-09-10 16:42:12 UTC
I can confirm the problem. I cannot build gcc 4.1.1-r1 with 4.1.1 (I probably built it fine with some previous version, not sure though).

Direct link to gcc bugzilla discussing similar/same thing:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22313
Comment 7 Marcin Gryszkalis 2006-09-11 10:27:08 UTC
After switching from
CFLAGS="-march=k6-3 -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -g"
to
CFLAGS="-O1 -pipe "

it builds w/o problem. As I understand comments on gcc site -g is the option that causes problem, ut I cannot verify it now...
Comment 8 SpanKY gentoo-dev 2006-09-27 06:45:49 UTC
*** Bug 149236 has been marked as a duplicate of this bug. ***
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2006-10-21 19:19:05 UTC
Created attachment 100188 [details, diff]
gcc41-pr22313.patch
Comment 10 SpanKY gentoo-dev 2006-10-21 19:53:57 UTC
i already merged this into our patchset ... guess i forgot to close the bug

will be fixed in 4.1.1-r2
Comment 11 SpanKY gentoo-dev 2006-11-17 03:24:23 UTC
looks like this causes a regression with gfortran (Bug 155417)

latest gcc-4.1 branch is OK so i'm gonna drop this patch from gcc-4.1.1 and just make people use gcc-4.1.2+ if they want this fixed
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-01-09 12:32:21 UTC
*** Bug 161111 has been marked as a duplicate of this bug. ***