0

I am getting a

fortran/arith.o: In function gfc_mpfr_to_mpz(__mpz_struct*, __mpfr_struct*, locus*)': arith.c:(.text+0x1169): undefined reference tompfr_get_z_2exp'

from gcc 4.7.1 build process. I am following

gcc-wiki

However, I have made a little change to the

download_prequisites

script. And that is I am downloading the latest releases of all the prequisites for gcc where the original one was downloading a bit older ones since the above link was given for gcc 4.6. However, it can not find some symbols related to mpfr library.

A related google search gives me this thread however it also did not help me, maybe someone else could understand that differently than me:

A similar thread

Any hints on how to resolve this problem?

Umut Tabak
  • 1,862
  • 4
  • 26
  • 41
  • Did you get the latest mpfr library and unpack it as a sub dir of gcc. Checkout out http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.html – Adrian Cornish Aug 20 '12 at 00:17

1 Answers1

0

I recently built gcc 4.7.1 for Mountain Lion and followed a very nice tutorial of how to do a gcc build. In it, it describes all the necessary lib compilations, include mpfr, gmp and others. If you're running linux, I think it will work for you as well, give it a try:

http://solarianprogrammer.com/2012/07/21/compiling-gcc-4-7-1-mac-osx-lion/

Let me know if that helps.

Eudis Duran
  • 742
  • 3
  • 16