LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 09-04-2005, 10:20 AM   #1
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
Solved Problem Second GCC-Pass(or gettext sanity check problem)


I had a problem and I was wondering if other people experienced the same.
I solved mine but hope that other may have something about my solution to the problem.

I compiled a lot of stuff until I got to chapter 5.22: Compiling gettext.
I ran the configure script but always got an error:
Code:
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /tools/bin/cpp -x c++
configure: error: C++ preprocessor "/tools/bin/cpp -x c++" fails sanity check
See `config.log' for more details.
configure: error: /bin/sh './configure' failed for gettext-runtime

I tried to give options to cpp to let it use c++. I tried:
Code:
export CXXCPPFLAGS='-x c++'
,
and similar commands to set the language to c++ through variables.
That didn't work so I started to do some check for myself.
After reading about the -x option of gcc, I came up with a good check.

I made a dummy-file as explained in the LFS-Book but named it dummy.cc, thus
letting the compiler think it is a c++-file. With this approach I noticed I Lacked a
c++-compiler. This was quite a surprise since I wrote all the scripts in the same way as the book. But since my LFS was useless I decided to start all over again.

Getting to the point off GCC second pass, I decided to put '' around 'c,c++' in the time-script I used for measuring the time in order to determine SBUs.
My Good time script for gcc-3.4.3:
Code:
{ time \
  {
    ../gcc-3.4.3/configure --prefix=/tools --libexecdir=/tools/lib \
    --with-local-prefix=/tools --enable-clocale=gnu --enable-shared \
    --enable-threads=posix --enable-__cxa_atexit --enable-languages='c,c++' \
    --disable-libstdcxx-pch &&
    make &&
    make -k check &&
    ../gcc-3.4.3/contrib/test_summary|grep -A7 summ > /lfs/temp/results \
    > /home/lfs/pgcc &&
    diff -u /home/lfs/pgcc /home/lfs/lfsgcc|less &&
    make install
  }
After installing gcc I did the check with dummy.cc again and it was successful.
So I am now positive I have a c++-compiler.

This has cost me a lot of time, for a problem that was solved very easy, and could have been prevented by better dummy-checks. I therefore hope that people will read this and will preform a lot of dummy-checks. Hopefully someone will point this simple check out to the LFS-people, so people know if the have a compiler on time and not after compiling a lot of other stuff before experiencing an error.

Because of the solution I have found I reckon that other people that count the time compiling takes using a script like mine are likely to experience the same problem, which is likely to be caused by the way bash interprets script.

I hope someone finds this a bit helpful.
Although it is annoying you notice the mistake very late.
 
  


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
LFS-5.0 GCC problem with binutils-2.14 pass 1 NCappaZoo Linux From Scratch 6 06-14-2009 03:47 AM
/lib/cpp fails sanity check problem Varius Linux - Software 1 08-26-2005 12:13 AM
LFS 6.0 problem: GCC check err. alinsoar Linux From Scratch 11 06-03-2005 05:37 AM
odd problem with GCC pass 1... :scratch: ParticleHunter Linux From Scratch 15 12-05-2004 10:21 PM
getText() problem in Java AMMullan Programming 2 04-18-2004 03:33 PM


All times are GMT -5. The time now is 12:46 PM.

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