Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78306 - gcc-config segfaults when switching versions
Summary: gcc-config segfaults when switching versions
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 78300 85509 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-16 21:42 UTC by Erick Turnquist
Modified: 2005-12-11 18:35 UTC (History)
3 users (show)

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


Attachments
strace -ff -eopen gcc-config (strace.txt,335.82 KB, text/plain)
2005-01-21 03:09 UTC, Matthew Goodman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erick Turnquist 2005-01-16 21:42:44 UTC
$ sudo gcc-config x86_64-pc-linux-gnu-3.4.3
* Switching to x86_64-pc-linux-gnu-3.4.3 compiler...
/usr/bin/gcc-config: line 1:  6156 Segmentation fault      cp -a "${ROOT}/${LDPATH}"/libgcc_s.so* "${ROOT}"/lib/

The number of bytes into the file changes each time (the number after line 1:), but the result is always the same.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-01-17 15:38:56 UTC
eradicator: gcc-config copies $LDPATH/libgcc_s.so to /lib/ ... this is probably not right for multilib setups ;)

ideas ?
Comment 2 SpanKY gentoo-dev 2005-01-17 15:39:07 UTC
*** Bug 78300 has been marked as a duplicate of this bug. ***
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-17 15:48:28 UTC
blech... ugly ugly... blech... ok... I'm looking at it.

We should use lib/$(gcc <multilib options> --print-multi-os-dir) as a proper fix... I'll put some extra info into the config file to handle this and bump gcc-config as well... if not tonight, it'll be after I get back from snowboarding.  I don't believe any 2005.0 profiles will be affected by this as amd64's 2005.0 still uses lib as a symlink to lib64, and ppc64 has always done the same.

Erick: please provide your 'emerge --info'
Comment 4 Erick Turnquist 2005-01-18 11:58:00 UTC
Here is my emerge --info (this is from a downgraded version of gcc (3.4.2-r2) since 3.4.3 is broken, but nothing has changed except the gcc version to cause this bug)

Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.2, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r9 x86_64 AMD Opteron(tm) Processor 246
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=opteron -fweb -ftracer -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=opteron -fweb -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://adelie.polymtl.ca/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://gentoo.agsn.ca/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi amd64 apache2 bitmap-fonts cjk crypt ctype doc encode gd gdbm gif gtk gtk2 imap imlib jpeg ldap libwww maildir mpeg mysql ncurses nls oggvorbis pam pcre perl png python readline samba sasl sdl slang snmp spell ssl tcpd tetex truetype unicode xml2 zlib"
Comment 5 Matthew Goodman 2005-01-20 04:18:17 UTC
I am also having the same problem. Attached is the output, and the emerge info:

I should also mention that when I attempt to switch to gcc 3.3.4-r1 the same error occurs

ark root # gcc-config i686-pc-linux-gnu-3.3.4
 * Switching to i686-pc-linux-gnu-3.3.4 compiler...
/usr/bin/gcc-config: line 1:  6093 Segmentation fault      cp -a "${ROOT}/${LDPATH}"/libgcc_s.so* "${ROOT}"/lib/

then also:

ark root # gcc-config i686-pc-linux-gnu-3.4.3
 * Switching to i686-pc-linux-gnu-3.4.3 compiler...
/usr/bin/gcc-config: line 1:  5840 Segmentation fault      cp -a "${ROOT}/${LDPATH}"/libgcc_s.so* "${ROOT}"/lib/

ark root # emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r5 i686)
=================================================================
System uname: 2.6.10-gentoo-r5 i686 Intel(R) Xeon(TM) CPU 3.00GHz
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -mtune=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -mtune=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://gentoo.agsn.ca/ ftp://gentoo.mirrors.tds.net/gentoo ftp://gg3.net/pub/linux/gentoo/ http://gentoo.blueyonder.co.uk"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 acl acpi adabas amd apache1 bcel berkdb bzip2 bzlib cap chroot crypt curl curlwrappers dba dio erandom extensions fam fbcon fortran freetds gd gdbm hardenedphp imagemagick imap innodb ipv6 java javascript jpeg kerberos libg++ libwww maildir mbox memlimit mmap mmx mpi mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses neural nls nptl objc odbc pam pcntl pcre pdflib perl php pic png posix python readline ruby sasl session sftplogging slang snmp sockets sse ssl sysvipc szip tcpd tiff tokenizer vda vhosts virus-scan xml2 zlib"
Comment 6 Erick Turnquist 2005-01-20 17:24:40 UTC
i686? That would imply that it's not multilib-related, wouldn't it?
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-21 01:49:26 UTC
yes, it seems it's not restricted to multilib profiles...

I don't see why that would possibly segfault... vapier?
Comment 8 Matthew Goodman 2005-01-21 03:09:55 UTC
Created attachment 49098 [details]
strace -ff -eopen gcc-config

Here is an strace output of the offending command. I used 'strace -ff -eopen
gcc-config 2' as the command string.

If there are any other arguments I should add.. please let me know and I will
be happy to paste them.
Comment 9 Erick Turnquist 2005-01-25 12:31:05 UTC
gcc-config-1.3.9 fixed this for me, I think. After upgrading gcc-config, waiting a while, then trying 3.4.3 again, it worked fine.
Comment 10 Matthew Goodman 2005-01-28 01:24:43 UTC
I am using gcc-config 1.3.9

I am going to downgrade to 1.3.8-r4, and see if I can test there, and then back to 1.3.9

Could it possibly be a toolchain issue?
Comment 11 Matthew Goodman 2005-01-28 01:25:42 UTC
Downgrading to 1.3.8-r4 got rid of the problem for me.

Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-28 01:44:29 UTC
that doesn't make sense as that stuff isn't changed between 1.3.8 and 1.3.9.  The major changes in those versions is the wrapper, not the config script...  can you go back up to 1.3.9 just to verify?
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-30 21:38:52 UTC
can you please try 1.3.10
Comment 14 SpanKY gentoo-dev 2005-03-16 15:29:06 UTC
*** Bug 85509 has been marked as a duplicate of this bug. ***
Comment 15 Michael Ploujnikov 2005-03-18 13:57:11 UTC
emerge -v --oneshot '>=sys-devel/gcc-config-1.3.10' seg.faults for me as well.
Comment 16 Michael Ploujnikov 2005-03-19 17:25:37 UTC
emerging gcc-config-1.3.8-r4 gives me a Segmentation fault, as well...
Comment 17 Mark Loeser (RETIRED) gentoo-dev 2005-12-11 18:35:48 UTC
Is this still an issue?  It works fine for me.