Results 1 to 9 of 9
Hello
I am using Mandriva 2005 LE. And I have made some updates through cooker sources... I have updated to KDE 3.4.1 and some programs for everyday use. And now ...
- 07-02-2005 #1Just Joined!
- Join Date
- Jul 2005
- Posts
- 7
having 2 gcc versions installed in the same distribution
Hello
I am using Mandriva 2005 LE. And I have made some updates through cooker sources... I have updated to KDE 3.4.1 and some programs for everyday use. And now I have installed on my system: gcc (GCC) 4.0.1 (4.0.1-0.2mdk for Mandriva Linux release 2006.0). But I have realised that some aplications cannot be corretly compiled with this version of gcc but with: gcc (GCC) 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk).
Now I know that it is possible to have installed both gcc versions. And that is what I need. But I don`t know how to do it --> that I wont crash my distribution.
So I am asking you good people out there if you could help me, a newbiee, how to install the older version of gcc. And then how to compile aplications with this older version?
have a nice day,
Bug
- 07-04-2005 #2
Read:
http://gcc.gnu.org/faq.html#multiple
Witch basically sais that you use "./configure --prefix=[dir]" on two different directorys for the two verions and then you make symlinks as for example: /usr/bin/gcc to the 3.4.3 release and a symlink /usr/bin/gcc2 to the 4.0.1 release.
- 07-07-2005 #3Just Joined!
- Join Date
- Jul 2005
- Posts
- 7
Yes... I am doing by those instructions but when I type make bootstrap...system starts to compile. But then compiling stops with error message:
gcc -c -g -gnatpg -gnata -I- -I. -Iada -I./ada ada/ada.ads -o ada/ada.o
fatal error: system.ads is incorrectly formatted
missing line for parameter: Preallocated_Stacks
compilation abandoned
make[2]: *** [ada/ada.o] Error 1
make[2]: Leaving directory `/home/vedro/Downloads/gcc-3.4.3/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/home/vedro/Downloads/gcc-3.4.3/gcc'
make: *** [bootstrap] Error 2
I have read here http://www.experts-exchange.com/Prog..._21462990.html that this problem is because I`m trying to install an older version on a new one?!
Help me.... I realy need gcc 3.4.3 version...
Have a nice day,
Bug
- 07-07-2005 #4
heh. So basically you're saying that you can't compile gcc-3.4.3 with gcc4? Haha. that's classic.
It pains me to give this advice, but why not just grab an RPM of 3.4.3 install that way?
- 07-08-2005 #5Just Joined!
- Join Date
- Jul 2005
- Posts
- 7
ellow....
Yes, why don`t but there one very strange situation.... U have downloaded gcc-c++-3.4.3-7mdk.i586.rpm from the main sources... in the console typed urpmi gcc-c++-3.4.3-7mdk.i586.rpm but the system said that that package is already installed???!!
Then I typed update-alternatives --config gcc to see what versions I can use and it has displayed to me:
There are 4 programs which provide `gcc'.
Selection Command
-----------------------------------------------
1 /usr/bin/gcc-4.0.1
2 /usr/bin/gcc-3.3.4
*+ 3 /usr/bin/colorgcc
4 /usr/bin/gcc-2.96
So where is gcc 3.4.3 If the system says that it is installed???
Over the Mandrake Control Center in the section where you remove packages, there is no package gcc-c++-3.4.3-7mdk to be removed. So I have an idea to remove the package from the shell - urpmd and then installing it again. Would that be a vise decision?
And from where do I hava gcc 3.3.4 installed?
Have a nice day,
Bug
- 07-08-2005 #6
Maybe you have gcc-3.3.4 installed, have you checked if the folder /usr/bin/gcc-3.3.4 exists?
If it does you dont have to install anything, just make a symlink to the gcc binary in it.
- 07-08-2005 #7Just Joined!
- Join Date
- Jul 2005
- Posts
- 7
hmmm...there is no problem to use gcc 3.3.4 . When I type the update-alternatives --config gcc comand I can choose which version of gcc I want to use: Enter to keep the default[*], or type selection number: And I have chosen 3.3.4, so the cgg --verion comand writes out:
gcc --version
gcc (GCC) 3.3.4 (Mandrakelinux release 3.3.4-5mdk)
Copyright (C) 2003 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.
Now that is OK, but where could gcc 3.4.3 be if the system says that it is installed?
Are there major diferences betwen 3.3.4 and 3.4.3?
have a nice day,
Bug
- 07-08-2005 #8
Ah, it says that the package is already installed because the package is 3.x
if you want both you have to install from source since urpmi cant install a package in another directory (I think).
You can do a update by adding --update to the command as such:
but then you will loose the gcc-3.3.4 version. That shouldn't affect your system so much since most programs complies on either 3.x or 4.x and not the exact version.Code:urpmi --update gcc-c++-3.4.3-7mdk.i586.rpm
- 07-08-2005 #9Just Joined!
- Join Date
- Jul 2005
- Posts
- 7
hmmm...
still says: Packges are already installed
What to do?
have a nice day,
Bug


Reply With Quote
