Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc-config: Profile does not exist or invalid [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 90

PostPosted: Thu Nov 25, 2004 6:55 pm    Post subject: gcc-config: Profile does not exist or invalid [SOLVED] Reply with quote

After upgrading to gcc 3.4.3, gcc-config reports an error in the new profile, but gcc is able to compile all packages. Is there really a problem and what could be causing this error?

Code:
# gcc-config -l
 * /usr/bin/gcc-config: Profile does not exist or invalid setting for /etc/env.d/gcc/x86_64-pc-linux-gnu-3.4.3
[1] x86_64-pc-linux-gnu-3.3.4
[2] x86_64-pc-linux-gnu-3.4.3 *
[3] x86_64-pc-linux-gnu-3.4.3-hardened
[4] x86_64-pc-linux-gnu-3.4.3-hardenednopie
[5] x86_64-pc-linux-gnu-3.4.3-hardenednossp
poohtoo etc # gcc-config 1
 * Switching to x86_64-pc-linux-gnu-3.3.4 compiler...                                                                                                            [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

# source /etc/profile
# gcc-config 2
 * /usr/bin/gcc-config: Profile does not exist or invalid setting for /etc/env.d/gcc/x86_64-pc-linux-gnu-3.4.3
 * Switching to x86_64-pc-linux-gnu-3.4.3 compiler...                                                                                                            [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

# source /etc/profile
Code:
# ls -al /etc/make.profile
lrwxrwxrwx  1 root root 50 Nov 24 07:37 /etc/make.profile -> ../usr/portage/profiles/default-linux/amd64/2004.3
Code:
# cat /etc/env.d/gcc/x86_64-pc-linux-gnu-3.4.3
PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3"
ROOTPATH="/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3"
GCCBITS=" 64"
LDPATH="/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3:/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/32"
MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/man"
INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/info"
STDCXX_INCDIR="g++-v3"
CC="gcc"
CXX="g++"
Code:
# cat /etc/make.conf
# These settings were set by the catalyst build script that automatically built this stage
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
#FEATURES="-sandbox"
USE="-qt -kde gtk gnome"
CXXFLAGS="${CFLAGS}"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"


Last edited by mieses on Sun Nov 28, 2004 9:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
PC_Freak
n00b
n00b


Joined: 29 Dec 2003
Posts: 63

PostPosted: Sun Nov 28, 2004 10:01 am    Post subject: Reply with quote

I have this problem too. I don't know yet if everything works normally with this error...
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 940
Location: /dev/null

PostPosted: Sun Nov 28, 2004 10:57 am    Post subject: Reply with quote

Seems that 3.4.3 put the files in the wrong locations from what I read in bugzilla I got around it by just copying both into both locations. The only prog I had fail on compiling was grub 0.95.

Wierd issue I have 1 machine that upgraded from 3.4.2 that had no errors at all but the new install had alot.

Also on my upgraded install /usr/lib/gcc is a symlink to /usr/lib/gcc-lib
On the fresh install they are seperate directories.
Possibly the 3.4.3 needs some bugs worked out of it.

Code:
cp -r /usr/lib/gcc /usr/lib/gcc-lib
cp -r /usr/lib/gcc-lib /usr/lib/gcc


The error quit after that.

Make sure to back these up before you try it.

[edit]
removed /usr/lib/gcc and symlinked it to /usr/lib/gcc-lib
no errors so far will post in the morning installing xorg & gnome overnight.
[/edit]
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 90

PostPosted: Sun Nov 28, 2004 12:10 pm    Post subject: Reply with quote

Thanks, your suggestion worked.
After upgrading from 3.3.4 to 3.4.3, /usr/lib/gcc and /usr/lib/gcc-lib were separate directories with the following difference:
Code:
# ls -al /usr/lib/gcc/x86_64-pc-linux-gnu
total 4
drwxr-xr-x  3 root root   18 Nov 24 06:38 .
drwxr-xr-x  3 root root   32 Nov 24 06:38 ..
drwxr-xr-x  5 root root 4096 Nov 24 07:49 3.4.3
# ls -al /usr/lib/gcc-lib/x86_64-pc-linux-gnu
total 4
drwxr-xr-x  3 root root   18 Aug 28 12:21 .
drwxr-xr-x  3 root root   32 Feb  1  2004 ..
drwxr-xr-x  4 root root 4096 Aug 28 12:20 3.3.4

After copying them over each other, both direcotries contain 3.3.4 and 3.4.3, and the error is gone.
Back to top
View user's profile Send private message
Mythos
l33t
l33t


Joined: 02 May 2004
Posts: 953
Location: Portugal

PostPosted: Sun Nov 28, 2004 1:04 pm    Post subject: Reply with quote

Yes there are an error in gcc, i think this is the bug page:

https://bugs.gentoo.org/show_bug.cgi?id=72557
_________________
Best Regards,
Sérgio Henrique
Linux dune 3.0.6-gentoo #1 SMP Thu Oct 27 16:47:29 WEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux
Back to top
View user's profile Send private message
Imago
Apprentice
Apprentice


Joined: 25 Nov 2004
Posts: 157
Location: Germany

PostPosted: Sun Nov 28, 2004 2:26 pm    Post subject: Reply with quote

Hi
it's not a bug in gcc as far as i understand it. The devs obviously decided to install libraries for GCC 3.4 in /usr/lib/gcc instead of /usr/lib/gcc-lib/. At least there is a corresponding switch in toolchain.eclass which is used by gcc ebuilds.

Only gcc-config doesnt know about that path changes. Thus its complaing about invalid profile. Imho the correct way should be to fix gcc-config not to linking/copying around the gcc libs ;)

simply use the patch for gcc-config i submitted for Bug #72557
Code:

wget -O /root/gcc-config.patch http://bugs.gentoo.org/attachment.cgi?id=44780
cd /usr/bin
patch < /root/gcc-config.patch


Or let it complaining about the missing profile, as it doesnt harm your system in any way. gcc profile switching works nevertheless.

Cu
Imago
Back to top
View user's profile Send private message
nuzzy
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2003
Posts: 106
Location: NH, USA

PostPosted: Sun Nov 28, 2004 3:22 pm    Post subject: Reply with quote

[Imago] wrote:
Hi
it's not a bug in gcc as far as i understand it. The devs obviously decided to install libraries for GCC 3.4 in /usr/lib/gcc instead of /usr/lib/gcc-lib/. At least there is a corresponding switch in toolchain.eclass which is used by gcc ebuilds.

Only gcc-config doesnt know about that path changes. Thus its complaing about invalid profile. Imho the correct way should be to fix gcc-config not to linking/copying around the gcc libs ;)

simply use the patch for gcc-config i submitted for Bug #72557
Code:

wget -O /root/gcc-config.patch http://bugs.gentoo.org/attachment.cgi?id=44780
cd /usr/bin
patch < /root/gcc-config.patch


Or let it complaining about the missing profile, as it doesnt harm your system in any way. gcc profile switching works nevertheless.

Cu
Imago


I tried your patch and get the following:

Code:
patching file gcc-config
Hunk #1 FAILED at 459.
1 out of 1 hunk FAILED -- saving rejects to file gcc-config.rej

_________________
VMware Fusion on a Macbook Pro running Gentoo
Back to top
View user's profile Send private message
nuzzy
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2003
Posts: 106
Location: NH, USA

PostPosted: Sun Nov 28, 2004 3:40 pm    Post subject: Reply with quote

For the time being I just symlinked it:

Code:
athlon64 #cd /usr/lib/gcc-lib/x86_64-pc-linux-gnu

athlon64 x86_64-pc-linux-gnu #ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3 .


and it works fine.
_________________
VMware Fusion on a Macbook Pro running Gentoo
Back to top
View user's profile Send private message
Imago
Apprentice
Apprentice


Joined: 25 Nov 2004
Posts: 157
Location: Germany

PostPosted: Sun Nov 28, 2004 3:57 pm    Post subject: Reply with quote

uh, sry the patch only applies to gcc 1.3.6-r3. Think youre using 1.3.7.
But as you said symlinking also does the trick ;)
Now as the devs are aware of the error, i think we will see soon a corrected gcc-config via portage :)

CU
Imago
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 90

PostPosted: Sun Nov 28, 2004 9:38 pm    Post subject: Reply with quote

gcc-config-1.3.6-r4 solves the bug.
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 940
Location: /dev/null

PostPosted: Sun Nov 28, 2004 10:54 pm    Post subject: Reply with quote

gcc-config has been patched, now available in portage ;-)

Code:
# ChangeLog for sys-devel/gcc-config
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.65 2004/1$
*gcc-config-1.3.7-r2 (28 Nov 2004)

  28 Nov 2004; Travis Tilley <lv@gentoo.org> files/gcc-config-1.3.6,
  files/gcc-config-1.3.7, -gcc-config-1.3.6-r3.ebuild,
  +gcc-config-1.3.6-r4.ebuild, -gcc-config-1.3.7-r1.ebuild,
  +gcc-config-1.3.7-r2.ebuild:
  Fixed Bug 72557, where gcc-config would get very confused with non-gcc-lib
  ldpaths
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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