You are not logged in.
I try to explain, how you can use parallel Gcc.
Gcc 4.0 and 3.4.
It is good, when you must compile a package with 3.4, but you have 4.0
At first download from :http://gcc.gnu.org/mirrors.html the latest 3.4 gcc-core.tar.bz2
Open it in /usr/lib/gcc/i686-pc-linux-gnu/
tar xjf gcc-core-3.4.3.tar.bz2 -C /usr/lib/gcc/i686-pc-linux-gnu/
and then
cd /usr/lib/gcc/i686-pc-linux-gnu/
Make a new directory which is called gcc-build
mkdir gcc-build
Go to the dir:
cd gcc-build
And do
sh /usr/lib/gcc/i686-pc-linux-gnu/gcc-3.4.3/configure
After that make the bootstrap
make bootstrap
And last, install it
make install
We have now, only a little things to do.
cd /usr/local/bin/
ln -s cpp g++
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++
Ok That's all. When you want compile a package with Gcc 3.4, you have to put these two sentences in the PKGBUILD.
CC=/usr/local/bin/gcc
CXX=/usr/local/bin/g++
You must put it after this word
build() {
I have tried it with Trickle, and it works. I use Gcc 4. But compile Trickle with 3.4.
This Howto is good, for everyone who want to use 4.0 and 3.4 at the same time. You haven't to do downgrade your actually system, to 3.4 and then later retry upgrade to 4.0
My English isn't perfect. If I have mistakes, let me know it
Offline
CC=/usr/local/bin/gcc
CXX=/usr/local/bin/g++
AFAIK, the standard place to put these is /etc/makepkg.conf, not in a PKGBUILD.
iphitus
Offline
The standart is Gcc 4.0. Only when you want to use Gcc 3.4, then you put the sentences in PKGBUILD.
What happen when I put these sentences in makepkg.conf,and I compile it makepkg? Compile it with 3.4 or 4.0?
Offline
If you put those in /etc/makepkg.conf, it will compile with 3.4.
The idea is you comment/uncomment them when you need 3.4 or 4.
Its best not to put them in a PKGBUILD, as if you share that pkgbuild, you are giving them your setup, which won't work in most peoples cases.
iphitus
Offline
Thanks for your information.
I write this Howto, because a lot of people have problem, that the old Gcc conflicts with the newer version. For example:
http://bbs.archlinux.org/viewtopic.php?t=17221
But in fact, you have right with the PKGBUILD. These is only good, if somebody has conflicts with some paket, and he need a older version GCC.
Offline
The instructions you give look fairly simple.
Maybe they could be used to make a package ?
To avoid conflicts with the gcc from current, it could have a name like oldgcc-3.4
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
In my opinion, supporting old gcc is the wrong way to go. If software doesn't compile under gcc4, then that software is broken. Supporting gcc3.4 just to compile crappy software is exactly the same as IE supporting broken HTML and thus causing the state of things in the web-design world.
Offline
In my opinion, supporting old gcc is the wrong way to go. If software doesn't compile under gcc4, then that software is broken. Supporting gcc3.4 just to compile crappy software is exactly the same as IE supporting broken HTML and thus causing the state of things in the web-design world.
I see your point, but I think you are wrong. Gcc could also be broken.
Take a look at qemu for example.
Offline
How is GCC broken? If Qemu doesnt work with GCC4, then *Qemu* is broken.
iphitus
Offline
Whats makes you think gcc is perfect?
Offline
How is GCC broken? If Qemu doesnt work with GCC4, then *Qemu* is broken.
iphitus
Whats makes you think gcc is perfect?
...not sure where I ever said that.
Offline
iphitus wrote:How is GCC broken? If Qemu doesnt work with GCC4, then *Qemu* is broken.
iphitus
Whats makes you think gcc is perfect?
...not sure where I ever said that.
Heh, you never did
My point is if applications dont work with gcc in archlinux (since we only got one version), we should consider having to versions installable.
Some commercial applications wont work without having a "old" gcc, when they only deploy binaries.
Offline
There hasnt really ever been a demand or need...... and obviously Arch users havnt been using those commercial apps
Offline