Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem after gcc 3.4.3. upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
peterbye
n00b
n00b


Joined: 28 Apr 2004
Posts: 19
Location: UK

PostPosted: Thu Feb 03, 2005 3:46 pm    Post subject: Problem after gcc 3.4.3. upgrade Reply with quote

Hi,
This morning I upgraded my gcc to 3.4.3, used gcc-config to set the current version, and unmerged gcc-3.3.5.

Code:
rhino[root]/# gcc-config -l
[1] i686-pc-linux-gnu-3.4.3 *
[2] i686-pc-linux-gnu-3.4.3-hardened
[3] i686-pc-linux-gnu-3.4.3-hardenednopie
[4] i686-pc-linux-gnu-3.4.3-hardenednossp


I rebuilt glibc, and I'm now trying to do a 'emerge -e system'.
I get as far as rebuilding dev-python/python-fchksum-1.7.1 and then get this error:

Code:
gcc-config error: Could not run/locate "i386-pc-linux-gnu-gcc"
error: command 'i386-pc-linux-gnu-gcc' failed with exit status 1


/usr/bin/i386-pc-linux-gnu-gcc exists...

Code:
rhino[root]/# ls -l /usr/bin/i[36]*
-rwxr-xr-x  1 root root 7244 Jan 15 11:56 /usr/bin/i386-pc-linux-gnu-c++
-rwxr-xr-x  1 root root 7244 Jan 15 11:56 /usr/bin/i386-pc-linux-gnu-g++
-rwxr-xr-x  1 root root 7244 Jan 15 11:56 /usr/bin/i386-pc-linux-gnu-g77
-rwxr-xr-x  1 root root 7244 Jan 15 11:56 /usr/bin/i386-pc-linux-gnu-gcc
-rwxr-xr-x  1 root root 9180 Feb  3 11:47 /usr/bin/i686-pc-linux-gnu-c++
-rwxr-xr-x  1 root root 9180 Feb  3 11:47 /usr/bin/i686-pc-linux-gnu-g++
-rwxr-xr-x  1 root root 9180 Feb  3 11:47 /usr/bin/i686-pc-linux-gnu-gcc


but if I attempt to run it, it says...
Code:
rhino[root]/# /usr/bin/i386-pc-linux-gnu-gcc
gcc-config error: Could not run/locate "i386-pc-linux-gnu-gcc"

whereas running /usr/bin/i686-pc-linux-gnu-gcc says a much healthier...
Code:
rhino[root]/# /usr/bin/i686-pc-linux-gnu-gcc
i686-pc-linux-gnu-gcc: no input files


Here's my 'emerge info'...
Code:
rhino[root]/# emerge info
Portage 2.0.51-r15 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 2100+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jan  2 2005, 20:09:04)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.9.4, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse -msse -mmmx -m3dnow "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse -msse -mmmx -m3dnow "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks maketest sandbox sfperms test"
GENTOO_MIRRORS=" http://gentoo.blueyonder.co.uk http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.heanet.ie/pub/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://newpennan.pandasys.net/gentoo-portage"
USE="3dnow X acpi alsa apache2 apm avi bash-completion berkdb bitmap-fonts cdr crypt cscope cups curl div4linux doc dvd dvdr encode esd evo f77 fam fbcon flac foomaticdb gif gmp gnome gphoto2 gstreamer gtk gtk2 imap imlib jack java jpeg ldap libg++ libwww live mad maildir matrox mikmod mmx motif mozilla mpeg ncurses network nptl nptlonly oggvorbis opengl pam pcre pda pdflib perl php png python quicktime readline real sasl sdl session shared soap spell sse ssl svga tcltk tiff truetype truetype-fonts type1-fonts usb userlocales x86 xine xinerama xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

No mention of 386 anywhere, so why is it trying to use i386-pc-linux-gnu-gcc instead of the i686 versions?
Any help with this would be much appreciated, thanks.
Back to top
View user's profile Send private message
MindEraser
n00b
n00b


Joined: 06 Jul 2004
Posts: 26
Location: Germany

PostPosted: Thu Feb 03, 2005 4:13 pm    Post subject: Reply with quote

