Compiling gcc with a chicken-and-egg situation

Philip Herron
Tue Jun 29 06:25:00 GMT 2010


On 28 June 2010 12:18, Eric Fernandez <> wrote:
> Hi,
> I have been compiling gcc on an AIX system for some time but have now encountered some trouble now that gcc requires external libraries such as MPFR and GMP to compile it. I have a chicken-and-egg situation to update all these libraries at the same time:
> I have previously installed gcc 4.3.3, mpfr  2.4.1 and gmp 4.3.1. I now would like to update to gcc-4.3.5, mpfr 3.0.0 and gmp 5.0.1. When I try to compile gmp-5.0.1, I cannot check it because it wants to use If I install it, I have now this library, but is looking for the previous version, This breaks my current gcc. Same kind of chicken-and-egg situation with mpfr.

What i would do is when compiling GMP and MPFR and MPC,

./configure --prefix=/....

so when you do "make install"

the liraries are installed to a different location. Then when you go
to compile gcc you can ./configure --with-gmp-include=/../include
--with-gmp-lib=/.../lib --with-mpfr-include=... and so on pointing to
their new respective locations and it shouldnt break your current
compiler and allow you to build the newer version.

So you compile it with newer libraries just from different locations.
This may be a much simpler solution. Than cross compiling for a target
host. Hope this helps lets us know how you get on :)


More information about the Gcc-help mailing list