Users of Fedora Core 4, SuSE 10.0 and other distributions with GCC v4 may have found some open source softwares may not compile properly. Using alternate compilers may resolve the problem. FC4 also ships with GCC v3.2. There are many ways to specify alternate compilers during the build process, below are some ways.
Most softwares support the
CXX environment variables. First assign them, then run
# export CC=gcc32 # export CXX=g++32 # ./configure
A good example can be found on the Redhat Mailing List.
If the software is using the standard GNU automake and configure, then there is a chance it supports other compilers by passing in a setting to the
configure script. First run
# ./configure --help # ./configure --cc=gcc32
Sometimes the software may just come with a
Makefile. Open the
Makefile and look inside to see if there are variables that specify the compiler. You can either edit those variables or set them at compile time. For example:
(in Makefile) C_COMPILER = cc CPLUSPLUS_COMPILER = c++
Then using the makefile, you can run:
# make CPLUSPLUS_COMPILER=g++32
Although the above examples are not exhaustive they should provide some ideas for using alternate compilers in Fedora Core and other Linux distributions.