LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-14-2008, 01:16 AM   #1
Doomed
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
LFS 6.3 - ncurses fails compiling - chapter 5.13.1 - SOLVED


I'm having some trouble compiling ncurses. Host system is Kubuntu 8.04 running in VMware. $LFS directory is /home/andrew/lfs.

On running configure, I get the following message:
Code:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Here's a dump of configure.

Code:
lfs@andrew-desktop:/home/andrew/lfs/sources/ncurses-5.6$ ./configure --prefix=/tools --with-shared --without-debug --without-ada --enable-overwrite
checking for egrep... grep -E
Configuring NCURSES 5.6 ABI 5 (Wed May 14 14:43:24 EST 2008)
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Configuring for linux-gnu
checking for prefix... /tools
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking version of gcc... 4.1.2
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking whether gcc understands -c and -o together... yes
checking for POSIXized ISC... no
checking for gcc option to accept ANSI C... -DCC_HAS_PROTOS
checking for ldconfig... /sbin/ldconfig
checking if you want to ensure bool is consistent with C++... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for g++... /tools/bin/g++
checking if you want to build C++ binding and demo... yes
checking if you want to build with Ada95... no
checking if you want to build programs such as tic... yes
checking if you wish to install curses.h... yes
checking for mawk... mawk
checking for egrep... (cached) grep -E
checking for a BSD compatible install... /usr/bin/install -c
checking for tdlint... no
checking for lint... no
checking for alint... no
checking whether ln -s works... yes
checking whether make sets ${MAKE}... yes
checking if filesystem supports mixed-case filenames... yes
checking for ctags... no
checking for etags... no
checking for makeflags variable...
checking for long file names... yes
checking if filesystem supports mixed-case filenames... (cached) yes
checking for ranlib... ranlib
checking for ld... ld
checking for ar... ar
checking for archiver options (symbol AR_OPTS)... rv
checking if you have specified an install-prefix...
checking if you want to build libraries with libtool... no
checking if you want to build shared libraries... yes
checking if you want to build static libraries... yes
checking if you want to build debug libraries... no
checking if you want to build profiling libraries... no
checking for specified models...  shared normal
checking for default model... shared
checking if you want to build a separate terminfo library... no
checking if you want to link with the GPM mouse library... maybe
checking for gpm.h... no
checking for default loader flags...
checking if rpath option should be used... no
checking if release/abi version should be used for shared libs... auto
checking which gcc option to use... -fPIC
checking if you wish to install ncurses overwriting curses... yes
checking if external terminfo-database is used... yes
checking which terminfo source-file will be installed... ${top_srcdir}/misc/terminfo.src
checking whether to use hashed database instead of directory/tree... no
checking for list of fallback descriptions...
checking if you want modern xterm or antique... xterm-new
checking for list of terminfo directories... /tools/share/terminfo
checking for default terminfo directory... /tools/share/terminfo
checking if big-core option selected... yes
checking if you want termcap-fallback support... no
checking if ~/.terminfo is wanted... yes
checking if you want to use restricted environment when running as root... yes
checking for remove... yes
checking for unlink... yes
checking if link/symlink functions work...  link symlink
checking if tic should use symbolic links... no
checking if tic should use hard links... yes
checking if you want broken-linker support code... no
checking if tputs should process BSD-style prefix padding... no
checking if gcc -U and -D options work together... yes
checking if we must define _GNU_SOURCE... yes
checking if SIGWINCH is defined... yes
checking for nl_langinfo and CODESET... yes
checking if you want wide-character code... no
checking whether to enable _LP64 definition in curses.h... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking whether to use struct dirent64... no
checking if you want tparm not to use X/Open fixed-parameter list... yes
checking for type of bool... auto
checking for alternate terminal capabilities file... Caps
checking for type of chtype... auto
checking for type of ospeed... short
checking for type of mmask_t... auto
checking if RCS identifiers should be compiled-in... no
checking format of man-pages...  gzip
checking for manpage renaming... /home/andrew/lfs/sources/ncurses-5.6/man/man_db.renames
checking if manpage aliases will be installed... yes
checking if manpage symlinks should be used... yes
checking for manpage tbl... no
checking if you want to build with function extensions... yes
checking for extended use of const keyword... no
checking if you want $NCURSES_NO_PADDING code... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for signed char... yes
checking size of signed char... 1
checking if you want to use signed Boolean array in term.h... no
checking if you want SIGWINCH handler... yes
checking if you want user-definable terminal capabilities like termcap... yes
checking if you want all development code... no
checking if you want hard-tabs code... no
checking if you want limited support for xmc... no
checking if you do not want to assume colors are white-on-black... yes
checking if you want hashmap scrolling-optimization code... yes
checking if you want colorfgbg code... no
checking if you want to use experimental extended colors... no
checking if you want to use experimental extended mouse encoding... no
checking if you want experimental safe-sprintf code... no
checking if you want experimental wgetch-events code... no
checking if you want to display full commands during build... yes
checking if you want to see compiler warnings...
configure: checking for gcc __attribute__ directives...
... scanf
... printf
... unused
... noreturn
checking if you want to enable runtime assertions... no
checking if you want to use dmalloc for testing... no
checking if you want to use dbmalloc for testing... no
checking if you want to use valgrind for testing... no
checking if you want to perform memory-leak testing... no
checking whether to add trace feature to all models... no
checking for gettimeofday... yes
checking if -lm needed for math functions... yes
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking whether time.h and sys/time.h may both be included... yes
checking for regular-expression headers... regex.h
checking for fcntl.h... yes
checking for getopt.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for poll.h... yes
checking for sys/bsdtypes.h... no
checking for sys/ioctl.h... yes
checking for sys/param.h... yes
checking for sys/poll.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for ttyent.h... yes
checking for unistd.h... (cached) yes
checking for wctype.h... yes
checking if sys/time.h works with sys/select.h... yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for type of chtype... long
checking if unsigned literals are legal... yes
checking if external errno is declared... yes
checking if external errno exists... no
checking if data-only library module links... yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getttynam... yes
checking for issetugid... no
checking for poll... yes
checking for remove... (cached) yes
checking for select... yes
checking for setbuf... yes
checking for setbuffer... yes
checking for setvbuf... yes
checking for sigaction... yes
checking for sigvec... yes
checking for strdup... yes
checking for strstr... yes
checking for tcgetpgrp... yes
checking for times... yes
checking for vsnprintf... yes
checking for isascii... yes
checking whether sigaction needs _POSIX_SOURCE... no
checking if nanosleep really works... yes
checking for termio.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking whether termios.h needs _POSIX_SOURCE... no
checking for tcgetattr... yes
checking for vsscanf function or workaround... vsscanf
checking for working mkstemp... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking for type sigaction_t... no
checking declaration of size-change... yes
checking for memmove... yes
checking if poll really works... yes
checking if we should include stdbool.h... yes
checking for builtin bool type... no
checking whether /tools/bin/g++ understands -c and -o together... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Does this mean that I have no C++ compiler? Because I thought I compiled that in 5.11.1. I tried recompiling GCC as in 5.11.1, incase I made a typo somewhere there, but I still get the same result. I am pretty noob at this, I'm sure I'm doing something wrong.

Oh, and here's the contents of $LFS/tools/bin if that helps...(it seems I've got cpp, but no g++...)
Code:
fs@andrew-desktop:/home/andrew/lfs/sources/ncurses-5.6$ ls /tools/bin -h -l
total 47M
-rwxr-xr-x 1 lfs lfs 2.5M May 14 14:09 addr2line
-rwxr-xr-x 2 lfs lfs 2.6M May 14 14:09 ar
-rwxr-xr-x 2 lfs lfs 3.5M May 14 14:09 as
-rwxr-xr-x 1 lfs lfs 2.5M May 14 14:09 c++filt
-rwxr-xr-x 1 lfs lfs 3.3K May 14 12:48 catchsegv
lrwxrwxrwx 1 lfs lfs    3 May 14 12:16 cc -> gcc
-rwxr-xr-x 1 lfs lfs 303K May 14 12:16 cpp
-rwxr-xr-x 1 lfs lfs 158K May 14 13:11 expect
-rwxr-xr-x 3 lfs lfs 300K May 14 12:16 gcc
-rwxr-xr-x 1 lfs lfs  16K May 14 12:16 gccbug
-rwxr-xr-x 1 lfs lfs  72K May 14 12:16 gcov
-rwxr-xr-x 1 lfs lfs  49K May 14 12:47 gencat
-rwxr-xr-x 1 lfs lfs  31K May 14 12:47 getconf
-rwxr-xr-x 1 lfs lfs  49K May 14 12:48 getent
-rwxr-xr-x 1 lfs lfs 2.8M May 14 14:09 gprof
-rwxr-xr-x 3 lfs lfs 300K May 14 12:16 i686-pc-linux-gnu-gcc
-rwxr-xr-x 3 lfs lfs 300K May 14 12:16 i686-pc-linux-gnu-gcc-4.1.2
-rwxr-xr-x 1 lfs lfs 160K May 14 12:47 iconv
-rwxr-xr-x 2 lfs lfs 3.4M May 14 14:09 ld
-rwxr-xr-x 1 lfs lfs 3.4M May 14 14:10 ld-new
-rwxr-xr-x 2 lfs lfs 3.4M May 14 11:41 ld-old
-rwxr-xr-x 1 lfs lfs 5.7K May 14 12:48 ldd
-rwxr-xr-x 1 lfs lfs  16K May 14 12:48 lddlibc4
-rwxr-xr-x 1 lfs lfs  84K May 14 12:47 locale
-rwxr-xr-x 1 lfs lfs 771K May 14 12:47 localedef
-rwxr-xr-x 1 lfs lfs 6.4K May 14 12:47 mtrace
-rwxr-xr-x 2 lfs lfs 2.5M May 14 14:09 nm
-rwxr-xr-x 2 lfs lfs 3.0M May 14 14:09 objcopy
-rwxr-xr-x 2 lfs lfs 3.3M May 14 14:09 objdump
-rwxr-xr-x 1 lfs lfs  20K May 14 12:48 pcprofiledump
-rwxr-xr-x 2 lfs lfs 2.6M May 14 14:09 ranlib
-rwxr-xr-x 1 lfs lfs 491K May 14 14:09 readelf
-rwxr-xr-x 1 lfs lfs 197K May 14 12:48 rpcgen
-rwxr-xr-x 1 lfs lfs 2.9K May 14 13:12 runtest
-rwxr-xr-x 1 lfs lfs 2.5M May 14 14:09 size
-rwxr-xr-x 1 lfs lfs  57K May 14 12:48 sprof
-rwxr-xr-x 1 lfs lfs 2.5M May 14 14:09 strings
-rwxr-xr-x 2 lfs lfs 3.0M May 14 14:09 strip
lrwxrwxrwx 1 lfs lfs    8 May 14 13:07 tclsh -> tclsh8.4
-rwxr-xr-x 1 lfs lfs 8.7K May 14 13:06 tclsh8.4
-rwxr-xr-x 1 lfs lfs 6.8K May 14 12:47 tzselect
-rwxr-xr-x 1 lfs lfs 5.2K May 14 12:48 xtrace
Thanks for any help, hopefully this makes sense.

Doomed

EDIT: Ah, problem solved. I was accidentally omitting the -k on "make -k check" when compiling gcc. Did "make -k check" then "make install" and ncurses compiled fine. Ah well, these things happen I guess, at least its fixed.

Last edited by Doomed; 05-14-2008 at 02:37 AM.
 
Old 05-26-2008, 06:20 PM   #2
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 93

Rep: Reputation: 20
Okay I did some googling for you.
And I found this in your log:

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no

That indicates you don't have c++ installed.
Just a question: Are you trying to measure SBU's?
If so than you might find my own thread helpful.
I ran into the same problem:
http://www.linuxquestions.org/questi...roblem-360083/.

Also make a dummy.cc file containing: "main() {}"
So the same as a dummy.c but with .cc as prefix.
Compile it with "gcc -v dummy.cc".
If that fails than it's really obvious some went wrong installing C++.
 
Old 05-27-2008, 07:39 AM   #3
Doomed
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Ah, that would've been helpful when I was having the problem, all my searches were for ncurses failing compiling, not to do with gcc.

You're right though, it was my error compiling GCC, although I wasn't trying to measure SBUs. I didn't add the "-k" argument when running the testsuite for gcc, which led to g++ not installing.
I didn't think of making a dummy.cc file though, that probably would've helped identify the problem quicker.

I guess is shows that I need to pay more attention to each command I'm typing!
Thanks for your help, I'm actually now working on a CLFS distro for x86_64, that I can run off my pendrive. I'm think I'm actually around the same spot with that, having just compiled ncurses. I guess I'll see how that goes, hopefully won't be back with more problems!

Thanks again

Doomed
 
  


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 Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 01:31 AM
LFS 6.0 Chapter 6: compiling glibc problem Sakur Linux From Scratch 3 08-14-2005 12:39 AM
Help! LFS 6.1 Chapter 6.12- Basic Compiling and Linking Tools don't work! TGWDNGHN Linux From Scratch 2 07-26-2005 07:25 PM
LFS 6-1: Glibc Test Suite Fails at end with 2 errors in Chapter 6 TGWDNGHN Linux From Scratch 1 07-26-2005 01:23 PM
Error compiling ncurses in lfs 6.0 Drunkalot Linux From Scratch 2 12-26-2004 12:21 AM


All times are GMT -5. The time now is 11:54 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