Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
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.


  Search this Thread
Old 09-18-2011, 02:40 AM   #1
Registered: Apr 2010
Location: Banglore
Distribution: fedora , rhel,Ubuntu
Posts: 61

Rep: Reputation: 0
Angry GCC Pass 1 ERROR ( mpc.h: No such file or directory )

Hi all ,
I am installing GCC -4.5.2 Pass1.
Its make command is gicing me following error .

In file included from ../../gcc-4.5.2/gcc/rtl.h:28,
from ../../gcc-4.5.2/gcc/attribs.c:30:
../../gcc-4.5.2/gcc/real.h:28:17: error: mpc.h: No such file or directory
In file included from ../../gcc-4.5.2/gcc/rtl.h:28,
from ../../gcc-4.5.2/gcc/attribs.c:30:
../../gcc-4.5.2/gcc/real.h:29: error: expected declaration specifiers or '...' before 'mpc_ptr'
../../gcc-4.5.2/gcc/real.h:29: error: expected declaration specifiers or '...' before 'mpc_srcptr'
../../gcc-4.5.2/gcc/real.h:29: error: expected declaration specifiers or '...' before 'mpc_srcptr'
../../gcc-4.5.2/gcc/real.h:29: error: expected declaration specifiers or '...' before 'mpc_rnd_t'
../../gcc-4.5.2/gcc/real.h:29: warning: function declaration isn't a prototype
make[2]: *** [attribs.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

What is this mpc & how can i resolve This .
Old 09-18-2011, 02:52 AM   #2
Registered: Oct 2003
Posts: 37

Rep: Reputation: 4
Originally Posted by dgashu View Post
Hi all ,
What is this mpc & how can i resolve This .
This error is because you didn't follow the instructions in the book, you need to install mpc, gmp, ppl, cloog-ppl and mpfr BEFORE gcc, of extract the tarball within gcc's directory structure.
1 members found this post helpful.
Old 09-18-2011, 03:19 AM   #3
Senior Member
Registered: Jan 2011
Distribution: /LFS/Centos6.3/Debian
Posts: 2,194
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
All packages are listed in Chapter 3 of LFS 6.8 book
1 members found this post helpful.
Old 09-18-2011, 12:54 PM   #4
Registered: Apr 2010
Location: Banglore
Distribution: fedora , rhel,Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 0
HI magiknight,
I have followed the instruction , but that tar was not , so i have to do the tar from outside gcc_buid folder

lfs:/mnt/lfs/sources$ :cd gcc-4.5.2/
lfs:/mnt/lfs/sources/gcc-4.5.2$ :tar -jxf ../mpfr-3.0.0.tar.bz2
lfs:/mnt/lfs/sources/gcc-4.5.2$ :mv -v mpfr-3.0.0 mpfr
`mpfr-3.0.0' -> `mpfr/mpfr-3.0.0'
lfs:/mnt/lfs/sources/gcc-4.5.2$ : pwd
lfs:/mnt/lfs/sources/gcc-4.5.2$ :cd ..
lfs:/mnt/lfs/sources$ :ls
autoconf-2.68.tar.bz2 gawk-3.1.8.tar.bz2 less-436.tar.gz psmisc-22.13.tar[1].gz
automake-1.11.1.tar.bz2 gcc-4.5.2 lfs-bootscripts-20100627.tar.bz2 psmisc-22.13.tar[2].gz
bash-4.2.tar.gz gcc-4.5.2.tar.bz2 libtool-2.4.tar.gz readline-6.2.tar[1].gz
binutils-2.21 gdbm-1.8.3.tar.gz linux-2.6.37.tar[1].bz2 sed-4.2.1.tar[1].bz2
binutils-2.21.tar.bz2 gettext- m4-1.4.15.tar.bz2 sysklogd-1.5.tar[1].gz
binutils-build glibc-2.13.tar.bz2 make-3.82.tar.bz2 sysvinit-2.88dsf.tar[1].bz2
bison-2.4.3.tar.bz2 gmp-5.0.1.tar.bz2 make-3.82.tar[1].bz2 tar-1.25.tar[1].bz2
bzip2-1.0.6.tar.gz grep-2.7.tar.gz man-db-2.5.9.tar.gz texinfo-4.13a.tar[1].gz
coreutils-8.10.tar.gz grep-2.7.tar[1].gz man-pages-3.32.tar.bz2 udev-166-testfiles.tar[1].bz2
dejagnu-1.4.4.tar.gz groff-1.21.tar.gz module-init-tools-3.12.tar.bz2 udev-166.tar[1].bz2
diffutils-3.0.tar.gz grub-1.98.tar.gz mpc-0.8.2.tar.gz udev-config-20100128.tar[1].bz2
e2fsprogs-1.41.14.tar.gz gzip-1.4.tar.gz mpfr-3.0.0.tar.bz2 util-linux-2.19.tar[1].bz2
expect5.45.tar.gz iana-etc-2.30.tar.bz2 ncurses-5.7.tar.gz
file-5.05.tar.gz inetutils-1.8.tar.gz patch-2.6.1.tar.bz2 vim-7.3.tar[1].bz2
findutils-4.4.2.tar.gz iproute2-2.6.37.tar.tar pkg-config-0.25.tar[1].gz xz-5.0.1.tar[1].bz2
flex-2.5.35.tar[1].bz2 kbd-1.15.2.tar.gz procps-3.2.8.tar[1].gz zlib-1.2.5.tar[1].tar
lfs:/mnt/lfs/sources$ : pwd

Here i was didn't got the folder mpfr
So i did the tar manually at the /mnt/lfs/sources as tar -xvjf mpfr-3.0.0.tar.bz2

then the make & make install worked ....

Thanks for the guidance .


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
gcc-4.5.2 - Pass 1 error -gcc command not found ?? adi_30stm Linux From Scratch 20 11-17-2011 12:23 PM
[SOLVED] lfs 6.7 book ch 5.4 binutils 2.20.1 pass 1 error:error: ppl_c.h: No such file or directory frank zhu Linux From Scratch 6 03-04-2011 11:23 AM
I am getting an error as gcc: c-parse.c: No such file or directory pradheep2 Linux - General 5 06-12-2010 05:13 AM
gcc error: iostream: no such file or directory linux 4.1.2 Liah Linux - Newbie 1 03-10-2009 10:53 AM

All times are GMT -5. The time now is 07:59 PM.

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