Hey,
I'm trying to build gcc 4.5.0 for benchmarking purposes on a Centos
4.7 x64 system. System-wide gcc is 3.4.6. I'm doing the build from
under a plain user account to avoid clogging the system.
I don't know if 3.4.6 is too old, because I've never used it, but I
suppose it should work ...
I'm now trying to build gcc 4.5.0 itself, using ./configure
--prefix=/home/shodan/bench --with-mpc=/home/shodan/bench
--with-gmp=/home/shodan/bench --with-mpfr=/home/shodan/bench && make,
but that fails with the following message:
First, you shouldn't build gcc in the source directory. Instead, do the
following:
# mkdir gccbuild && cd gccbuild
# <path_to_gcc_src_dir>/configure <your_configure_options>
# make && make install
Furthermore, to avoid to install the dependent libraries, you could
alternatively link these libraries statically into GCC. And, you usually
don't need to build these libraries separately. Here's what I usually do
(there might be others and possibly better ways :-)):
1) After extracting the GCC sources, I extract the sources of MPFR, GMP
and MPC into the GCC top-level source directory, while renaming the
directories as follows (or using symbolic links):
mpfr-x.y.z -> mpfr
mpc-x.y.z -> mpc
gmp-x.y.z -> gmp
# mkdir gccbuild && cd gccbuild
# <path_to_gcc_src_dir>/configure <your_configure_options>
[--disable-shared (to build all libraries as static libraries)]
# make && make install
BTW, a lot of this could be found here: http://gcc.gnu.org/install/
Andi