LinuxQuestions.org
Review your favorite Linux distribution.
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-29-2005, 11:28 PM   #1
limneos
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
Suse 9.3 gcc-g++ Installation Problem


Hello...
I have recently installed Suse 9,3 and one application needs g++ 3.4 in order to work.
The Suse 9.3 distribution comes with gcc-g++ 3.3.5.5 and version 3.4 is NOT avaiable, either on the installation CDs or the online update through Yast.
Therefore , I had to forget the convenient way of RPMs and look for the packages elsewhere.
I finally found the packages:

gcc-3.4.1.tar.gz
and
gcc-g++-3.4.1.tar.gz

I sucessfully compiled and installed the first , gcc-3.4.1.tar.gz.

My problem is with the second , the g++.
When I "tar -zxvf" the archive, I get two folders, libstdc++-v3 and gcc...
in folder gcc is another folder,"cp" with .h files.
in folder libstdc++-v3 is a "configure" file, but when I run it, it exits with an error:

"Cannot find install-sh in ./../.."
So I guessed I had to move the folders into the previous installation of gcc.
when I run configure now, I get another "cannot find file" error...
So I guess I'm doing something wrong generally....

What is the proper way to install gcc 3.4? and g++ ?
Is it so hard to be done?

Thank you all in advance for your help.
 
Old 09-30-2005, 12:13 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
i don't know for sure but possibly you have slackware packages there
use a package from here
ftp://mirrors.laffeycomputer.com/pub.../gcc/releases/

please never install a non-distribution compiler --prefix=usr over your other original one
everything will get borked
gcc versions are not reverse compatable

to get g++ just use
--enable-languages=c,c++

generally unless you know what you are doing compiling a new compiler with an older version is a little tricky and you could end up with junk from both mixed together

i hesitate to put this because i am not 100% sure but i think for that version you should use this
i say put it in /opt/gcc-3.4 to be safe
start off in the package directory after you untar it then
Code:
mkdir ../gcc-build
cd ../gcc-build
../gcc-3.4.0/configure --prefix=/opt/gcc-3.4  --enable-shared --enable-threads=posix --enable-__cxa_atexit  --enable-languages=c,c++
(i'm not sure about --enable-__cxa_atexit i know it works for 3.4.1 if it doesn't recognize the flag leave it out)
then and this bootstap switch is important
Code:
make bootstrap
make install
after you are done you will have to add the lib path /opt/gcc-3.4/lib to /etc/ld.so.conf and as root run
ldconfig

Last edited by foo_bar_foo; 09-30-2005 at 12:16 AM.
 
Old 09-30-2005, 03:03 AM   #3
praveenr
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 5

Rep: Reputation: 0
hi,

first you download the gcc-3.4.1.tar.gz properly,then use this cmd
gunzip gcc-3.4.1.tar.gz
then tar -xvf gcc-3.4.1.tar then u get a directory there u search for make or install.sh or setup and install it,

regards
praveenr
 
Old 09-30-2005, 09:53 AM   #4
limneos
LQ Newbie
 
Registered: May 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Hello again..

foo_bar_foo, I did exactly what you wrote and the installation finished without any errors.

I also added the line in ld.so.conf and ran ldconfig as root, no errors either.
But when I try to run the program , it still says that I need 3.4 or later...
I checked the folder /opt/gcc-3.4.1 and exists properly with all the folders inside.

Is there something I must do to make the system "See" the new gcc? should I remove the old gcc 3.3.5.5 from Yast?
what is the safe procedure to do this and let the system see the newly installed gcc?

Thank you all for your help,

Limneos
 
Old 09-30-2005, 07:27 PM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,829

Rep: Reputation: 257Reputation: 257Reputation: 257
You do not want to replace these packages with the latest versions. You want to goto:

Control Center>yast2 modules>software>change source of installation

Give an ftp source like

mirrors.kernel.org

/suse/i386/9.3

anonymous

and make this the only active source

Then:

Finish

Then:

Install and remove software

Wait

select:

Package groups

go all the way to the bottom

select the last item:

All

scroll to the g's

on the packages you want to update, or install:

right click on the package name

select what you want to do

Do this for every package you want to update or install.

Do not use compiler versions that are not designed for SuSE 9.3

That is one package you should let SuSE update. It is a very critical package
 
  


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
Problem with new installation of SUSE, gcc & make not found abefroman SUSE / openSUSE 5 01-18-2008 01:36 PM
GCC 2.95 nagging installation problem cutesneakers Linux - Software 2 04-13-2005 08:40 AM
gcc -2.95 installation in Suse 9.1 Personal help needed. cutesneakers Linux - Software 2 04-04-2005 11:23 AM
Problem with installation of gcc 3.4.3 lxeye Programming 5 01-16-2005 12:03 PM
Gcc installation problem Agileuk Linux - Newbie 2 09-28-2003 07:11 PM


All times are GMT -5. The time now is 04:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration