Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC problem : broken during emerge [SOLVED]
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
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 10:41 am    Post subject: GCC problem : broken during emerge [SOLVED] Reply with quote

Hi,

I was on my way of upgrading my X server with emerge --deep xorg-server, when portage wanted to upgrade GCC 4.1.1-r1 to the latest version available (aka. GCC-4.1.2).
The merge of GCC seemed to raise no problem, but the next emerging package (glibc-2.6.1) has broke.
In fact, it seems that GCC can't be find again on my system.

If I type "gcc", it says that "gcc-config error: Could not run/locate "gcc"".
A gcc-config -l command issue the following :
Quote:

10PARC luc # gcc-config -l
* gcc-config: Could not get portage CHOST!
* gcc-config: You should verify that CHOST is set in one of these places:
* gcc-config: - //etc/make.conf
* gcc-config: - active environment


But I didn't change in my /etc/make.conf as this upgrade happened during an upgrade process :
Quote:

10PARC luc # cat /etc/make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
#CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
#CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -mtune=pentium4 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j3"
CXXFLAGS="${CFLAGS}"
LINGUAS="fr"
USE="qt kde alsa oss usb mmx sse sse2 nvidia xv xvmc xvid mozilla java pic ppds gimpprint gimp nsplugin irda aac tiff x264 -gtk -gnome -ipv6"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
FEATURES="parallel-fetch"
#FEATURES="collision-protect parallel-fetch"

#@SANE_BACKENDS="sane-snapscan"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="nvidia fbdev vesa"
CLEAN_DELAY=0

#source /usr/portage/local/layman/make.conf
#PORTDIR_OVERLAY="$PORTDIR_OVERLAY /usr/local/portage"
#PORTDIR_OVERLAY="/usr/portage/local/layman/ffmpeg-svn"



I also tried "env-update" but with no luck.
Thanks for your help as my computer is less and less stable and I'm not sure I can even reboot it without a live-cd !


Last edited by E001754 on Thu Feb 21, 2008 1:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Wed Feb 20, 2008 11:04 am    Post subject: Reply with quote

Are your config files up-to-date? Try dispatch-conf to make sure.

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 11:44 am    Post subject: Reply with quote

There was about 170 files to be updated (mainly keyboards layout for various countries), but that didn't changed anything for gcc...
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Wed Feb 20, 2008 11:48 am    Post subject: Reply with quote

You did env-update && source /etc/profile ?

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 1:13 pm    Post subject: Reply with quote

I run it before dispatch-conf.
I re-run it just now, and still, nothing changes

I checked meanwhile that 4.1.2 is installed, and yes, it's installed in /usr/i686-pc-linux-gnu/gcc-bin/4.1.2/.
I even got a symlink called "gcc" that points to i686-pc-linux-gnu-gcc in this directory.

I also got a a file called "i686-pc-linux-gnu-4.1.2" in /etc/env.d/gcc which contains the following :

Quote:
10PARC gcc # cat i686-pc-linux-gnu-4.1.2
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.2"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.2"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.2"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info"
STDCXX_INCDIR="g++-v4"


Everythings seems ok, but nothing works !
Perhaps is it only the path to update, but i dont know how to do this ? In MS-DOS when I was younger, there was a path variable that you could update with a simple 'set' command so that the program can be found, but in linux I have no idea on how to do that. Probably either that for gcc things are slightly different ?
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Wed Feb 20, 2008 1:45 pm    Post subject: Reply with quote

And you still can't run gcc-config -l ?
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 1:54 pm    Post subject: Reply with quote

yep, I still can't.
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Wed Feb 20, 2008 1:59 pm    Post subject: Reply with quote

What happens if you run /usr/bin/gcc --version ?

If you can't run that, my best bet would be to boot off a live-cd, chroot into your system and remerge gcc

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 2:23 pm    Post subject: Reply with quote

In fact, in this /usr/bin/ I got :

Quote:
ll gc*
-rwxr-xr-x 1 root root 8092 Jan 18 20:26 gc
-rwxr-xr-x 1 root root 8868 Nov 15 2006 gcc
lrwxrwxrwx 1 root root 58 Dec 4 2006 gcc-3.3.6 -> /usr/i686-pc-linux-gnu/gcc-bin/3.3.6/i686-pc-linux-gnu-gcc
lrwxrwxrwx 1 root root 58 Feb 20 01:37 gcc-4.1.2 -> /usr/i686-pc-linux-gnu/gcc-bin/4.1.2/i686-pc-linux-gnu-gcc
-rwxr-xr-x 1 root root 20805 Feb 19 22:21 gcc-config
-rwxr-xr-x 1 root root 8868 Dec 4 2006 gcc32
-rwxr-xr-x 1 root root 2036 Nov 30 2006 gccmakedep
-rwxr-xr-x 1 root root 42384 Dec 4 2006 gconf-merge-tree
-rwxr-xr-x 1 root root 7784 Sep 19 2004 gconfigger
-rwxr-xr-x 1 root root 50380 Dec 4 2006 gconftool-2


