Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Which gcc version am I running? [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
mdl313
n00b
n00b


Joined: 11 May 2003
Posts: 62
Location: New York

PostPosted: Wed May 09, 2012 3:55 pm    Post subject: Which gcc version am I running? [SOLVED] Reply with quote

When doing "gcc-config -l" I get following:
gcc-config -l
[1] x86_64-pc-linux-gnu-4.3.6
[2] x86_64-pc-linux-gnu-4.4.5
[3] x86_64-pc-linux-gnu-4.5.3 *
[4] x86_64-pc-linux-gnu-4.6.3

from which I assume I'm using 4.5.3. "emerge --info" also gives me:
emerge --info
Portage 2.1.10.49 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.2.6-ck x86_64)

However, when I run "echo; gcc --version; echo; g++ --version; " I get following:
gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Why the differences, and which version am I actually using. I would like to use 4.5.3 and go through the "env-update && source /etc/profile" routine when changing compilers. I also re-emerged libtool.
Thanks.


Last edited by mdl313 on Thu May 10, 2012 2:20 am; edited 1 time in total
Back to top
View user's profile Send private message
aCOSwt
Advocate
Advocate


Joined: 19 Oct 2007
Posts: 2042
Location: Between the keyboard and the chair

PostPosted: Wed May 09, 2012 4:03 pm    Post subject: Reply with quote

gcc and g++ are symlinks. What does
Code:
#ls -ails /usr/bin | grep gcc
output ?
_________________
In theory there are no differences between theory and practice. In practice, there are.
Don't try to understand my posts. Immanuel Kant never did, he thinks that only music and laughter do not have to mean anything.
Back to top
View user's profile Send private message
mdl313
n00b
n00b


Joined: 11 May 2003
Posts: 62
Location: New York

PostPosted: Wed May 09, 2012 4:45 pm    Post subject: Reply with quote

Here's output of ls -ails /usr/bin | grep gcc: http://pastebin.com/Njqw7d2J
Back to top
View user's profile Send private message
aCOSwt
Advocate
Advocate


Joined: 19 Oct 2007
Posts: 2042
Location: Between the keyboard and the chair

PostPosted: Wed May 09, 2012 7:10 pm    Post subject: Reply with quote

Hrmmm... what does
Code:
#gcc-config -B
and
Code:
#gcc-config -L
output ?
You can also try a gcc-config --force
_________________
In theory there are no differences between theory and practice. In practice, there are.
Don't try to understand my posts. Immanuel Kant never did, he thinks that only music and laughter do not have to mean anything.
Back to top
View user's profile Send private message
mdl313
n00b
n00b


Joined: 11 May 2003
Posts: 62
Location: New York

PostPosted: Wed May 09, 2012 11:02 pm    Post subject: Reply with quote

gcc-config -B
/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3

gcc-config -L
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3:/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32

gcc-config --force 4
* Switching native-compiler to x86_64-pc-linux-gnu-4.6.3 ...

But, still,
echo; gcc --version; echo; g++ --version;
gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5.....
g++ (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5....

I guess the consensus is that I'm running what gcc-config -l returns (in this case, 4.6.3), and I'll leave it at that.
(I got into this because my efforts to compile Firefox 12/Thunderbird 12 fail with an error message that suggests it's a compiler problem, which I've never had before with FF/TB ebuilds.)

Thanks for prompt feedback.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 3979
Location: Saint Amant, Acadiana

PostPosted: Wed May 09, 2012 11:37 pm    Post subject: Reply with quote

Try removing 4.4.5. You are not risking anything, the active version is 4.5.3 anyhow.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mdl313
n00b
n00b


Joined: 11 May 2003
Posts: 62
Location: New York

PostPosted: Thu May 10, 2012 2:19 am    Post subject: Reply with quote

Removing 4.4.5 did the trick. Without doing anything else,

echo; gcc --version; echo; g++ --version;
gcc (Gentoo 4.6.3 p1.0, pie-0.5.1) 4.6.3....
g++ (Gentoo 4.6.3 p1.0, pie-0.5.1) 4.6.3....

And, I was able to emerge Firefox 12/Thunderbird 12 with newer compilers. Not clear to me why I remained stuck in 4.4.5 despite what gcc-config was reporting.
Thanks again for the help.
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