LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-2010, 01:44 PM   #1
julien1486
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
[6.7] Unable to build GCC-4.5.1


Hi all !

I'm trying to build a LFS usinf the v6.7 of the book and I'm stuck at chapter 5.5.1 where I have to build gcc.

I'm using the liveCD and I've download the sources archives for v6.7, I'm not using sources from liveCD.

So I have a gcc-4.5.1 directory which contains the sources. I've extracted gmp, mpc and mpfr in it.

I've create a gcc-build directory, enter into this and type the following command :

Code:
../gcc-4.5.1/configure \
    --target=$LFS_TGT --prefix=/tools \
    --disable-nls --disable-shared --disable-multilib \
    --disable-decimal-float --disable-threads \
    --disable-libmudflap --disable-libssp \
    --disable-libgomp --enable-languages=c \
    --with-gmp-include=/mnt/lfs/sources/gcc-4.5.1/gmp --with-gmp-lib=/mnt/lfs/sources/gcc-4.5.1/gmp/.libs \
    --without-ppl --without-cloog
This command seems to be successfully executed but when I type "make" I have the following error after a couple of minutes :

Code:
checking for gmp.h... no
configure: error: gmp.h can't be found, or is unusable.
make[1]: *** [configure-mpfr] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
And that's right... gmp.h is not on my computer.
Whats is wrong ?

Thanks a lot for your help !

Julien
 
Old 10-10-2010, 04:41 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
Quote:
... gmp.h is not on my computer.
Why not ? ? You are supposed to untar gmp inside gcc-4.5.1/ !

And I am not sure, you should change " $pwd ", like your configure line shows.
( Ref. 5.5.1 ).

..
 
Old 10-10-2010, 05:57 AM   #3
julien1486
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Why not ? ? You are supposed to untar gmp inside gcc-4.5.1/ !

And I am not sure, you should change " $pwd ", like your configure line shows.
( Ref. 5.5.1 ).

..
The use of $(pwd) solve the probem. But I don't understand why

Thanks for your help
 
Old 12-15-2010, 01:52 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
Quote:
The use of $(pwd) solve the probem. But I don't understand why
A little late ... but I have an answer now :

When you run '../gcc-4.5.1/configure .....' : then $(pwd) is actually the build/ folder. The gmp/ and mpfr/ <required-files> are copied to build/gmp/ and build/mpfr/ .

Using $(pwd) also allows any naming for the build-gcc/ folder.
( build-gcc/ or gcc-build/, etc., your preferred naming will work.)

..
 
Old 04-16-2011, 08:23 AM   #5
babannasd
LQ Newbie
 
Registered: Apr 2011
Posts: 8

Rep: Reputation: 0
Red face GMP.h not found

I am building LFS 6.8 version. While installing gcc-4.5.2 I am getting an error like gmp.h header not found. Please tell me how to resolve this. My problem is similar to above but I didn't understand the solution given above.

Code:
checking if charset has consecutive values... yes
checking for math/round... yes
checking for math/trunc... yes
checking for math/floor... yes
checking for math/ceil... yes
checking for math/rint... yes
checking for long double... yes
checking format of `long double' floating point... IEEE extended, little endian
checking for gmp.h... no
configure: error: gmp.h can't be found, or is unusable.
make[1]: *** [configure-mpfr] Error 1
make[1]: Leaving directory `/mnt/lfs/gcc-4.5.2'
make: *** [all] Error 2
lfs@itventures:/mnt/lfs/gcc-4.5.2$ D
 
Old 04-16-2011, 08:40 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Although this looks similar and might have the same solution, it would be wise to start a new thread for this. For one, the above is LFS 6.7 and you are building LFS 6.8, they might (slightly) differ in the way things are done. This thread is also marked as [SOLVED].

You also need to give us a bit more info:

- Which chapter are you working on (gcc is build 3 times, twice in chapter 5 and once in chapter 6),
- Which host are you using (and if not the LFS liveCD, did you make it compliant),
- Did you encounter any other problems before reaching this point,

Assuming you are at chapter 5.5:
- Did you extract the 3 packages (among which is gmp) in the correct location?
- It looks like you did not create the gcc-build directory and work from there.

How this is done is mentioned in the LFS book.

Hope this helps.

Last edited by druuna; 04-16-2011 at 10:16 AM.
 
Old 04-17-2011, 01:06 AM   #7
babannasd
LQ Newbie
 
Registered: Apr 2011
Posts: 8

Rep: Reputation: 0
First of all I am grateful to you for your concern.
-> I am working in 5th chapter i.e. section 5.5 on building 1st pass of GCC 4.5.2.
->I am using Ubuntu 10.10 as my host.
-> And till this point I haven't encountered any problems.
-> Ya I have extracted the three packages i.e. MPC-0.8.2, MPFR-3.0.0 and and GMP-5.0.1 inside GCC directory.
-> And about gcc-build directory, where should I create it. I am confused about it. I am installing the package from /mnt/lfs/sources/gcc-4.5.2.

And if you need more information I can provide you.
 
Old 04-17-2011, 01:32 AM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
You should be in sources dir untar gcc cd into newly created dir then run commands as per book. FOLLOW THE BOOK

Code:
mkdir -v ../gcc-build
cd ../gcc-build
which will make a new dir called "gcc-build" You will also be in that dir as per command before "cd ../gcc-build
 
Old 04-17-2011, 03:16 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

@babannasd: You mention using Ubuntu being your host, you did not answer my question about making it compliant.

Did you do so? Not doing so will get you into trouble really fast.....

Hope this helps.
 
1 members found this post helpful.
Old 04-18-2011, 09:12 AM   #10
babannasd
LQ Newbie
 
Registered: Apr 2011
Posts: 8

Rep: Reputation: 0
@Druuna:

But my friend is also doing the same project Linux From Scratch v6.8 in Debian 6.0 (SQUEEZE) which is compliant to the host system specified by LFS. He is also getting the same error no?
 
Old 04-18-2011, 09:15 AM   #11
babannasd
LQ Newbie
 
Registered: Apr 2011
Posts: 8

Rep: Reputation: 0
@spiky0011:

Tell me the name of the directory in which I should create gcc-build exactly. Don't just show

$ mkdir -v ../gcc-build

specify its name.
 
Old 04-18-2011, 09:29 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by babannasd View Post
@Druuna:

But my friend is also doing the same project Linux From Scratch v6.8 in Debian 6.0 (SQUEEZE) which is compliant to the host system specified by LFS.
No it is not.

Debian (personal experience with: 6 and the previous stable and testing) _do_ need changes/additions to make it compliant.

Quote:
He is also getting the same error no?
I don't know what errors he's getting, but looking at the errors you are seeing, I think you are not following the book and that is why things go wrong in this instance.

The book assumes that you have unpacked the package and are standing in the newly created directory when you start a new building chapter. Mentioned here, bottom of the page. In this case: especially 3 a, b and c.

Hope this helps.
 
1 members found this post helpful.
Old 04-18-2011, 10:23 AM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
You have unpacked gcc then it creates a dir gcc 4.52 you then cd in to that dir then follow commands
Code:
mkdir ../gcc-build
Read this page especally the 3rd IMPORTANT PART http://www.linuxfromscratch.org/lfs/...tructions.html

Last edited by spiky0011; 04-18-2011 at 11:19 AM. Reason: Code tags
 
1 members found this post helpful.
Old 04-21-2011, 07:59 AM   #14
babannasd
LQ Newbie
 
Registered: Apr 2011
Posts: 8

Rep: Reputation: 0
Please suggest me the version and flavor of Linux which I can use as host system for building LFS v6.8.I searched a lot about which host system I can use but I found nothing useful.......
 
Old 04-21-2011, 08:05 AM   #15
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Babannasd
why not use the LFS live cd it,s made for the job.
http://www.linuxfromscratch.org/livecd/

Last edited by spiky0011; 04-21-2011 at 08:13 AM. Reason: added link
 
1 members found this post helpful.
  


Reply

Tags
gcc, lfs


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.4.3 make error - failed to build gcc-4.4.3--please help aayu09 Fedora 4 03-05-2010 10:20 AM
remove the gcc-build, binutils-build, etc after make @d4M Linux From Scratch 6 01-26-2009 05:29 AM
help: failed build of GCC 4.3 on SLES 10/gcc 4.1 ia64 ron7000 Programming 6 05-28-2008 12:24 AM
GCC in chroot failing to build, unable to find headers falt004 Linux From Scratch 4 08-03-2007 11:00 AM
GCC 4.0.2 Chroot Build Unable to Find Headers Kenji Miyamoto Linux From Scratch 5 06-29-2006 04:34 AM


All times are GMT -5. The time now is 01:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration