On 05.10.2014 01:04, Ken Moffat wrote:
On Sun, Oct 05, 2014 at 12:14:59AM +0300, Andrei Banu wrote:
Hi,
I am attempting LFS version 7.6 but I got stuck on chapter
5.5.1 (cross GCC compile).
The host is CentOS 6.5 / 64bit:
Linux 2.6.32-431.el6.x86_64 #1 SMP
The /configure worked ok. The error came during make.
gcc (also binutils, and a few other packages) run 'configure in
various directories after 'make' is invoked. Also, gcc will
eventually run a second build to check itself.
The error message is this:
....
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/mnt/lfs/sources/gcc-build/gcc':
configure: WARNING: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
This _looks_ like the error, in that I do not recall seeing it in
my own logs.
checking for unordered_map... no
checking for tr1/unordered_map... no
checking for ext/hash_map... no
checking dependency style of g++... none
configure: error: no usable dependency style found
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
But, that does appear to be the test which caused it to fail.
My initial guess was that you missed the last line from the
configure command on that page : --enable-languages=c,c++ and
you can check that in your command history (e.g. use the
up-arrow from bash's command line). BUT forget htat, I see
that test in my own log, when it is configuring in ./gcc - in
my case it got the correct answer ('gcc3').
So, first run 'find -name config.log | xargs ls -l' :
that should tell you which of them was most recently accessed.
If that is ./config.log, the atime must have been updated when you
looked at it (unusual for a modern system), so look at the next
newest (or oall of them which have the same time.
Search for 'no usable dependency style found' and then look at the
lines just above that : configure sets up a test, logs what it is
going to run, runs it, reports any error, and then eventually
produces the error message. It is the command it ran, and the error
message which resulted directly from that, which matters.
ĸen
I am not sure which parts from config.log I should paste
in here as it's 1000 lines long but I'll go ahead and paste
some:
configure:4799: checking for C++ compiler version
configure:4808: g++ --version >&5
../gcc-4.9.1/configure: line 4810: g++: command not found
configure:4819: $? = 127
configure:4808: g++ -v >&5
../gcc-4.9.1/configure: line 4810: g++: command not found
configure:4819: $? = 127
configure:4808: g++ -V >&5
../gcc-4.9.1/configure: line 4810: g++: command not found
configure:4819: $? = 127
configure:4808: g++ -qversion >&5
../gcc-4.9.1/configure: line 4810: g++: command not found
configure:4819: $? = 127
configure:4823: checking whether we are using the GNU C++ compiler
configure:4842: g++ -c conftest.cpp >&5
../gcc-4.9.1/configure: line 1751: g++: command not found
This says that in _that_ test, g++ was not found : for me, that
is tested for early on in configure (before 'make') and correctly
reports
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
Which is a *different* first message (mine checked for 'g++',
and later, still from the initial run of 'configure', I can see:
checking where to find the target c++... just compiled
Does your host system have a working C++ compiler ?
ĸen
Hi,
The missing g++ was the problem. But I don't understand how was I able
to compile binutils without a working compiler? Anyway, I installed a
gcc-c++
and now it's working.
Thanks a lot!
Kind regards!
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style