I'm trying to do a fresh install of Hardened Gentoo from a stage 1 tarball (stage1-x86-selinux-pie-ssp-20041123.tar.bz2) obtained from a Gentoo mirror. I have a Pentium 4 CPU and am using the most recent stable Hardened/SELinux livecd.
...Problem...
Installation goes well until I try to bootstrap the system. scripts/bootstrap.sh fails early on in execution when it attempts to compile Python:
Code: Select all
checking for c++... g++
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
!!! ERROR: dev-lang/python-2.3.5 failed.
!!! Function econf, Line 449, Exitcode 77
!!! econf failedCode: Select all
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 2.3, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/usr --host=i386-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-fpectl --enable-shared --disable-ipv6 --infodir=${prefix}/share/info --mandir=${prefix}/share/man --with-threads --with-libc= --enable-unicode=ucs4
## --------- ##
## Platform. ##
## --------- ##
hostname = livecd
uname -m = i686
uname -r = 2.6.5-gentoo-r1
uname -s = Linux
uname -v = #1 Fri Jun 18 20:05:43 UTC 2004
/usr/bin/uname -p = Intel(R) Pentium(R) 4 CPU 2.00GHz
/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: /sbin
PATH: /usr/sbin
PATH: /usr/lib/portage/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/bin
PATH: /opt/bin
PATH: /usr/i386-pc-linux-gnu/gcc-bin/3.3
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1443: checking MACHDEP
configure:1552: result: linux2
configure:1558: checking EXTRAPLATDIR
configure:1573: result:
configure:1592: checking for --without-gcc
configure:1641: result: no
configure:1647: checking for --with-cxx=<compiler>
configure:1668: result: no
configure:1687: checking for c++
configure:1713: result: g++
configure:1753: checking for C++ compiler default output file name
configure:1756: g++ conftest.cc >&5
./configure: line 1: g++: command not found
configure:1759: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _XOPEN_SOURCE 600
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:1798: error: C++ compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=set
ac_cv_env_CC_value=gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i386-pc-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_CXX=g++
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
BASECFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='gcc'
CCSHARED=''
CFLAGS=''
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=''--prefix=/usr' '--host=i386-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-fpectl' '--enable-shared' '--disable-ipv6' '--infodir=${prefix}/share/info' '--mandir=${prefix}/share/man' '--with-threads' '--with-libc=' '--enable-unicode=ucs4' 'CC=gcc' 'CFLAGS=' 'host_alias=i386-pc-linux-gnu''
CPP=''
CPPFLAGS=''
CXX='g++'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDFLAGS=''
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LN=''
LTLIBOBJS=''
MACHDEP='linux2'
MACHDEP_OBJS=''
MAINOBJ='python.o'
OBJEXT=''
OPT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.3'
PACKAGE_TARNAME='python'
PACKAGE_VERSION='2.3'
PATH_SEPARATOR=':'
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.3'
ac_ct_CC=''
ac_ct_RANLIB=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='/usr/share'
exec_prefix='NONE'
host_alias='i386-pc-linux-gnu'
includedir='${prefix}/include'
infodir='${prefix}/share/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='/var/lib'
mandir='${prefix}/share/man'
oldincludedir='/usr/include'
prefix='/usr'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define _BSD_TYPES 1
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600
#define _XOPEN_SOURCE_EXTENDED 1
#define __BSD_VISIBLE 1
configure: exit 77Code: Select all
# gcc test.c
# ./a.out
Hello, world!
# g++ test.cpp
bash: g++: command not foundCode: Select all
# find / -name gcc
/etc/env.d/gcc
/usr/bin/gcc
/usr/i386-pc-linux-gnu/gcc-bin/gcc
/usr/portage/sys-devel/gccAfter fiddling with the CFLAGS in my make.conf file and checking the output of gcc-config several times, I tried starting the installation over. I rebooted with the livecd and started from square 1 with the Hardened/SELinux handbook...
I also tried emerging sys-devel/gcc which failed spitting out an error reminiscent of the error I got when I tried to compile Python regarding its inability to generate C++ executables. (This seemed like a circular dependency to me since I thought g++ was simply an alias for gcc - but I'm not sure).
I also checked and rechecked spelling, and tweaked my make.conf file a number of times following various bits of advice listed in this thread (http://forums.gentoo.org/viewtopic-t-294109.html) and this thread (http://forums.gentoo.org/viewtopic-t-27 ... rt-75.html) to no avail.
Note that on my system:
Code: Select all
# gcc-config -c
i386-pc-linux-gnu-3.3.4
# gcc-config -l
[1] i386-pc-linux-gnu-3.3.4 *I'm not sure what's causing the bootstrap script to fail since I used the same livecd and tarball to install Hardened Gentoo on another system a couple of weeks ago.
BTW, this is my /etc/make.conf:
Code: Select all
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
#CFLAGS="-O2 -mcpu=i386 -fomit-frame-pointer"
#CHOST="i386-pc-linux-gnu"
#CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"
#CFLAGS="-O2 -mtune=i686 -fomit-frame-pointer"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="pic hardened acl alsa bash-completion fbcon imap innodb javascript maildir milter mime mp3 php sockets tokenizer x86"...Questions...
(1) Would someone mind offering any pointers/references/tips as to how I get g++ "installed" on this system?
(2) Or can someone spot any errors in my make.conf file (perhaps with the CFLAGS variable?) that I missed that might be causing the bootstrap script to fail?
(3) Has anyone else tried to install the Hardened Gentoo OS and had the bootstrap script barf too? If so, what did you do to resolve the problem?
(4) Out of curiosity, was there a new version of GCC or Portage or something released in the last week or two? (I ask because as mentioned before, I used the same LiveCD and stage 1 [hardened] tarball with the same (initially) make.conf settings and installed the OS without any of these problems...)
Thanks in advance for any help!