You, have a very strange case :?
Unmerging 3.3.5 was not a good idea. Too late ...
Your environment seems broken although gcc-config should have taken care of things.
The only thing I can think of is did you actually run
Code:
env-update && source /etc/profile

after gcc-config. You have to do that in order for the changes to take effect in the current shell.
One more thing, there is this script fix_libtool_files.sh that should be run in some cases after gcc-config - in your case like that:
Code:

fix_libtool_files.sh 3.3.5

. You can try searching for it in the forums to find some more info.
Good luck!
_________________
Portage updates your ToolChain (gcc, glibc...) in a very stupid way. Here is the solution: an emerge wrapper script
Back to top
View user's profile Send private message
peterbye
n00b
n00b


Joined: 28 Apr 2004
Posts: 19
Location: UK

PostPosted: Thu Feb 03, 2005 4:47 pm    Post subject: Reply with quote

MindEraser wrote:
You, have a very strange case :?
Unmerging 3.3.5 was not a good idea. Too late ...
Your environment seems broken although gcc-config should have taken care of things.
Code:
env-update && source /etc/profile

Code:
fix_libtool_files.sh 3.3.5

You can try searching for it in the forums to find some more info.


Thanks, already done all that., and searched the forums, as always. Found a few similar issues but they were all to do with distcc and cross-compiling. My situation should be really simple - one architecture, one compiler, I just want everything to be 'i686-', don't know why some ebuilds are deciding they want 'i386-' stuff.
Back to top
View user's profile Send private message
MindEraser
n00b
n00b


Joined: 06 Jul 2004
Posts: 26
Location: Germany

PostPosted: Thu Feb 03, 2005 5:19 pm    Post subject: Reply with quote

Wow, really weird.
It indeed should be a simple case. What exact version of gcc-3.4.3 are you using? Are you using the latest gcc-config? You can try hacking into /etc/env.d to figure out/fix what's wrong. I think gcc-config only deals in there.
And a final tip. You would want to rebuild your entire toolchain when upgrading gcc. Read the post (from the beginning) that is in my sig.
_________________
Portage updates your ToolChain (gcc, glibc...) in a very stupid way. Here is the solution: an emerge wrapper script
Back to top
View user's profile Send private message
wll
n00b
n00b


Joined: 25 Aug 2003
Posts: 38

PostPosted: Thu Feb 03, 2005 6:25 pm    Post subject: Reply with quote

I've got a suggestion. Look at fix_libtool_files.sh's usage:

Code:
# fix_libtool_files.sh
Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>]

    Where <old-gcc-version> is the version number of the
    previous gcc version.  For example, if you updated to
    gcc-3.2.1, and you had gcc-3.2 installed, run:

      # fix_libtool_files.sh 3.2

    If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu
    but you now have CHOST as i686-pc-linux-gnu, run:

      # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu

    Note that if only the CHOST and not the version changed, you can run
    it with the current version and the '--oldarch <old-CHOST>' arguments,
    and it will do the expected:

      # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu


Notice the second option. Try using it like this:
Code:
# fix_libtool_files.sh 3.3.5 --oldarch i386-pc-linux-gnu-gcc
Back to top
View user's profile Send private message
Anior
Guru
Guru


Joined: 17 Apr 2003
Posts: 317
Location: European Union (Stockholm / Sweden)

PostPosted: Fri Feb 04, 2005 5:18 pm    Post subject: Re: Problem after gcc 3.4.3. upgrade Reply with quote

peterbye wrote:
Code:
rhino[root]/# /usr/bin/i386-pc-linux-gnu-gcc
gcc-config error: Could not run/locate "i386-pc-linux-gnu-gcc"

I ran into this problem aswell and slapped a dirty fix on it containing an ugly maze of symlinks since I were in a hurry. I'll check in on it and let you know if I find out anything more. My guess would be a bug in the gcc ebuild.
Code:
ln -s /usr/i686-pc-linux-gnu/gcc-bin/3.4.3/i686-pc-linux-gnu-gcc /usr/i686-pc-linux-gnu/gcc-bin/3.4.3/i386-pc-linux-gnu-gcc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum