LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2005, 10:54 PM   #1
mcrexx
LQ Newbie
 
Registered: Aug 2005
Location: Ontario, Canada
Posts: 20

Rep: Reputation: 0
GCC upgrading/installation problem


I just re-installed debian on my laptop and am trying to upgrade gcc. BTW, I have AMD64 unofficial sarge 3.1 of debian.

Before upgrading I typed in:

Code:
gcc --version
The console said that my gcc version is:

Quote:
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
So I then to upgrade to gcc-3.4 I typed in:

Code:
apt-get install gcc-3.4
However, when I type in gcc --version AFTER the apt-get installation of gcc-3.4 I still get:

Quote:
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
Can anyone help me understand why gcc wasn't upgraded to 3.4 even after an apt-get?
 
Old 09-16-2005, 11:09 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
What if you do
Code:
gcc-3.4 --version


Your "gcc" package is still version 3.3.5

You just installed another package called "gcc-3.4" which doesn't replace it
 
Old 09-17-2005, 05:12 AM   #3
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
If you want to change that, you have to link gcc, g++, cpp, and probably some more (all in /usr/bin) to the new versions; but do this only if you know what you're doing.
 
Old 09-17-2005, 11:27 AM   #4
mcrexx
LQ Newbie
 
Registered: Aug 2005
Location: Ontario, Canada
Posts: 20

Original Poster
Rep: Reputation: 0
Ohhhh, so that's what apt-get install does. THANK YOU! Another thing learned.

Then I have a problem. My KERNEL gcc version is 3.4.4 and my gcc version is 3.3.5. I want to compile a source file with 3.4 not 3.3, otherwise there is a conflict down the line. How can I tell the compiler to use 3.3 instead of 3.4?
 
Old 09-17-2005, 01:06 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
What do you mean your kernel gcc version? You mean the gcc version you get when you cat /proc/version? That's meaningless -- it's just the version of gcc used to compile the kernel, which doesn't necessarily have any bearing on the gcc version you use on your system. If you want to be sure you're using 3.4 to compile stuff, you should just set the CC environment variable to point to gcc 3.4, e.g.

export CC=/usr/bin/gcc-3.4

Any sane Makefile will respect the CC environment variable.
 
Old 09-17-2005, 01:33 PM   #6
mcrexx
LQ Newbie
 
Registered: Aug 2005
Location: Ontario, Canada
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
If you want to be sure you're using 3.4 to compile stuff, you should just set the CC environment variable to point to gcc 3.4, e.g.

export CC=/usr/bin/gcc-3.4

Any sane Makefile will respect the CC environment variable
Thank you for the reply, I did input that command and compiled my program. Maybe I should start from the beginning.

I am trying to get my wireless internet working with ndiswrapper. After make install, everything seems fine and to double check I input:

Code:
ndiswrapper -l
and I get in return:

Quote:
Installed ndis drivers:
netbc564 driver present, hardware present
But when I input:

Code:
modprobe ndiswrapper
to load the module I get:

Quote:
ndiswrapper: version magic '2.6.8-11-amd64-k8 gcc-3.3' should be '2.6.8-11-amd64-k8 gcc-3.4'
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.8-11-amd64-k8/misc/ndiswrapper.ko): Invalid module format
I can't make heads or tails of this
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading gcc-3.4.3 from gcc-3.3.5 on Debian v3.1 MKSrivastava Debian 2 11-21-2005 11:09 PM
GCC 2.95 nagging installation problem cutesneakers Linux - Software 2 04-13-2005 08:40 AM
Problem with installation of gcc 3.4.3 lxeye Programming 5 01-16-2005 12:03 PM
gcc upgrading problem shams Linux - Software 2 04-22-2004 10:35 PM
Gcc installation problem Agileuk Linux - Newbie 2 09-28-2003 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration