You are not logged in.
Pages: 1
I need to compile an old piece of software which requires gcc-4.x where x>=8. Newer and older versions are said to fail.
It needs the g++ and gfortran compilers of that version.
I found this thread and downloaded the gcc-48 from the AUR.
Following the steps in the above thread
export CC=/usr/bin/x86_64-pc-linux-gnu-gcc-4.8
export FC=/usr/bin/x86_64-pc-linux-gnu-gfortran-4.8
export CXX=/usr/bin/x86_64-pc-linux-gnu-g++-4.8and then running gcc --version results still in 11.1.0.
Is that even the correct way to get the compiler version to 4.8 or am I making some mistakes here ?
Offline
"gcc --version" is still calling the /usr/bin/gcc binary.
How are you building this software? Does it have a configure script that recognises CC etc?
Offline
You can always download the version of gcc that you need in i.e. /opt/ and run ./configure and make there. However, you might find that it fails to compile due to missing dependencies and you can get yourself in a catch 22 situation.
On the other hand, new gcc and gfortran releases and supposed to be fully compatible with previous versions of the compilers, in particular if you use the -std=legacy flag.
Offline
I am using a build-script that seems to not reference CC etc.
It just uses g++/gfortran in the script itself. I now changed all of these by hand to g++-4.8 and gfortran-4.8 by hand.
This on the first hand seemed to solve the issue, but I exactly run in to the problem fistrosan mentions - it is missing a bunch of libraries to build.
Not entirely sure how to move on from here.
Offline
Can you post the makefile of the software you are trying to compile ?
Offline
Pages: 1