Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

bootstrap.sh on Hardened install fails, problem with CFLAGS?

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
seifn06
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 90
Joined: Sun Sep 19, 2004 5:39 am
Location: Lowell, Michigan

bootstrap.sh on Hardened install fails, problem with CFLAGS?

  • Quote

Post by seifn06 » Wed Jul 20, 2005 10:44 pm

...Context of problem...
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 failed
Checking `config.log' I see the following:

Code: 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 77
I generated my own C and C++ programs (a couple "Hello, World"s) and tried to compile with the following commands:

Code: Select all

# gcc test.c
# ./a.out
Hello, world!
# g++ test.cpp
bash: g++: command not found
I noted also that 'find / -name g++' did not find g++ on my box at this point in the installation though gcc is:

Code: Select all

# find / -name gcc
/etc/env.d/gcc
/usr/bin/gcc
/usr/i386-pc-linux-gnu/gcc-bin/gcc
/usr/portage/sys-devel/gcc
...My attempts to resolve problem and continue boostrapping include the following...
After 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 tried using binutils as suggested on the threads mentioned above though I couldn't compile the program on my system (emerge errored out while compiling the sys-libs/ncurses-5.4-r6 complaining about the lack of c++).

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"
The various commented-out lines represent different attempts I made at getting the bootstrap script to work.

...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!
Top
dbasetrinity
Apprentice
Apprentice
User avatar
Posts: 167
Joined: Sat Jun 25, 2005 12:33 pm

  • Quote

Post by dbasetrinity » Wed Aug 03, 2005 2:30 am

hi

no expert here for sure however i have read that -03 can cause problems when compiling from a stage1, and have experiance such

i would try changing

Code: Select all

CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer
to

Code: Select all

 CFLAGS="-march=pentium4 -02 -pipe --fomit-frame-pointer"
then try running scripts/bootstrap.sh again....
Top
dbasetrinity
Apprentice
Apprentice
User avatar
Posts: 167
Joined: Sat Jun 25, 2005 12:33 pm

  • Quote

Post by dbasetrinity » Wed Aug 03, 2005 2:43 am

hi

no expert here for sure however i have read that -03 can cause problems when compiling and have experiance such

i would try changing

Code: Select all

CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer
to

Code: Select all

 CFLAGS="-march=pentium4 -02 -pipe --fomit-frame-pointer"
then try running scripts/bootstrap.sh again....gcc 3.4.3 is the newest version and its still in testing phase...however if you use that you must add it to

Code: Select all

/etc/portage/package.keywords
However if your looking for more info getting gcc3.4.3 and glibc2.3.5 without having to use a stage1 install you could try a 1/3 install which is like doing a stage1 but on a stage3
heres a link just incase http://forums.gentoo.org/viewtopic-t-319349.html
Top
Post Reply

3 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic