I am trying to build gcc from source on a FreeBSD 8.1 system. The existing gcc is 3.4.6.
My steps are as follows, starting from the untarred gcc-4.2.2 directory.
I get the following error:
checking whether /usr/src/local/gcc-4.2.2/host-i386-unknown-freebsd8.1/gcc/gfortran -B/usr/src/local/gcc-4.2.2/host-i386-unknown-freebsd8.1/gcc/ -B/usr/local/i386-unknown-freebsd8.1/bin/ -B/usr/local/i386-unknown-freebsd8.1/lib/ -isystem /usr/local/i386-unknown-freebsd8.1/include -isystem /usr/local/i386-unknown-freebsd8.1/sys-include accepts -g... no
checking whether the GNU Fortran compiler is working... no
configure: error: GNU Fortran is not working; the most common reason for that is that you might have linked it to shared GMP and/or MPFR libraries, and not set LD_LIBRARY_PATH accordingly. If you suspect any other reason, please report a bug in http://gcc.gnu.org/bugzilla, attaching /usr/src/local/gcc-4.2.2/i386-unknown-freebsd8.1/libgfortran/config.log
gmake[1]: *** [configure-target-libgfortran] Error 1
gmake[1]: Leaving directory `/usr/src/local/gcc-4.2.2'
Looking at ldconfig to see the math libraries that the build thinks I have misplaced...
philipb@pb-devel /usr/src/local/gcc-4.2.2]$ ldconfig -r | grep 'libgm'
108:-lgmodule-12.3 => /usr/X11R6/lib/libgmodule-12.so.3
150:-lgmodule-2.0.0 => /usr/X11R6/lib/libgmodule-2.0.so.0
215:-lgmp.10 => /usr/X11R6/lib/libgmp.so.10
250:-lgmodule-12.3 => /usr/local/lib/libgmodule-12.so.3
292:-lgmodule-2.0.0 => /usr/local/lib/libgmodule-2.0.so.0
357:-lgmp.10 => /usr/local/lib/libgmp.so.10
[philipb@pb-devel /usr/src/local/gcc-4.2.2]$ ldconfig -r | grep 'mpf'
218:-lmpfr.5 => /usr/X11R6/lib/libmpfr.so.5
360:-lmpfr.5 => /usr/local/lib/libmpfr.so.5
My steps are:
tar zxf
./configure --with-gmp=/usr/local --with-mpfr=/usr/local
gmake
A very lengthy build ensues, and errors out as described above.
I have tried numerous combinations of versions of gcc, and of ./configure arguments and of monkeying with ldconfig. It always chokes on the same thing. Can anybody help?
Thanks!