How can I solve this make error when building gcc-4.7.2 for LFS?

5,649

I found a fix for this. If you're having the same problem, try this. Before configuring, try this in your gcc folder:

./contrib/download_prerequisites

Share:
5,649

Related videos on Youtube

Korgan Rivera
Author by

Korgan Rivera

Updated on September 18, 2022

Comments

  • Korgan Rivera
    Korgan Rivera over 1 year

    Everything was going so well...

    I'm trying to build gcc-4.7.2, following the instructions in the LFS book. When I run make, I get the following:

    checking for MPFR... no
    configure: error: libmpfr not found or uses a different ABI (including static vs shared).
    make[1]: *** [configure-mpc] Error 1
    make[1]: Leaving directory `/mnt/lfs/sources/gcc-4.7.2'
    make: *** [all] Error 2
    

    My question is this: wut?

    (If you require further info, please ask in the comments.)

    • goldilocks
      goldilocks over 11 years
      Is the issue that you don't understand this at all, or that you think you have an appropriate libmpfr available but it still isn't working?
    • Korgan Rivera
      Korgan Rivera over 11 years
      @goldilocks The former. I don't understand at all.
    • goldilocks
      goldilocks over 11 years
      Okay -- so looking here: linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.htm‌​l You need to unpack source for mpfr and a few other things into the top level of the GCC source directory and rename them. Did you do that stuff? Also, I would stick with exact versions with LFS, which appears to be 4.7.1 not 4.7.2
  • goldilocks
    goldilocks over 11 years
    This is mostly not applicable to the LFS scenario.
  • goldilocks
    goldilocks over 11 years
    Also, it would be the libmpfr-devel package (headers) that's missing. To explain further about "not applicable": while installing that in the LFS host environment will work, you then risk having stuff missing in the target environment later. In this case, probably not, but methinks Korgan is still best to follow the LFS procedure to the letter.
  • Korgan Rivera
    Korgan Rivera over 11 years
    @goldilocks That's the problem. There are all kinds of errata in the book. I'm guessing my way through some of it. Anyway, I found a fix here: stackoverflow.com/questions/9297933/…