Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difficulty building gcc form source

72 views
Skip to first unread message

Philip B

unread,
Jul 10, 2012, 5:03:24 PM7/10/12
to
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!

Warren Oates

unread,
Jul 10, 2012, 11:24:52 PM7/10/12
to
In article <c370cd74-3947-45e7...@googlegroups.com>,
Philip B <pb.so...@gmail.com> wrote:

> 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?

Try building it without fortran. Start simple.

--enable-languages=c

is a pretty good place to start. You'll get c++ with it.
--

... do not cover a warm kettle or your stock may sour. -- Julia Child

Andrew Haley

unread,
Jul 11, 2012, 6:31:19 AM7/11/12
to
Philip B <pb.so...@gmail.com> wrote:

> tar zxf
> ./configure --with-gmp=/usr/local --with-mpfr=/usr/local

Don't try to build in srcdir. It won't work.

--enable-languages=c , as suggested, is a good idea.

I'd build local copies of mpfr and gmp. Run
./contrib/download_prerequisites to do this.

Building gcc with such an old gcc may be difficult.

Andrew.
0 new messages