LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 10-09-2019, 05:56 PM   #1
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 44

Rep: Reputation: 0
v9.0 systemd - Chptr 6.21: GCC build - Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+


Here is the complete error:

Quote:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.

I went back over those three packages again just in case I made an error. Even the checks all came out all okay.

Any ideas on what I may have missed to cause this?

Thanks!
 
Old 10-09-2019, 10:27 PM   #2
bgii2000
LQ Newbie
 
Registered: Oct 2019
Posts: 11

Rep: Reputation: Disabled
You don't install them, you extract them into the gcc source directory and drop them into generically labeled directories:

Code:
tar -xf ../mpfr-4.0.2.tar.xz
mv -v mpfr-4.0.2 mpfr
tar -xf ../gmp-6.1.2.tar.xz
mv -v gmp-6.1.2 gmp
tar -xf ../mpc-1.1.0.tar.gz
mv -v mpc-1.1.0 mpc
the "../" before the filenames of the source tars refers to the step previous, in which you change to the gcc source directory. After being extracted into a directory inside the gcc directory, you use the mv command to rename the directories so that they do not have any numbers or punctuation in the names, just the name of the program.


Pay close attention to the Note at the top:
http://www.linuxfromscratch.org/lfs/...gcc-pass1.html

Last edited by bgii2000; 10-09-2019 at 10:36 PM.
 
1 members found this post helpful.
Old 10-10-2019, 12:11 AM   #3
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 44

Original Poster
Rep: Reputation: 0
That is not what the book says to do


http://www.linuxfromscratch.org/lfs/...ter06/gcc.html


http://www.linuxfromscratch.org/lfs/...ter06/gmp.html
http://www.linuxfromscratch.org/lfs/...er06/mpfr.html
http://www.linuxfromscratch.org/lfs/...ter06/mpc.html



I also have completed version 8.4, in which I have kept a step-by-step log, and the steps are nearly identical to version 9

Thanks for taking the time to respond though!
 
Old 10-10-2019, 12:35 AM   #4
bgii2000
LQ Newbie
 
Registered: Oct 2019
Posts: 11

Rep: Reputation: Disabled
Oops, missed the chapter number in the title. What happens if you go ahead and specify the locations with the suggested options?

Last edited by bgii2000; 10-10-2019 at 12:38 AM.
 
Old 10-10-2019, 01:25 AM   #5
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 44

Original Poster
Rep: Reputation: 0
That's the thing. Since /usr is the prefix, looking there, I am not finding any of them using find.
 
Old 10-10-2019, 01:43 PM   #6
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 44

Original Poster
Rep: Reputation: 0
Okay, all the files are there:


Code:
(lfs chroot) root:/sources/gcc-9.2.0/build# ls /usr/lib
Mcrt1.o    libBrokenLocale.a   libc.so           libgmp.la          libm-2.30.a        libmpfr.so           libnss_files.so     libresolv.a      libutil.so
Scrt1.o    libBrokenLocale.so  libc_nonshared.a  libgmp.so          libm.a             libmpfr.so.6         libnss_hesiod.so    libresolv.so     libz.a
audit      libanl.a            libcrypt.a        libgmp.so.10       libm.so            libmpfr.so.6.0.2     libopcodes-2.32.so  librt.a          libz.so
crt1.o     libanl.so           libcrypt.so       libgmp.so.10.3.2   libmagic.la        libmvec.a            libopcodes.a        librt.so         locale
crti.o     libbfd-2.32.so      libdl.a           libgmpxx.la        libmagic.so        libmvec.so           libopcodes.la       libstdc++.a      pkgconfig
crtn.o     libbfd.a            libdl.so          libgmpxx.so        libmagic.so.1      libmvec_nonshared.a  libopcodes.so       libstdc++.so     tmpfiles.d
gconv      libbfd.la           libg.a            libgmpxx.so.4      libmagic.so.1.0.0  libnss_compat.so     libpthread.a        libstdc++.so.6
gcrt1.o    libbfd.so           libgcc_s.so       libgmpxx.so.4.5.2  libmcheck.a        libnss_db.so         libpthread.so       libthread_db.so
ldscripts  libc.a              libgcc_s.so.1     libhistory.so      libmpfr.la         libnss_dns.so        libreadline.so      libutil.a


I tried adding in

--with-gmp=/usr/lib --with-mpfr=/usr/lib --with-mpc=/usr/lib

and --with-gmp=/usr --with-mpfr=/usr --with-mpc=/usr


I am still getting:

Quote:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
 
Old 10-15-2019, 02:04 AM   #7
hendrickxm
Member
 
Registered: Feb 2014
Posts: 231

Rep: Reputation: Disabled
You are missing libmpc. Try to (re)install mpc-1.1.0 as in the book after gmp and mpfr.

See:
https://packages.slackware.com/?r=sl...0-i586-2.txz&f
and in the book:
6.19.2. Contents of MPC Installed Libraries: libmpc.so

Last edited by hendrickxm; 10-15-2019 at 02:05 AM.
 
1 members found this post helpful.
Old 10-23-2019, 01:03 PM   #8
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 44

Original Poster
Rep: Reputation: 0
Yes. one of the requirements was missing. I finally looked in the config.log to see what I was missing.

Thanks!
 
Old 11-02-2019, 05:41 AM   #9
bgii2000
LQ Newbie
 
Registered: Oct 2019
Posts: 11

Rep: Reputation: Disabled
For posterity... where is config.log?
 
Old 11-02-2019, 08:51 AM   #10
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,587
Blog Entries: 9

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
It's a log created in the build directory by a package's configure script. Very useful for troubleshooting if a build goes wrong.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which versions of GMP, MPC, and MPFR were used to compile GCC? CrushAxe Linux - Software 4 03-10-2019 12:13 PM
i have an error Building GCC: requires GMP 4.1+ and MPFR 2.3.0+. robineecc1 Linux From Scratch 17 03-05-2018 06:57 AM
MPFR, MPC, GMP Not found using LFS_book_7.5 promitheas Linux From Scratch 5 12-01-2014 05:04 PM
Error building GMP, MPFR, MPC libs with gcc 4.7.0 in cygwin lb_dbd Linux - Newbie 2 04-11-2012 05:23 PM
Which directory are mpc, gmp & mpfr stored in after extraction? sophanox Linux - Newbie 2 02-20-2011 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration