LinuxQuestions.org
Help answer threads with 0 replies.
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 06-24-2010, 07:10 PM   #1
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Rep: Reputation: 15
Cpp fails sanity check. Cannot compile gcc in chapter 6 after entering chroot env.


Hi,

I got mostly done with installing LFS, however, I had to shutdown, and exit the environment with the variables lost.

I don't know what to do. I redefined $LFS and $LFS_TGT, mounted both partitions, and mounted these:

Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
I'm sure there was something else I need to define to continue. Can someone help?

Oh yes, I use LFS 6.6 as my book.
 
Old 06-25-2010, 05:51 AM   #2
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dragos240 View Post
Hi,

I got mostly done with installing LFS, however, I had to shutdown, and exit the environment with the variables lost.

I don't know what to do. I redefined $LFS and $LFS_TGT, mounted both partitions, and mounted these:

Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
I'm sure there was something else I need to define to continue. Can someone help?

Oh yes, I use LFS 6.6 as my book.
Bump
 
Old 06-25-2010, 06:14 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

LFS and LFS_TGT should be available (which you did).

You need to do the relevant parts of chapter 6.2 (especially 6.2.2 and 6.2.3. You should not have to do the mkdir's, but check them anyway). After that you enter the chrooted environment as described in 6.4. (see the NOTE in chapter 6.4).

You should be set to continue from this point on.

Hope this helps.
 
1 members found this post helpful.
Old 06-25-2010, 06:19 AM   #4
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

LFS and LFS_TGT should be available (which you did).

You need to do the relevant parts of chapter 6.2 (especially 6.2.2 and 6.2.3. You should not have to do the mkdir's, but check them anyway). After that you enter the chrooted environment as described in 6.4. (see the NOTE in chapter 6.4).

You should be set to continue from this point on.

Hope this helps.
Thanks!

EDIT:
Oh, and I also forgot something else. I needed to set my PATH so that /tools/bin is there. That's what I forgot! It was late as well. Now it's the morning.

Last edited by dragos240; 06-25-2010 at 06:30 AM.
 
Old 06-25-2010, 07:30 AM   #5
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
*Duplicate*

Last edited by dragos240; 06-25-2010 at 07:33 AM.
 
Old 06-25-2010, 07:32 AM   #6
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Actually nevermind. Didn't work

"LFS_TGT=/tools/bin/i686-lfs-linux-gnu" right? Same error occured. What do you think the problem is?
 
Old 06-25-2010, 07:51 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

LFS_TGT=$(uname -m)-lfs-linux-gnu (see chapter 4.4). But......

Quote:
The LFS_TGT variable sets a non-default, but compatible machine description for use when building our cross compiler and linker and when cross compiling our temporary toolchain. More information is contained in Section 5.2, “Toolchain Technical Notes”.
LFS_TGT isn't used in chapter 6, it is used in chapter5.

Are you sure the problem lies in the way you re-entered the chrooted environment?

I do assume you are working on 6.16. GCC-4.4.3 and something fails.

Are you sure all the previous steps worked ok?

Can you post the actual error you see?

Hope this helps.
 
Old 06-25-2010, 12:18 PM   #8
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

LFS_TGT=$(uname -m)-lfs-linux-gnu (see chapter 4.4). But......

LFS_TGT isn't used in chapter 6, it is used in chapter5.

Are you sure the problem lies in the way you re-entered the chrooted environment?

I do assume you are working on 6.16. GCC-4.4.3 and something fails.

Are you sure all the previous steps worked ok?

Can you post the actual error you see?

Hope this helps.
Code:
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/sources/gcc-build/i686-pc-linux-gnu/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/sources/gcc-build'
make: *** [all] Error 2
config.log:
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ../gcc-4.4.3/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap

## --------- ##
## Platform. ##
## --------- ##

hostname = debian
uname -m = i686
uname -r = 2.6.32-bpo.3-686
uname -s = Linux
uname -v = #1 SMP Wed Mar 17 14:31:18 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /tools/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1563: checking build system type
configure:1581: result: i686-pc-linux-gnu
configure:1616: checking host system type
configure:1630: result: i686-pc-linux-gnu
configure:1638: checking target system type
configure:1652: result: i686-pc-linux-gnu
configure:1696: checking for a BSD-compatible install
configure:1762: result: /tools/bin/install -c
configure:1773: checking whether ln works
configure:1795: result: yes
configure:1799: checking whether ln -s works
configure:1803: result: yes
configure:3002: checking for gcc
configure:3018: found /tools/bin/gcc
configure:3028: result: gcc
configure:3274: checking for C compiler version
configure:3277: gcc --version </dev/null >&5
gcc (GCC) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3280: $? = 0
configure:3282: gcc -v </dev/null >&5
Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/4.4.3/specs
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.3/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
Thread model: posix
gcc version 4.4.3 (GCC) 
configure:3285: $? = 0
configure:3287: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3290: $? = 1
configure:3313: checking for C compiler default output file name
configure:3316: gcc    conftest.c  >&5
configure:3319: $? = 0
configure:3367: result: a.out
configure:3372: checking whether the C compiler works
configure:3378: ./a.out
configure:3381: $? = 0
configure:3400: result: yes
configure:3407: checking whether we are cross compiling
configure:3409: result: no
configure:3412: checking for suffix of executables
configure:3414: gcc -o conftest    conftest.c  >&5
configure:3417: $? = 0
configure:3444: result: 
configure:3450: checking for suffix of object files
configure:3471: gcc -c   conftest.c >&5
configure:3474: $? = 0
configure:3498: result: o
configure:3502: checking whether we are using the GNU C compiler
configure:3526: gcc -c   conftest.c >&5
configure:3532: $? = 0
configure:3536: test -z 
			 || test ! -s conftest.err
configure:3539: $? = 0
configure:3542: test -s conftest.o
configure:3545: $? = 0
configure:3558: result: yes
configure:3564: checking whether gcc accepts -g
configure:3585: gcc -c -g  conftest.c >&5
configure:3591: $? = 0
configure:3595: test -z 
			 || test ! -s conftest.err
configure:3598: $? = 0
configure:3601: test -s conftest.o
configure:3604: $? = 0
configure:3615: result: yes
configure:3632: checking for gcc option to accept ANSI C
configure:3702: gcc  -c -g -O2  conftest.c >&5
configure:3708: $? = 0
configure:3712: test -z 
			 || test ! -s conftest.err
configure:3715: $? = 0
configure:3718: test -s conftest.o
configure:3721: $? = 0
configure:3739: result: none needed
configure:3757: gcc -c -g -O2  conftest.c >&5
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:3763: $? = 1
configure: failed program was:
| #ifndef __cplusplus
|   choke me
| #endif
configure:3948: checking for g++
configure:3964: found /tools/bin/g++
configure:3974: result: g++
configure:3990: checking for C++ compiler version
configure:3993: g++ --version </dev/null >&5
g++ (GCC) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3996: $? = 0
configure:3998: g++ -v </dev/null >&5
Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/4.4.3/specs
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.3/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
Thread model: posix
gcc version 4.4.3 (GCC) 
configure:4001: $? = 0
configure:4003: g++ -V </dev/null >&5
g++: '-V' option must have argument
configure:4006: $? = 1
configure:4009: checking whether we are using the GNU C++ compiler
configure:4033: g++ -c   conftest.cc >&5
configure:4039: $? = 0
configure:4043: test -z 
			 || test ! -s conftest.err
configure:4046: $? = 0
configure:4049: test -s conftest.o
configure:4052: $? = 0
configure:4065: result: yes
configure:4071: checking whether g++ accepts -g
configure:4092: g++ -c -g  conftest.cc >&5
configure:4098: $? = 0
configure:4102: test -z 
			 || test ! -s conftest.err
configure:4105: $? = 0
configure:4108: test -s conftest.o
configure:4111: $? = 0
configure:4122: result: yes
configure:4164: g++ -c -g -O2  conftest.cc >&5
configure:4170: $? = 0
configure:4174: test -z 
			 || test ! -s conftest.err
configure:4177: $? = 0
configure:4180: test -s conftest.o
configure:4183: $? = 0
configure:4209: g++ -c -g -O2  conftest.cc >&5
conftest.cc: In function 'int main()':
conftest.cc:13: error: 'exit' was not declared in this scope
configure:4215: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4164: g++ -c -g -O2  conftest.cc >&5
conftest.cc:9: error: 'void std::exit(int)' should have been declared inside 'std'
configure:4170: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| extern "C" void std::exit (int) throw (); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4164: g++ -c -g -O2  conftest.cc >&5
conftest.cc:9: error: 'void std::exit(int)' should have been declared inside 'std'
In file included from conftest.cc:10:
/usr/include/stdlib.h:543: error: declaration of 'void std::exit(int) throw ()' throws different exceptions
conftest.cc:9: error: from previous declaration 'void std::exit(int)'
configure:4170: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| extern "C" void std::exit (int); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4164: g++ -c -g -O2  conftest.cc >&5
configure:4170: $? = 0
configure:4174: test -z 
			 || test ! -s conftest.err
configure:4177: $? = 0
configure:4180: test -s conftest.o
configure:4183: $? = 0
configure:4209: g++ -c -g -O2  conftest.cc >&5
configure:4215: $? = 0
configure:4219: test -z 
			 || test ! -s conftest.err
configure:4222: $? = 0
configure:4225: test -s conftest.o
configure:4228: $? = 0
configure:4315: checking for gnatbind
configure:4342: result: no
configure:4395: checking for gnatmake
configure:4422: result: no
configure:4434: checking whether compiler driver understands Ada
configure:4457: result: no
configure:4466: checking how to compare bootstrapped objects
configure:4491: result: cmp --ignore-initial=16 $$f1 $$f2
configure:4890: checking for version 0.10 of PPL
configure:4912: gcc -c -g -O2 -I/include  -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr   conftest.c >&5
conftest.c:12:19: error: ppl_c.h: No such file or directory
conftest.c: In function 'main':
conftest.c:18: error: 'choke' undeclared (first use in this function)
conftest.c:18: error: (Each undeclared identifier is reported only once
conftest.c:18: error: for each function it appears in.)
conftest.c:18: error: expected ';' before 'me'
configure:4918: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| extern "C" void exit (int) throw ();
| #endif
| /* end confdefs.h.  */
| #include "ppl_c.h"
| int
| main ()
| {
| 
|   #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR != 10
|   choke me
|   #endif
| 
|   ;
|   return 0;
| }
configure:4939: result: no
configure:5009: checking for correct version of CLooG
configure:5031: gcc -c -g -O2 -I/include -DCLOOG_PPL_BACKEND  -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr    conftest.c >&5
conftest.c:12:25: error: cloog/cloog.h: No such file or directory
conftest.c: In function 'main':
conftest.c:18: error: 'choke' undeclared (first use in this function)
conftest.c:18: error: (Each undeclared identifier is reported only once
conftest.c:18: error: for each function it appears in.)
conftest.c:18: error: expected ';' before 'me'
configure:5037: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #ifdef __cplusplus
| extern "C" void exit (int) throw ();
| #endif
| /* end confdefs.h.  */
| #include "cloog/cloog.h"
| int
| main ()
| {
| 
|   #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
|   choke me
|   #endif
| 
|   ;
|   return 0;
| }
configure:5058: result: no
configure:6402: checking for bison
configure:6431: result: no
configure:6402: checking for byacc
configure:6431: result: no
configure:6402: checking for yacc
configure:6431: result: no
configure:6448: checking for bison
configure:6477: result: no
configure:6493: checking for gm4
configure:6522: result: no
configure:6493: checking for gnum4
configure:6522: result: no
configure:6493: checking for m4
configure:6509: found /tools/bin/m4
configure:6519: result: m4
configure:6538: checking for flex
configure:6567: result: no
configure:6538: checking for lex
configure:6567: result: no
configure:6584: checking for flex
configure:6613: result: no
configure:6629: checking for makeinfo
configure:6645: found /tools/bin/makeinfo
configure:6655: result: makeinfo
configure:6688: checking for expect
configure:6704: found /tools/bin/expect
configure:6714: result: expect
configure:6735: checking for runtest
configure:6764: result: no
configure:6874: checking for ar
configure:6890: found /usr/bin/ar
configure:6900: result: ar
configure:7009: checking for as
configure:7025: found /usr/bin/as
configure:7035: result: as
configure:7144: checking for dlltool
configure:7173: result: no
configure:7202: checking for ld
configure:7228: result: /tools/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld
configure:7414: checking for lipo
configure:7443: result: no
configure:7549: checking for nm
configure:7565: found /usr/bin/nm
configure:7575: result: nm
configure:7684: checking for ranlib
configure:7700: found /usr/bin/ranlib
configure:7710: result: ranlib
configure:7814: checking for strip
configure:7830: found /usr/bin/strip
configure:7840: result: strip
configure:7944: checking for windres
configure:7973: result: no
configure:8079: checking for windmc
configure:8108: result: no
configure:8214: checking for objcopy
configure:8230: found /usr/bin/objcopy
configure:8240: result: objcopy
configure:8349: checking for objdump
configure:8365: found /usr/bin/objdump
configure:8375: result: objdump
configure:8523: checking for cc
configure:8539: found /tools/bin/cc
configure:8549: result: cc
configure:8678: checking for c++
configure:8694: found /tools/bin/c++
configure:8704: result: c++
configure:8833: checking for gcc
configure:8849: found /tools/bin/gcc
configure:8859: result: gcc
configure:8983: checking for gcj
configure:9012: result: no
configure:9138: checking for gfortran
configure:9167: result: no
configure:9227: checking for ar
configure:9260: result: no
configure:9372: checking for ar
configure:9388: found /usr/bin/ar
configure:9398: result: ar
configure:9450: checking for as
configure:9483: result: no
configure:9595: checking for as
configure:9611: found /usr/bin/as
configure:9621: result: as
configure:9673: checking for dlltool
configure:9706: result: no
configure:9818: checking for dlltool
configure:9847: result: no
configure:9896: checking for ld
configure:9929: result: no
configure:10041: checking for ld
configure:10057: found /usr/bin/ld
configure:10067: result: ld
configure:10119: checking for lipo
configure:10152: result: no
configure:10264: checking for lipo
configure:10293: result: no
configure:10342: checking for nm
configure:10375: result: no
configure:10487: checking for nm
configure:10503: found /usr/bin/nm
configure:10513: result: nm
configure:10565: checking for objdump
configure:10598: result: no
configure:10710: checking for objdump
configure:10726: found /usr/bin/objdump
configure:10736: result: objdump
configure:10788: checking for ranlib
configure:10821: result: no
configure:10933: checking for ranlib
configure:10949: found /usr/bin/ranlib
configure:10959: result: ranlib
configure:11011: checking for strip
configure:11044: result: no
configure:11156: checking for strip
configure:11172: found /usr/bin/strip
configure:11182: result: strip
configure:11234: checking for windres
configure:11267: result: no
configure:11379: checking for windres
configure:11408: result: no
configure:11457: checking for windmc
configure:11490: result: no
configure:11602: checking for windmc
configure:11631: result: no
configure:11658: checking where to find the target ar
configure:11691: result: host tool
configure:11700: checking where to find the target as
configure:11733: result: host tool
configure:11742: checking where to find the target cc
configure:11765: result: just compiled
configure:11784: checking where to find the target c++
configure:11810: result: just compiled
configure:11829: checking where to find the target c++ for libstdc++
configure:11855: result: just compiled
configure:11874: checking where to find the target dlltool
configure:11907: result: host tool
configure:11916: checking where to find the target gcc
configure:11939: result: just compiled
configure:11958: checking where to find the target gcj
configure:11994: result: host tool
configure:12003: checking where to find the target gfortran
configure:12039: result: host tool
configure:12048: checking where to find the target ld
configure:12081: result: host tool
configure:12090: checking where to find the target lipo
configure:12112: result: host tool
configure:12121: checking where to find the target nm
configure:12154: result: host tool
configure:12163: checking where to find the target objdump
configure:12196: result: host tool
configure:12205: checking where to find the target ranlib
configure:12238: result: host tool
configure:12247: checking where to find the target strip
configure:12280: result: host tool
configure:12289: checking where to find the target windres
configure:12322: result: host tool
configure:12331: checking where to find the target windmc
configure:12364: result: host tool
configure:12401: checking whether to enable maintainer-specific portions of Makefiles
configure:12410: result: no
configure:12443: checking whether -fkeep-inline-functions is supported
configure:12467: gcc -c -g -O2 -fkeep-inline-functions  conftest.c >&5
configure:12473: $? = 0
configure:12477: test -z 
			 || test ! -s conftest.err
configure:12480: $? = 0
configure:12483: test -s conftest.o
configure:12486: $? = 0
configure:12488: result: yes
configure:12705: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on debian

config.status:770: creating Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/tools/bin/install -c'
ac_cv_prog_AR=ar
ac_cv_prog_AR_FOR_TARGET=ar
ac_cv_prog_AS=as
ac_cv_prog_AS_FOR_TARGET=as
ac_cv_prog_CC_FOR_TARGET=cc
ac_cv_prog_CXX_FOR_TARGET=c++
ac_cv_prog_EXPECT=expect
ac_cv_prog_GCC_FOR_TARGET=gcc
ac_cv_prog_LD=/tools/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld
ac_cv_prog_LD_FOR_TARGET=ld
ac_cv_prog_M4=m4
ac_cv_prog_MAKEINFO=makeinfo
ac_cv_prog_NM=nm
ac_cv_prog_NM_FOR_TARGET=nm
ac_cv_prog_OBJCOPY=objcopy
ac_cv_prog_OBJDUMP=objdump
ac_cv_prog_OBJDUMP_FOR_TARGET=objdump
ac_cv_prog_RANLIB=ranlib
ac_cv_prog_RANLIB_FOR_TARGET=ranlib
ac_cv_prog_STRIP=strip
ac_cv_prog_STRIP_FOR_TARGET=strip
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_GNATBIND=no
ac_cv_prog_ac_ct_GNATMAKE=no
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_cxx_g=yes
ac_cv_target=i686-pc-linux-gnu
ac_cv_target_alias=i686-pc-linux-gnu
acx_cv_cc_gcc_supports_ada=no
acx_cv_prog_LN=ln
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
gcc_cv_tool_dirs=/usr/libexec/gcc/i686-pc-linux-gnu/4.4.3:/usr/libexec/gcc/i686-pc-linux-gnu:/usr/lib/gcc/i686-pc-linux-gnu/4.4.3:/usr/lib/gcc/i686-pc-linux-gnu:/usr/i686-pc-linux-gnu/bin/i686-pc-linux-gnu/4.4.3:/usr/i686-pc-linux-gnu/bin:
gcc_cv_tool_prefix=/usr

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='ar'
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET='$(AR)'
AS='as'
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET='$(AS)'
BISON='/sources/gcc-4.4.3/missing bison'
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
CFLAGS='-g -O2'
CFLAGS_FOR_BUILD='-g -O2'
CFLAGS_FOR_TARGET='-g -O2'
COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX='g++'
CXXFLAGS='-g -O2'
CXXFLAGS_FOR_BUILD='-g -O2'
CXXFLAGS_FOR_TARGET='-g -O2'
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" '
DLLTOOL='dlltool'
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET='$(DLLTOOL)'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
EXPECT='expect'
FLAGS_FOR_TARGET=' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
FLEX='/sources/gcc-4.4.3/missing flex'
GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET='$(GCJ)'
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET='$(GFORTRAN)'
GNATBIND='no'
GNATMAKE='no'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD='/tools/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld'
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET='$(LD)'
LEX='/sources/gcc-4.4.3/missing flex'
LIBOBJS=''
LIBS='-L/lib -lcloog -L/lib -lppl_c -lppl -lgmpxx  '
LIPO='lipo'
LIPO_FOR_TARGET='$(LIPO)'
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4='m4'
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='makeinfo'
NM='nm'
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET='$(NM)'
OBJCOPY='objcopy'
OBJDUMP='objdump'
OBJDUMP_FOR_TARGET='$(OBJDUMP)'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='ranlib'
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET='$(RANLIB)'
RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
RPATH_ENVVAR='LD_LIBRARY_PATH'
RUNTEST='runtest'
SHELL='/bin/sh'
STRIP='strip'
STRIP_FOR_TARGET='$(STRIP)'
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../gcc-4.4.3/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap'
WINDMC='windmc'
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET='$(WINDMC)'
WINDRES='windres'
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET='$(WINDRES)'
YACC='/sources/gcc-4.4.3/missing bison -y'
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_GNATBIND='no'
ac_ct_GNATMAKE='no'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_configargs='--cache-file=../config.cache '--prefix=/usr' '--libexecdir=/usr/lib' '--enable-shared' '--enable-threads=posix' '--enable-__cxa_atexit' '--enable-clocale=gnu' '--disable-multilib' '--disable-bootstrap' '--enable-languages=c,c++' --program-transform-name='s,y,y,''
build_configdirs=' libiberty fixincludes'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnu'
build_noncanonical='i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_tooldir='${exec_prefix}/i686-pc-linux-gnu'
build_vendor='pc'
clooginc=''
clooglibs=''
config_shell='/bin/sh'
configdirs=' intl libiberty libcpp libdecnumber gmp mpfr fixincludes gcc'
datadir='${prefix}/share'
datarootdir='${prefix}/share'
do_compare='cmp --ignore-initial=16 $$f1 $$f2'
docdir='${datarootdir}/doc'
exec_prefix='${prefix}'
extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp'
gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs -L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs -lmpfr -lgmp'
host='i686-pc-linux-gnu'
host_alias=''
host_configargs='--cache-file=./config.cache  '--prefix=/usr' '--libexecdir=/usr/lib' '--enable-shared' '--enable-threads=posix' '--enable-__cxa_atexit' '--enable-clocale=gnu' '--disable-multilib' '--disable-bootstrap' '--enable-languages=c,c++' --program-transform-name='s,y,y,''
host_cpu='i686'
host_noncanonical='i686-pc-linux-gnu'
host_os='linux-gnu'
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='/usr/lib'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pplinc=''
ppllibs=''
prefix='/usr'
program_transform_name='s,y,y,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags='-g -fkeep-inline-functions'
stage1_checking='--enable-checking=yes,types'
stage1_languages='c'
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='i686-pc-linux-gnu'
target_alias=''
target_configargs='--cache-file=./config.cache '--prefix=/usr' '--libexecdir=/usr/lib' '--enable-shared' '--enable-threads=posix' '--enable-__cxa_atexit' '--enable-clocale=gnu' '--disable-multilib' '--disable-bootstrap' '--enable-languages=c,c++' --program-transform-name='s,y,y,''
target_cpu='i686'
target_noncanonical='i686-pc-linux-gnu'
target_os='linux-gnu'
target_subdir='i686-pc-linux-gnu'
target_vendor='pc'
tooldir='${exec_prefix}/i686-pc-linux-gnu'

## ------------- ##
## Output files. ##
## ------------- ##

alphaieee_frag='/dev/null'
host_makefile_frag='../gcc-4.4.3/config/mh-x86omitfp'
ospace_frag='/dev/null'
serialization_dependencies='serdep.tmp'
target_makefile_frag='../gcc-4.4.3/config/mt-gnu'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#endif
#ifdef __cplusplus
extern "C" void exit (int) throw ();

configure: exit 0
 
Old 06-25-2010, 12:50 PM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

I'm not sure what to make of the output, never seen this before.....

Can you explain this:
Quote:
Oh, and I also forgot something else. I needed to set my PATH so that /tools/bin is there.
Once you enter the chrooted environment that is set already set:

Quote:
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h
No need to have to set it once you entered that environment.

Are you sure you started with the following steps (after the reboot):

1) 6.2.2. Mounting and Populating /dev
mount -v --bind /dev $LFS/dev

2) 6.2.3. Mounting Virtual Kernel File Systems
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys


3) 6.4. Entering the Chroot Environment
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h


Hope this helps.
 
Old 06-25-2010, 01:12 PM   #10
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

I'm not sure what to make of the output, never seen this before.....

Can you explain this:

Once you enter the chrooted environment that is set already set:


No need to have to set it once you entered that environment.

Are you sure you started with the following steps (after the reboot):

1) 6.2.2. Mounting and Populating /dev
mount -v --bind /dev $LFS/dev

2) 6.2.3. Mounting Virtual Kernel File Systems
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys


3) 6.4. Entering the Chroot Environment
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h


Hope this helps.

I did those exact commands, in order! Well, I first mounted my partitions. But I did do those commands.
 
Old 06-25-2010, 01:31 PM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

How about my other question?

If you did the above commands you do not have to set your path to include /tools/bin, you said you had to. Please tell a bit more, you are very short in your answers...

Did you check if /lib/cpp is present?
 
Old 06-25-2010, 01:37 PM   #12
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

How about my other question?

If you did the above commands you do not have to set your path to include /tools/bin, you said you had to. Please tell a bit more, you are very short in your answers...

Did you check if /lib/cpp is present?
/lib/cpp does not exist. Sorry about the length of my posts. I'll try to be more descriptive. I thought I had too, I didn't really look at the chroot command, so that's why I thought it was an issue. Anyway, do you think I should put /tools/bin first on the chroot command, or edit the Makefile?
 
Old 06-25-2010, 03:09 PM   #13
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dragos240 View Post
/lib/cpp does not exist. Sorry about the length of my posts. I'll try to be more descriptive. I thought I had too, I didn't really look at the chroot command, so that's why I thought it was an issue. Anyway, do you think I should put /tools/bin first on the chroot command, or edit the Makefile?
Actually /lib/cpp does exist. I overlooked it.

EDIT: Actually it doesn't. Sorry for the confusion. Feel free to delete this post.

Last edited by dragos240; 06-25-2010 at 03:10 PM.
 
Old 06-25-2010, 03:49 PM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

If /lib/cpp does not exist, something went wrong in chapter 5.10. GCC-4.4.3 - Pass 2. That is where, among other things, cpp is compiled, made and installed. Everything build in chapter 5 is used as a sane base in chapter 6.

You need to "fix" that first, which means you need to start from scratch again. Too many things have changed by now.......

No good news, but that's how it is.
 
Old 06-25-2010, 03:54 PM   #15
dragos240
Member
 
Registered: Apr 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

If /lib/cpp does not exist, something went wrong in chapter 5.10. GCC-4.4.3 - Pass 2. That is where, among other things, cpp is compiled, made and installed. Everything build in chapter 5 is used as a sane base in chapter 6.

You need to "fix" that first, which means you need to start from scratch again. Too many things have changed by now.......

No good news, but that's how it is.
What about just deleting gcc-build and gcc-4.4.3, then extracting a fresh folder, and finally compiling pass 2. And then continuing. Would that work? The bin cpp is there. Huh.
 
  


Reply


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 fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check jaydoc Linux From Scratch 1 01-28-2009 05:17 PM
CPP fails sanity check on debian grapnell Debian 14 08-16-2006 01:18 PM
CPP Fails Sanity Check when compiling grapnell Linux - Software 4 08-16-2006 10:03 AM
cpp fails sanity check??? dinolinux Debian 2 07-30-2005 11:43 AM
cpp fails sanity check? linux-rulz Linux - Software 4 05-16-2005 04:00 AM


All times are GMT -5. The time now is 11:14 AM.

Main Menu
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