LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   v9.0 systemd - Chptr 6.21: GCC build - Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+ (https://www.linuxquestions.org/questions/linux-from-scratch-13/v9-0-systemd-chptr-6-21-gcc-build-building-gcc-requires-gmp-4-2-mpfr-2-4-0-and-mpc-0-8-0-a-4175662300/)

GeekBoy 10-09-2019 04:56 PM

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!

bgii2000 10-09-2019 09:27 PM

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

GeekBoy 10-09-2019 11:11 PM

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!

bgii2000 10-09-2019 11:35 PM

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

GeekBoy 10-10-2019 12:25 AM

That's the thing. Since /usr is the prefix, looking there, I am not finding any of them using find.

GeekBoy 10-10-2019 12:43 PM

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.

hendrickxm 10-15-2019 01:04 AM

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

GeekBoy 10-23-2019 12:03 PM

Yes. one of the requirements was missing. I finally looked in the config.log to see what I was missing.

Thanks!

bgii2000 11-02-2019 04:41 AM

For posterity... where is config.log?

hazel 11-02-2019 07:51 AM

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


All times are GMT -5. The time now is 11:44 AM.