LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2006, 04:38 PM   #1
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Rep: Reputation: 0
trying to install gcc4.3 from downloaded archive


Hi folks
To install my LAN and audio drivers I need gcc version 3.4 (version 4 is on my installation - ubuntu). I cannot use apt-get cos I cannot get online. Also v3.4 not on install CD.

I've downloaded v3.4 from gcc but am stuck with how to install from this. I am new to all this and would be really grateful for guidance so that I can get online and sort everything else out.

I don't expect to be spoon fed forever, but I have been stuck with this for 3 days.

thanks
Picc
 
Old 04-08-2006, 04:56 PM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
before you try any of this, have you tried the forcedeth driver for your network? also, iirc most nvidia sound chips work with the snd-intel8x0 alsa driver so you might want to try:
Code:
modprobe forcedeth
modprobe snd-intel8x0
modprobe snd-pcm-oss
and see if you are able to connect to the network and get sound ( if the intel8x0 driver works, don't forget to open up a mixer and unmute the sound channels).


if the kernel was built with gcc-4.x (which it probably was since that's the version that shipped with your distro), then any drivers you build for your kernel will have to be built with the same version ( or you will have to recompile the kernel with gcc-3.4, then build your drivers, and if you are using ati or nvidia drivers, they will have to be redone too since they were built with a different version of gcc).

There are many ways to do this, here's the way i personally do it:

untar the gcc-3.4 tarball
cd into it, and make a work directory:
Code:
cd gcc-xxx
mkdir build
cd build
then configure it, makeing the prefix /opt/gcc-xxx:
Code:
../configure --prefix=/opt/gcc-3.4 --enable-shared --enable-threads=posix --enable-clocale=gnu --enable-languages=c
make
make install
ln -s /opt/gcc-3.4/bin/gcc /opt/gcc-3.4/bin/cc
note that only the c compiler will be built using this method, if you want c++ or anything else change the --enable-languages line ( but you already have all that with the one you have on your system (the 4.x version)) Also note that the configure command starts with two dots instead of one since it is in the parent directory not in the current one.

to use the new compiler when you install the drivers, enter this line in your terminal:
Code:
export PATH=/opt/gcc-3.4/bin:$PATH
to test it out (after the above line has been entered):
Code:
gcc -v
you should get your configure command and version 3.4.

Another way to do it is use the above configure command, and add the option --program-suffix=-3.4 to configure. Then you can install it into /usr and it will not clash with your current compiler. I'd recommend the other method, as it makes removal much easier ( just remove the /opt/gcc-3.4 directory and that's it).

Last edited by __J; 04-08-2006 at 05:09 PM.
 
Old 04-08-2006, 05:18 PM   #3
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
many thanks for replying

I haven't started this process yet because I am confused. I am trying to install network & audio driver package from Nvidia. when I run the .run installer I get the following:

"No precompiled kernel interface was found to math your kernel; this means that the installer will need to compile a new kernl interface.

when I OK that I am told
"you appear to be compiling the Nvidia kernel module with a different compiler than the one that was used to compile the running kernel. This may be fine, but there are cases where this can lead to instability. The compiler used to compile the kernel was gcc 3.4; the current compiler is gcc 4.0.

I can then try compiling anyway or abort. I've tried both!!!

So. should I follow your instructions to install gcc 3.4 or not??

thanks
Picc
 
Old 04-08-2006, 05:23 PM   #4
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
I should add that if I ignore version conflict and continue with installation, it seems to do something (status bar runs to 100%) then I get:

ERROR Unable to load the kernel module 'nvsound.ko'. THis is most likely because the kernel module was built using the wrong kernel source files for your kernel;[follows a Red-Hat example]. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' commandline option.

Does this help??

Picc
 
Old 04-08-2006, 05:29 PM   #5
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
can copy the install log file if that helps - hoped to attach it but dont think I can??
 
Old 04-08-2006, 05:31 PM   #6
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
yeah according to the nvidia driver your kernel was built with 3.4, so you'll need 3.4 to build any drivers for your kernel. you will also need the sources for your kernel ( check the install cd/dvd, i don't know if ubuntu ships with the kernel sources or not)
 
Old 04-08-2006, 05:33 PM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
do you have a directory called linux-2.6.12 (or similar) under /usr/src?
 
Old 04-08-2006, 05:46 PM   #8
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by __J
do you have a directory called linux-2.6.12 (or similar) under /usr/src?
no - I have linux-headers-2.6.12-9 and ditto+amd64-generic - I came up against this before and tried to sort it.

I've tried your compiling instructions and hit some errors
will copy them to you shortly

many thanks for your continued assistance.

Picc
 
Old 04-08-2006, 05:50 PM   #9
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
I got as far as this:

Code:
piccolo@highwood:~/gcc-3.4.0/build$ make install
/bin/sh ../mkinstalldirs /opt/gcc-3.4 /opt/gcc-3.4
mkdir -p -- /opt/gcc-3.4 /opt/gcc-3.4
mkdir: cannot create directory `/opt/gcc-3.4': Permission denied
mkdir: cannot create directory `/opt/gcc-3.4': Permission denied
make: *** [installdirs] Error 1
piccolo@highwood:~/gcc-3.4.0/build$ sudo make install
/bin/sh ../mkinstalldirs /opt/gcc-3.4 /opt/gcc-3.4
mkdir -p -- /opt/gcc-3.4 /opt/gcc-3.4
/bin/sh: line 0: cd: intl: No such file or directory
make: *** [install-intl] Error 1
piccolo@highwood:~/gcc-3.4.0/build$
when I got the "permission denied" I tried using sudo!!??

