LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   binutils 2.17 compile error: gmp.h: No such file or directory (https://www.linuxquestions.org/questions/linux-from-scratch-13/binutils-2-17-compile-error-gmp-h-no-such-file-or-directory-866279/)

frank zhu 03-03-2011 02:33 PM

binutils 2.17 compile error: gmp.h: No such file or directory
 
Hi,

I am building lfs on Debian 6 - Squeeze on i686 pc. I appreciate if anyone could give some help or hint.

Below is the error message extracted from config.log:

...

configure:2317: checking for correct version of gmp.h
configure:2330: gcc -B/usr/bin/ -c -g -O2 conftest.c 1>&5
configure:2320:17: error: gmp.h: No such file or directory
configure: In function 'main':
configure:2324: error: 'choke' undeclared (first use in this function)
configure:2324: error: (Each undeclared identifier is reported only once
configure:2324: error: for each function it appears in.)
configure:2324: error: expected ';' before 'me'
configure: failed program was:
#line 2319 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

; return 0; }

...

And here is the version-check.sh output:
bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Debian) 2.20.1-system.20100303
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.7
/usr/bin/awk -> /usr/bin/gawk
gcc (Debian 4.4.5-8) 4.4.5
GNU C Library (Debian EGLIBC 2.11.2-10) stable release version 2.11.2
GNU grep 2.6.3
gzip 1.3.12
Linux version 2.6.32-5-486 (Debian 2.6.32-30) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Wed Jan 12 03:28:50 UTC 2011
m4 (GNU M4) 1.4.14
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.23
Texinfo: makeinfo (GNU texinfo) 4.13
Compilation OK

business_kid 03-03-2011 02:56 PM

Hi. Welcome.
With Linuxfromscratch queries, always state where you are in the book. Binutils gets built twice. Once from the original system, once in the chroot. Best to give the stage ch 6:7 or whatever.

You are missing gmp.h. One comes with the kernel headers, one with glibc, and one with gmp. Are kernel headers installed on the debian side?

frank zhu 03-03-2011 03:06 PM

Thanks for your reply.

This is the 1st step: ch 5.3 Binutils-2.17 - Pass 1 on lfs book v 6.3

I don't see a requirement of kernel headers installed before 5.3. Build kernel headers is in step 5.5, which is after 5.3.

druuna 03-03-2011 03:26 PM

Hi,
Quote:

Originally Posted by frank zhu (Post 4278120)
..... on lfs book v 6.3

Why 6.3, why not the latest stable LFS 6.7?

If you are building 6.3: A lot of the host requirements are not met (most of the version are too high in the output that you posted). There's also a link to dash instead of bash.

Also: Check to see if gmp.h (not igmp.h) is present on your debian host, you might need to install it (libgmp3-dev).

Hope this helps.

frank zhu 03-03-2011 03:39 PM

thanks Druuna for your kind reply.

Good question. I started lfs project with 6.7 -- use book v 6.7 with source tar ball 6.7. However, gets stuck on ch5:10 gcc 4.5.1 pass 2.

Then I thought maybe v6.3 is more stable since my liveCD version is 6.3. It turns out a bad idea.

I will switch my gear to v6.7 and post my issue here on a different thread.

BTW, is it better to use liveCD v6.3 to build lfs rather than debian Squeeze?

druuna 03-03-2011 03:47 PM

Hi,

Quote:

Originally Posted by frank zhu
I will switch my gear to v6.7 and post my issue here on a different thread.

Smart move :)

If your host is up to specs and you follow the book, you should come a log way. And do post any problems, that's why we are here for :)

Quote:

BTW, is it better to use liveCD v6.3 to build lfs rather than debian Squeeze?
I would probably still prefer the LFS liveCD, but Debian (6/squeeze) can, with some minor adjustments, be used as a host (own experience: Debian 6 -> LFS 6.7 stable).


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