LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   [6.7] Unable to build GCC-4.5.1 (https://www.linuxquestions.org/questions/linux-from-scratch-13/%5B6-7%5D-unable-to-build-gcc-4-5-1-a-837108/)

julien1486 10-09-2010 12:44 PM

[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

knudfl 10-10-2010 03:41 AM

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 ).

..

julien1486 10-10-2010 04:57 AM

Quote:

Originally Posted by knudfl (Post 4122728)
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 :confused:

Thanks for your help

knudfl 12-15-2010 12:52 PM

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.)

..

babannasd 04-16-2011 07:23 AM

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.
:redface:
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


druuna 04-16-2011 07:40 AM

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.

babannasd 04-17-2011 12:06 AM

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.

spiky0011 04-17-2011 12:32 AM

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

druuna 04-17-2011 02:16 AM

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.

babannasd 04-18-2011 08:12 AM

@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?

babannasd 04-18-2011 08:15 AM

@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.

druuna 04-18-2011 08:29 AM

Hi,
Quote:

Originally Posted by babannasd (Post 4327952)
@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.

spiky0011 04-18-2011 09:23 AM

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

babannasd 04-21-2011 06:59 AM

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.......

spiky0011 04-21-2011 07:05 AM

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

babannasd 04-25-2011 08:34 PM

hey I tried to search for torrent downloads of LFS Live cd as my connection drops regularly. But all the torrents were with 0 seeds and 0 peers. So tell me where I can download LFS 6.3?

druuna 04-26-2011 10:52 AM

Quote:

Originally Posted by babannasd (Post 4336210)
hey I tried to search for torrent downloads of LFS Live cd as my connection drops regularly. But all the torrents were with 0 seeds and 0 peers. So tell me where I can download LFS 6.3?

The 6.3 book and the 6.3 packages

Hope this helps.

PS: Why LFS 6.3 and not the latest stable LFS version? Or are you looking for the LiveCD version 6.3?

spiky0011 04-26-2011 11:46 AM

Theres no one seeding the file thats the problem I have just checked

babannasd 04-27-2011 03:44 AM

I am trying to download LFS LiveCD 6.3 not LFS 6.3. And the reason for choosing it is to use it as host system for building LFS 6.8 as it satisfies the host system requirements accurately. Now please tell me from where can I download it safely without any interrupts?

spiky0011 04-27-2011 04:06 AM

There is a link in post 15 there is ftp downloads

druuna 04-27-2011 04:08 AM

Hi,

I never had any toruble downloading from the LFS site (see the liveCD link in post #17).

Are you sure that the unstable connection isn't you or your provider?

babannasd 04-28-2011 05:55 AM

@Druuna and @spiky0011:
Its k. At last I succeeded in downloading it. Thanks for the support. Meet again with more problems.

spiky0011 04-28-2011 06:54 AM

Glad to help


All times are GMT -5. The time now is 05:20 PM.