i have an error Building GCC: requires GMP 4.1+ and MPFR 2.3.0+.
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Try the --with-gmp and --with-mpfr options to specify their locations.
I have the same problem.
I installed the latest version of GMP (4.2.4) and the latest version of MPFR (2.3.2).
After launching the configuration tool in the gcc dir:
./configure --target=powerpc-405-linux --with-gmp=.... --with-mpfr=...
I got the message:
...
checking the correct version of gmp.h.. no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+
You are right. After putting the right path to gmp,mpfr the .confiure works fine.
Then I ran "make". After a while I got the following error:
/HMeyzam08/a99059/GNU/gcc/gcc-4.3.2/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
I searched the error on the internet. It seems I had to update LD_LIBRARY_PATH because gmp,mpfr are not on located on the default place (/usr/lib).
What is the way to change LD_LIBRARY_PATH ? I did:
setenv LD_LIBRARY_PATH gmp_path,mpfr_path.
But the problem remains. What am I doing wronge ?
Thanks.
So I have tried as all of you have said, and I am still getting that dumb error, that it can't find gmp.h. First of all, no matter where I put it, there isn't a gmp.h file anywhere. I see one that is gmpxx.h. The only way that I get anywhere further is putting all of these files, not directories, in the directory where I decompressed the gcc files. Please help me understand and why Linux from Scratch leaves this out. Thanks in advance!
So I have tried as all of you have said, and I am still getting that dumb error, that it can't find gmp.h. First of all, no matter where I put it, there isn't a gmp.h file anywhere. I see one that is gmpxx.h. The only way that I get anywhere further is putting all of these files, not directories, in the directory where I decompressed the gcc files. Please help me understand and why Linux from Scratch leaves this out. Thanks in advance!
make sure you changed the dir names to gmp, mpfr. I also needed to export LD_LIBRARY_PATH for some of the builds.
I figured this one out. I was working on Ubuntu, and come to find out I didn't have one of the tools that was mentioned at first in LFS or linuxfromscratch.com. So just verify that you have ALL OF THE TOOLS. Thanks for your comment
I just started my LFS build today and had the same problem using LFS 6.4. The directions have you extract mpfr-2.3.2, and gmp-4.2.4 then move them. It was not very clear on where to move them, but I found this to work.
1. extract gcc-4.3.2
2. extract mpfr-2.3.2
3. extract gmp-4.2.4
4. move mpfr-2.3.2 to gcc-4.3.2/mpfr
5. move gmp-4.2.4 to gcc-4.3.2/gmp
after putting those in the gcc-4.3.2 source directory everything compiled fine.
Code:
tar -jxf gcc-4.3.2.tar.bz2
tar -jxf mpfr-2.3.2.tar.bz2
mv mpfr-2.3.2 gcc-4.3.2/mpfr
tar -jxf gmp-4.2.4.tar.bz2
mv gmp-4.2.4 gcc-4.3.2/gmp
On 10.6 I was able to build, but with the same level of gmp, mpfr, and gcc, I'm still getting this on 10.5.
if i pass down configuration arguments, it does not seem to take it, still barfing.
Could someone please give the exact command line to give to configure, just to be sure ?
I also tried to pass no to optional package, basically I was looking and searching the gcc4.4.2 and gcc4.4.1 configure file. By default both gmp and mpfr gets installed in /usr/local in this case....
@prokash: You opened a 8 month old thread that is possibly related to your problem. I would suggest opening a new thread for this to give it the attention it needs/deserves.
Do give us a bit more info. Which LFS version and chapter are you stuck in, did all the steps before work, is your host up to specs for a LFS build (OS-X??). Stuff like that.
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Above in the forum suggested to download gmp-5.0.2.tar.bz2 and mpfr-3.1.0.tar.bz2 and extract them.
Then Copy both folder in your gcc downloaded directory
Here is my configuration
- Download gcc-core-4.5.1.tar.bz2
- Download gmp-5.0.2.tar.bz2
- Download mpfr-3.1.0.tar.bz2
- Extract gcc-core-4.5.1.tar.bz2 (This will extract to folder name gcc-4.5.1)
- Extract gmp-5.0.2.tar.bz2 and mv this folder in gcc-4.5.1 and rename it to gmp only
- Extract mpfr-3.1.0.tar.bz2 and mv this folder in gcc-4.5.1 and rename it to mpfr only
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.