RE kernel sources - I tried to find what I needed here http://www.kernel.org/
couldn't get my head around what I needed.
thanks
picc

Last edited by piccolo solo; 04-08-2006 at 05:54 PM.
 
Old 04-08-2006, 06:03 PM   #10
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
one of the problems with kernel sources ( which is different from kernel headers, you should never need to alter your kernel headers package) is many distro's patch the kernel according to what they want, the sources on kernel.org are "vanilla" sources, they contain no patches that the distro has put in to make their kernel.

with your output above, for some reason it's not finding the intl directory, since you only need a limited compiler to do a one time build, try:
Code:
sudo make -i install
and hopefully it will be alright. I'm thinking you must have sources somewhere since the nvidia driver did build the driver ( otherwise it would have failed).
 
Old 04-08-2006, 06:23 PM   #11
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by __J
one of the problems with kernel sources ( which is different from kernel headers, you should never need to alter your kernel headers package) is many distro's patch the kernel according to what they want, the sources on kernel.org are "vanilla" sources, they contain no patches that the distro has put in to make their kernel.

with your output above, for some reason it's not finding the intl directory, since you only need a limited compiler to do a one time build, try:
Code:
sudo make -i install
and hopefully it will be alright. I'm thinking you must have sources somewhere since the nvidia driver did build the driver ( otherwise it would have failed).

Do I enter this code then do the whole thing again?
 
Old 04-08-2006, 06:29 PM   #12
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
it looks like you already built it, so once you do that it should be installed then proceed with the "export PATH...." part
 
Old 04-08-2006, 06:43 PM   #13
piccolo solo
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu - Breezy
Posts: 16

Original Poster
Rep: Reputation: 0
started over

I stopped when this far

Code:
piccolo@highwood:~$ cd gcc-3.4.0
piccolo@highwood:~/gcc-3.4.0$ mkdir build
piccolo@highwood:~/gcc-3.4.0$ cd build
piccolo@highwood:~/gcc-3.4.0/build$ ../configure --prefix=opt/gcc-3.4 --enable-shared --enable-threads=posix --enable-clocale=gnu --enable-languages=c
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
     target-libstdc++-v3 target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
    (Any other directories should still work fine.)
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-as... no
checking for as... as
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for x86_64-unknown-linux-gnu-ld... no
checking for ld... ld
checking for x86_64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-unknown-linux-gnu-windres... no
checking for windres... windres
checking for x86_64-unknown-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for x86_64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-as... no
checking for as... as
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for x86_64-unknown-linux-gnu-ld... no
checking for ld... ld
checking for x86_64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-unknown-linux-gnu-windres... no
checking for windres... windres
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
piccolo@highwood:~/gcc-3.4.0/build$ sudo make -i install
/bin/sh ../mkinstalldirs opt/gcc-3.4 opt/gcc-3.4
mkdir -p -- opt/gcc-3.4 opt/gcc-3.4
/bin/sh: line 0: cd: intl: No such file or directory
make: [install-intl] Error 1 (ignored)
/bin/sh: line 0: cd: libiberty: No such file or directory
make: [install-libiberty] Error 1 (ignored)
piccolo@highwood:~/gcc-3.4.0/build$
where to go from here??
I'd appreciate another pointer - but I'm shattered and need to get to bed. I'd be grateful if i could pick you up on this again
Picc
 
Old 04-08-2006, 07:45 PM   #14
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
ok, i saw you had a 64-bit processor but didn't know you were running the 64-bit version of ubuntu. it looks like you have just gcc installed, but not the rest of the build environment (mainly it looks like you are missing binutils). Ubuntu has a package called "build-essential" that you will need, unfortunately, you need net access to get it.

Did the forcedeth driver work for you? if it loads ok you should be able to get on the net with it, if you use dhcp to configure your network once you have the driver loaded you will have to run either dhcpcd or dhclient (you will have to use sudo for both of those commands) (Also, once you have this up and going, it will be done at boot for you). if this works then you can either keep it, or just use it temporarily to download what you need with synaptic/apt-get and get the proprietary nvidia drivers to work.

what is the exact ethernet chipset you are running? if you don't know, try:
Code:
lspci -v
you should have something like this ( this is what i have on a realtek 8139 card: )
Code:
0000:00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RT8139
        Flags: bus master, medium devsel, latency 64, IRQ 169
        I/O ports at d000 [size=256]
        Memory at cfffdf00 (32-bit, non-prefetchable) [size=256]
        Capabilities: <available only to root>
 
Old 04-08-2006, 07:56 PM   #15
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
check out this link too:

http://www.planetamd64.com/lofiversi...hp/t11342.html
 
  


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
downloaded 'Mepis' cant install! randell6564 Linux - Distributions 10 11-22-2005 12:52 AM
downloaded firefox, now how to install it? learnfast Linux - Newbie 8 03-14-2005 09:44 AM
Unexpected EOF in archive when install Gentoo 1.4 stage1 cirofren Linux - Distributions 1 11-06-2003 01:56 AM
Proper way to install downloaded? Tyir Linux - Newbie 8 10-29-2003 07:34 AM
importing an MS Outlook archive archive.pst alloydog Linux - Software 2 08-29-2003 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 AM.

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
Open Source Consulting | Domain Registration