[lfs] error compiling gcc in Pass 1

Aditya Bankar adityabankar at yahoo.co.in
Fri Jun 12 01:12:32 PDT 2009


Hi Ankur,

It seems that you have got confused with the instructions related to the mpfr library in gcc's compilation article. 
You can read this in section 5.5.1:
tar -jxf ../mpfr-2.3.2.tar.bz2
mv mpfr-2.3.2 mpfr
tar -jxf ../gmp-4.2.4.tar.bz2
mv gmp-4.2.4 gmp

This has to be done inside the gcc's source directory. If you have unzipped it outside the gcc's source directory then mpfr would not be found. I had done the same thing.

Thanks,
Aditya




________________________________
From: Ankur Sinha <sanjay.ankur at gmail.com>
To: lfs-support at linuxfromscratch.org
Sent: Friday, 12 June, 2009 1:23:16 PM
Subject: [lfs] error compiling gcc in Pass 1

hi,

I've just picked up lfs 6.4 and am getting stuck at chapter 5 itself.
May be doing something really silly but I just can't correct it. The
first pass of GCC isn't building. It can't find mpfr.h

Here's the relevant info.. 
-----------------------------------------------------

-> lfs:/media/LFS/sources$ pwd
/media/LFS/sources

-> lfs:/media/LFS/sources$ ls

autoconf-2.63.tar.bz2             gcc-4.3.2                    man-db-2.5.2.tar.gz
automake-1.10.1-test_fix-1.patch     gcc-4.3.2.tar.bz2
man-pages-3.11.tar.bz2
automake-1.10.1.tar.bz2             gcc-build
module-init-tools-3.4.1-manpages-1.patch
bash-3.2-fixes-8.patch             gettext-0.17.tar.gz
module-init-tools-3.4.1.tar.bz2
bash-3.2.tar.gz                 glibc-2.8-20080929-iconv_tests-1.patch     mpfr
bash-doc-3.2.tar.gz             glibc-2.8-20080929-ildoubl_test-1.patch
mpfr-2.4.1.tar.bz2
binutils-2.18-GCC43-1.patch         gmp
ncurses-5.6-coverity_fixes-1.patch
binutils-2.18-configure-1.patch         gmp-4.2.4.tar.bz2
ncurses-5.6.tar.gz
binutils-2.18.tar.bz2             grep-2.5.3-debian_fixes-1.patch
patch-2.5.4.tar.gz
bison-2.3.tar.bz2             grep-2.5.3-upstream_fixes-1.patch
perl-5.10.0-consolidated-1.patch
bzip2-1.0.5-install_docs-1.patch     groff-1.18.1.4-debian_fixes-1.patch
perl-5.10.0.tar.gz
bzip2-1.0.5.tar.gz             groff-1.18.1.4.tar.gz
procps-3.2.7-watch_unicode-1.patch
coreutils-6.12-i18n-2.patch         grub-0.97-256byte_inode-1.patch
procps-3.2.7.tar.gz
coreutils-6.12-old_build_kernel-1.patch  grub-0.97-disk_geometry-1.patch
psmisc-22.6.tar.gz
coreutils-6.12-uname-1.patch         grub-0.97.tar.gz
readline-5.2-fixes-5.patch
coreutils-6.12.tar.gz             gzip-1.3.12.tar.gz                readline-5.2.tar.gz
db-4.7.25-upstream_fixes-1.patch     iana-etc-2.30.tar.bz2
sed-4.1.5.tar.gz
db-4.7.25.tar.gz             index.html                    shadow-4.1.2.1.tar.bz2
dejagnu-1.4.4.tar..gz             inetutils-1.5-no_server_man_pages-2.patch
sysklogd-1.5.tar.gz
diffutils-2.8.1-i18n-1.patch         inetutils-1.5.tar.gz
sysvinit-2.86.tar.gz
diffutils-2.8.1.tar.gz             iproute2-2.6.26.tar.bz2            tar-1.20.tar.bz2
e2fsprogs-1.41.3.tar.gz             kbd-1.14.1-backspace-1.patch
tcl8.5.5-src.tar.gz
expect-5.43.0-spawn-1.patch         kbd-1.14.1.tar.gz
texinfo-4.13a.tar.gz
expect-5.43.0-tcl_8.5.5_fix-1.patch     less-418.tar.gz
udev-130.tar.bz2
expect-5.43.0.tar.gz             lfs-bootscripts-20081031.tar.bz2
udev-config-20081015.tar.bz2
file-4.26.tar.gz             libtool-2.2.6a.tar.gz
util-linux-ng-2.14.1.tar..bz2
findutils-4.4.0.tar.gz             linux-2.6.27.4.tar.bz2
vim-7.2-fixes-3.patch
flex-2.5.35.tar.bz2             m4-1.4.12.tar.bz2                vim-7.2.tar.bz2
gawk-3.1.6.tar.bz2             make-3.81.tar.bz2                zlib-1.2.3.tar.bz2


-> lfs:/media/LFS/sources/gcc-build$ CC="gcc
-B/usr/bin/" ../gcc-4.3.2/configure     --prefix=/tools
--with-local-prefix=/tools --disable-nls     --disable-shared
--disable-libssp --enable-languages=c

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc -B/usr/bin/
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -B/usr/bin/ accepts -g... yes
checking for gcc -B/usr/bin/ option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their
locations.
Copies of these libraries' source code 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 and/or MPFR 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'm on a Fedora 10 64 bit. I've made a different partition on my
external hard drive for lfs. As the ls output will show you, I have mpfr
present,extracted and renamed as the book says. I tried with the version
2.3.2 and got the same result. 


Thanks for your help.

-- 
regards,

Ankur




-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page



      From Chandigarh to Chennai - find friends all over India. Go to http://in.promos.yahoo.com/groups/citygroups/




More information about the lfs-support mailing list