But I cant run the gcc which is here. However, running gcc from /usr/i686-pc-linux-gnu/gcc-bin/4.1.2 is ok.

Is it enough to reboot and try with chroot ?
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Wed Feb 20, 2008 2:46 pm    Post subject: Reply with quote

Quote:
Is it enough to reboot and try with chroot ?


If you reboot and chroot into your setup you should be able to emerge gcc again.

You should:
1) reboot on live cd
2) mount your partitions
3) chroot into your environment
4) run env-update && source /etc/profile
5) emerge gcc
6) wait :)

Hopefully, that will leave you with a running system.

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 3:19 pm    Post subject: Reply with quote

ok, let's rock !
I'll shutdown in a few moments, time to save some files and let you know the results

thanks anyway for your precious help so far
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Wed Feb 20, 2008 6:21 pm    Post subject: Reply with quote

No, same results : I've booted with a liveCD (not the Gentoo LiveCD I've to admit) and the result is exactly the same : still can't find GCC on my computer.
I'm currently running this LiveCD, my gentoo can't boot in X session.
The rest of my computer is broken as I need probably to run fix-libtool_files.sh but I can't as he can't find gcc.

Is there any other way than a complete gentoo reinstall ??
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Thu Feb 21, 2008 6:48 am    Post subject: Reply with quote

If you boot on a Gentoo livecd you can emerge portage again. I assumed that was the livecd we talked about, sorry for not being explicit about it.
With the Gentoo livecd you will have a working gcc so you can emerge a new one on your system.

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Thu Feb 21, 2008 9:27 am    Post subject: Reply with quote

I managed to get gcc working again, even without using the Gentoo LiveCD.
In fact, there was a gcc file in my /usr/bin but this 8 kB file couldn't be the real compiler and wasn't a symlink.
I renamed it and made a link to the 4.1.2 compiler and it worked again !
I downgraded gcc to 4.1.1-r3 and the emerge goes fine even if gcc-config still complains about not finding CHOST variable ?
I'm just finishing my xorg-server update and I'll try to fix that CHOST issue with a real Gentoo-Live CD, but I already re-emerged portage with no luck on side of the gcc-config.

I've also removed the gcc link that I've manually made for gcc-4.1.2 compiler to found since I remerged 4.1.1-r3 and everything seems to run smooth.

Stay tuned for more to come soon, but still many many thanks for the help you gave to me !!!

:D
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Thu Feb 21, 2008 9:41 am    Post subject: Reply with quote

Your welcome :) I'll stay tuned.
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Thu Feb 21, 2008 12:58 pm    Post subject: Reply with quote

ok, back on rails with KDE 3.5 and Gentoo up and running.

Still, huge thanks for your precious help, but still I think my gentoo is kind of unstable as gcc-config still refuses to work.
I don't care, I change my computer in a month. I'll recompile everything from scratch with my new gentoo.

I also had problem with "libexpat.so.0", but I made the link manually and it's ok now.

As always, I really like gentoo, but it's annoying to have so much problems each time you want to do an upgrade.
Perhaps the upgrades are less dangerous when waiting for official releases, but I'm always having lot of troubles when emerging world for an update.
Probably the price to pay for having a full customized linux ?
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Thu Feb 21, 2008 8:13 pm    Post subject: Reply with quote

Sounds like revdep-rebuild could save you some trouble? Your choice - a new box is always a good candiate for gentoo :)

Have fun.

/kiksen
Back to top
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 442
Location: Paris, France

PostPosted: Thu Feb 21, 2008 9:03 pm    Post subject: Reply with quote

I don't trust revdep-rebuild at all !
revdep-rebuild is the devil sometimes :twisted:

Earlier today, after that I've to finish compiling all my upgrade, I said that I had a problem with a library that couldn't be found : libexpat.so.0.
It was a simple symbolic link to make in /usr/bin to fix the problem.
If I had followed the revdep-rebuild script, I'll still be compiling one of the 100+ ebuilds he wanted to rebuild, among some being hard-masked.

Anyway, run here, revdep-rebuild says my system is ok (glad to know that !)

:D
Back to top
View user's profile Send private message
kiksen
Guru
Guru


Joined: 24 Jun 2002
Posts: 401
Location: Denmark

PostPosted: Thu Feb 21, 2008 9:29 pm    Post subject: Reply with quote

I haven't got a lot of bad experience with revdep-rebuild. I'd say that if revdep-rebuild wanted to build 100+ packages you would have problems bigger than revdep-rebuild anyway ;)

Glad your box is ok now. Take good care of it :p

/kiksen
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