gcc-4.7.1 make error, LFS 7.2 stable
Hi,
I'm wondering why I can't run thru "make" within chapter 5.5. gcc-4.7.1: In file included from /mnt/lfs/tools/include/limits.h:26:0, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/limits.h:169, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/syslimits.h:7, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/limits.h:34, from ../../../gcc-4.7.1/libgcc/libgcc2.c:1733: /mnt/lfs/tools/include/features.h:375:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. make[2]: *** [_fixunssfsi.o] Error 1 What went wrong? I tried several times cleaning, installing all over again e.g. binutils, etc.. There is no "sys" directory in /mnt/lfs/tools/include". Why? Cant solve it. Need help, thanks alot! |
Hi
ok lets start can you post the output of version-check and the commands you have run on gcc |
sys/cdefs.h is in the (e)glibc package is it installed properly?
|
gcc-4.7.1 make error, LFS 7.2 stable
Quote:
1. version-check tells 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 (Debian EGLIBC 2.11.3-3) 2.11.3 GNU grep 2.6.3 gzip 1.3.12 Linux version 2.6.32-5-686 (Debian 2.6.32-41squeeze2) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Mar 26 05:20:33 UTC 2012 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 xz (XZ Utils) 5.0.0 gcc compilation OK 2. I did all what the book said here http://www.linuxfromscratch.org/lfs/...gcc-pass1.html The compilers config.log file has been succsesfully created. "Make" the 2nd time failed as: lfs@debian:/mnt/lfs/sources/gcc-build$ make make[1]: Entering directory `/mnt/lfs/sources/gcc-build' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/libiberty' make[3]: Entering directory `/mnt/lfs/sources/gcc-build/libiberty/testsuite' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/libiberty/testsuite' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/libiberty' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/fixincludes' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/fixincludes' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/lto-plugin' make all-am make[3]: Entering directory `/mnt/lfs/sources/gcc-build/lto-plugin' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/lto-plugin' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/lto-plugin' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gmp' make all-recursive make[3]: Entering directory `/mnt/lfs/sources/gcc-build/gmp' Making all in tests make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests' Making all in . make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests' make[5]: Nothing to be done for `all-am'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests' Making all in devel make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/devel' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/devel' Making all in mpn make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpn' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpn' Making all in mpz make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpz' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpz' Making all in mpq make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpq' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpq' Making all in mpf make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpf' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpf' Making all in rand make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/rand' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/rand' Making all in misc make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/misc' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/misc' Making all in cxx make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/cxx' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/cxx' Making all in mpbsd make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpbsd' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests/mpbsd' make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tests' Making all in mpn make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/mpn' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/mpn' Making all in mpz make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/mpz' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/mpz' Making all in mpq make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/mpq' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/mpq' Making all in mpf make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/mpf' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/mpf' Making all in printf make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/printf' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/printf' Making all in scanf make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/scanf' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/scanf' Making all in cxx make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/cxx' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/cxx' Making all in mpbsd make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/mpbsd' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/mpbsd' Making all in demos make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/demos' Making all in calc make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/demos/calc' make all-am make[6]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/demos/calc' make[6]: Nothing to be done for `all-am'. make[6]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/demos/calc' make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/demos/calc' Making all in expr make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/demos/expr' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/demos/expr' make[5]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/demos' make[5]: Nothing to be done for `all-am'. make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/demos' make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/demos' Making all in tune make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/tune' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/tune' Making all in doc make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp/doc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp/doc' make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gmp' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp' make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gmp' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/intl' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/intl' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr' Making all in doc make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr/doc' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr/doc' Making all in src make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr/src' make all-am make[4]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr/src' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr/src' make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr/src' Making all in tests make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr/tests' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr/tests' Making all in tune make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr/tune' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr/tune' make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpfr' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/mpfr' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/mpc' make all-recursive make[3]: Entering directory `/mnt/lfs/sources/gcc-build/mpc' Making all in src make[4]: Entering directory `/mnt/lfs/sources/gcc-build/mpc/src' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc/src' Making all in tests make[4]: Entering directory `/mnt/lfs/sources/gcc-build/mpc/tests' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc/tests' Making all in doc make[4]: Entering directory `/mnt/lfs/sources/gcc-build/mpc/doc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc/doc' make[4]: Entering directory `/mnt/lfs/sources/gcc-build/mpc' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc' make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/libiberty' make[3]: Entering directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/libiberty/testsuite' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/libiberty/testsuite' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/libiberty' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/fixincludes' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/build-i686-pc-linux-gnu/fixincludes' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/zlib' true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/tools" "infodir=/tools/share/info" "libdir=/tools/lib" "prefix=/tools" "tooldir=/tools/i686-lfs-linux-gnu" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/zlib' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/libcpp' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/libcpp' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/libdecnumber' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/libdecnumber' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc' make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc' Checking multilib configuration for libgcc... make[2]: Entering directory `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc' # If this is the top-level multilib, build all the other # multilibs. /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fpic -I. -I. -I../.././gcc -I../../../gcc-4.7.1/libgcc -I../../../gcc-4.7.1/libgcc/. -I../../../gcc-4.7.1/libgcc/../gcc -I../../../gcc-4.7.1/libgcc/../include -DHAVE_CC_TLS -DUSE_TLS -o _fixunssfsi.o -MT _fixunssfsi.o -MD -MP -MF _fixunssfsi.dep -DL_fixunssfsi -c ../../../gcc-4.7.1/libgcc/libgcc2.c In file included from /mnt/lfs/tools/include/limits.h:26:0, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/limits.h:169, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/syslimits.h:7, from /mnt/lfs/sources/gcc-build/./gcc/include-fixed/limits.h:34, from ../../../gcc-4.7.1/libgcc/libgcc2.c:1733: /mnt/lfs/tools/include/features.h:375:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. make[2]: *** [_fixunssfsi.o] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 |
Quote:
|
Quote:
installing glibc is the one of the next steps in the book to install after gcc's "make install" went thru... so the glibc package has not been installed for cross-compiling on /mnt/lfs/sources/glibc-build etc. The host tells "(Debian EGLIBC 2.11.3-3) 2.11.3" has been installed... Thanks. |
So the dev pkg for glibc in the host is probably not installed properly, debian splits dev files ( includes etc ) from the runtime files
|
Hi,
I fixed the bash shell, but this doesn't help: lfs@debian:/mnt/lfs$ bash version-check.sh bash, version 4.1.5(1)-release /bin/sh -> /bin/bash Binutils: (GNU Binutils for Debian) 2.20.1-system.20100303 ...etc. gcc (Debian 4.4.5-8) 4.4.5 (Debian EGLIBC 2.11.3-3) 2.11.3 GNU grep 2.6.3 ....etc. xz (XZ Utils) 5.0.0 gcc compilation OK I also tried to reinstall the most important glibc libs on the host. I'm not sure about this correct installation: lfs@debian:/mnt/lfs/sources/gcc-build$ aptitude search libc6 i libc6 - Embedded GNU C Library: Shared libraries p libc6-amd64 - Embedded GNU C Library: 64bit Shared libraries for AMD64 p libc6-dbg - Embedded GNU C Library: detached debugging symbols i A libc6-dev - Embedded GNU C Library: Development Libraries and Header Files p libc6-dev-amd64 - Embedded GNU C Library: 64bit Development Libraries for AMD64 i libc6-i686 - Embedded GNU C Library: Shared libraries [i686 optimized] p libc6-pic - Embedded GNU C Library: PIC archive library p libc6-prof - Embedded GNU C Library: Profiling Libraries p libc6-xen - Embedded GNU C Library: Shared libraries [Xen version] root@debian:~# aptitude search linux-libc-dev i A linux-libc-dev - Linux support headers for userspace development Also, this doesn't help yet, thanks ---------- Post added 10-16-12 at 01:03 PM ---------- Hi, I fixed the bash shell, but this doesn't help: lfs@debian:/mnt/lfs$ bash version-check.sh bash, version 4.1.5(1)-release /bin/sh -> /bin/bash Binutils: (GNU Binutils for Debian) 2.20.1-system.20100303 ...etc. gcc (Debian 4.4.5-8) 4.4.5 (Debian EGLIBC 2.11.3-3) 2.11.3 GNU grep 2.6.3 ....etc. xz (XZ Utils) 5.0.0 gcc compilation OK I also tried to reinstall the most important glibc libs on the host. I'm not sure about this correct installation: lfs@debian:/mnt/lfs/sources/gcc-build$ aptitude search libc6 i libc6 - Embedded GNU C Library: Shared libraries p libc6-amd64 - Embedded GNU C Library: 64bit Shared libraries for AMD64 p libc6-dbg - Embedded GNU C Library: detached debugging symbols i A libc6-dev - Embedded GNU C Library: Development Libraries and Header Files p libc6-dev-amd64 - Embedded GNU C Library: 64bit Development Libraries for AMD64 i libc6-i686 - Embedded GNU C Library: Shared libraries [i686 optimized] p libc6-pic - Embedded GNU C Library: PIC archive library p libc6-prof - Embedded GNU C Library: Profiling Libraries p libc6-xen - Embedded GNU C Library: Shared libraries [Xen version] root@debian:~# aptitude search linux-libc-dev i A linux-libc-dev - Linux support headers for userspace development Also, this doesn't help yet, thanks |
These are all the changes you need to apply to make Debian Squeeze (6.0.5) LFS compliant (info comes from this LQ Blog entry):
Code:
aptitude install gawk You haven't told us if you fully remove the source and build directory if you retry a package. I'm asking again because of this comment: Quote:
|
Hi,
when I try to re-compile a package I always clean up the appropriate sources and the build directory before starting all over. I work with the bash shell and ran from the very beginning... I read the LQ blog entry you posted and checked my system - seems to be compliant with Debian Squeeze. Why is /mnt/lfs/tools/include/sys/ needed? Or what is the reason that binutils doesn't create the sys dir? I lost here. ---------- Post added 10-16-12 at 03:38 PM ---------- Hi, when I try to re-compile a package I always clean up the appropriate sources and the build directory before starting all over. I work with the bash shell and ran from the very beginning... I read the LQ blog entry you posted and checked my system - seems to be compliant with Debian Squeeze. Why is /mnt/lfs/tools/include/sys/ needed? Or what is the reason that binutils doesn't create the sys dir? I lost here. |
Hi
The include dir is created in gcc not binutils, What I have done before is remove all the directories in tools then started at binutils again |
Thank you all!
The Problem has been solved. Debian use the dash default shell as terminal. When I changed it later to the bash shell as required for LFS - I started from the beginning but I didn't delete the tools directory! |
All times are GMT -5. The time now is 06:29 PM. |