LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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, 02:24 PM   #1
behmjoe
Member
 
Registered: Mar 2005
Posts: 80

Rep: Reputation: 15
hardened linux from scratch glibc build hardened-specs.sh problem


Hi,

When i reach chapter 5.12 gcc-3.4.4 I have problems one i run the hardened-specs.sh script. I breaks the toolchain. has anyone else had this problem it can't seem to find the dynamic linker when i try to build the next package. Also the tests in that chapter don't work. By the way i am building from a knoppix live cd.
 
Old 09-04-2005, 03:03 PM   #2
behmjoe
Member
 
Registered: Mar 2005
Posts: 80

Original Poster
Rep: Reputation: 15
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU Awk configure 3.1.4, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure --prefix=/tools

## --------- ##
## Platform. ##
## --------- ##

hostname = Knoppix
uname -m = i686
uname -r = 2.6.11
uname -s = Linux
uname -v = #2 SMP Thu May 26 20:53:11 CEST 2005

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /tools/bin
PATH: /bin
PATH: /usr/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1388: checking for a BSD-compatible install
configure:1443: result: ./install-sh -c
configure:1454: checking whether build environment is sane
configure:1497: result: yes
configure:1554: checking for gawk
configure:1570: found /usr/bin/gawk
configure:1580: result: gawk
configure:1590: checking whether make sets $(MAKE)
configure:1610: result: yes
configure:1829: checking for egrep
configure:1839: result: grep -E
configure:1848: checking for bison
configure:1864: found /usr/bin/bison
configure:1874: result: bison -y
configure:1885: checking whether ln -s works
configure:1889: result: yes
configure:1942: checking for gcc
configure:1958: found /tools/bin/gcc
configure:1968: result: gcc
configure:2212: checking for C compiler version
configure:2215: gcc --version </dev/null >&5
gcc (GCC) 3.4.4 (ssp)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2218: $? = 0
configure:2220: gcc -v </dev/null >&5
Reading specs from /mnt/hlfs/tools/bin/../lib/gcc/i686-tools-linux-gnu/3.4.4/specs
Configured with: ../gcc-3.4.4/configure --prefix=/tools --host=i686-tools-linux-gnu --build=i686-tools-linux-gnu --target=i686-tools-linux-gnu --libexecdir=/tools/lib --with-local-prefix=/tools --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --enable-clocale --with-dynamic-linker=/tools/lib/ld-linux.so.2 --with-nostdinc --enable-multilib=no
Thread model: posix
gcc version 3.4.4 (ssp)
configure:2223: $? = 0
configure:2225: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2228: $? = 1
configure:2251: checking for C compiler default output file name
configure:2254: gcc conftest.c >&5
/mnt/hlfs/tools/bin/../lib/gcc/i686-tools-linux-gnu/3.4.4/../../../../i686-tools-linux-gnu/bin/ld: 1003: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2257: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU Awk"
| #define PACKAGE_TARNAME "gawk"
| #define PACKAGE_VERSION "3.1.4"
| #define PACKAGE_STRING "GNU Awk 3.1.4"
| #define PACKAGE_BUGREPORT "bug-gawk@gnu.org"
| #define PACKAGE "gawk"
| #define VERSION "3.1.4"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2296: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_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=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_AWK=gawk
ac_cv_prog_YACC='bison -y'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_egrep='grep -E'
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run aclocal-1.8'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run tar'
ANSI2KNR=''
AUTOCONF='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run autoconf'
AUTOHEADER='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run autoheader'
AUTOMAKE='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run automake-1.8'
AWK='gawk'
BUILD_INCLUDED_LIBINTL=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DATADIRNAME=''
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
GENCAT=''
GLIBC21=''
GMSGFMT=''
HAVE_ASPRINTF=''
HAVE_POSIX_PRINTF=''
HAVE_SNPRINTF=''
HAVE_WPRINTF=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
LDFLAGS=''
LIBICONV=''
LIBINTL=''
LIBOBJS=''
LIBS=''
LN_S='ln -s'
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /mnt/hlfs/sources/gawk-3.1.4/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
MSGMERGE=''
OBJEXT=''
PACKAGE='gawk'
PACKAGE_BUGREPORT='bug-gawk@gnu.org'
PACKAGE_NAME='GNU Awk'
PACKAGE_STRING='GNU Awk 3.1.4'
PACKAGE_TARNAME='gawk'
PACKAGE_VERSION='3.1.4'
PATH_SEPARATOR=':'
POSUB=''
RANLIB=''
SET_MAKE=''
SHELL='/bin/sh'
SOCKET_LIBS=''
STRIP=''
U=''
USE_INCLUDED_LIBINTL=''
USE_NLS=''
VERSION='3.1.4'
XGETTEXT=''
YACC='bison -y'
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/mnt/hlfs/sources/gawk-3.1.4/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p -- .'
oldincludedir='/usr/include'
prefix='/tools'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE "gawk"
#define PACKAGE_BUGREPORT "bug-gawk@gnu.org"
#define PACKAGE_NAME "GNU Awk"
#define PACKAGE_STRING "GNU Awk 3.1.4"
#define PACKAGE_TARNAME "gawk"
#define PACKAGE_VERSION "3.1.4"
#define VERSION "3.1.4"

configure: exit 77



This is the config.log file from gawk-3.1.4. This should help you understand my problem
 
Old 09-04-2005, 03:06 PM   #3
behmjoe
Member
 
Registered: Mar 2005
Posts: 80

Original Poster
Rep: Reputation: 15
#!/bin/sh
perl -pi -e 's@\*cc1:\n@$_%(cc1_ssp) @;' \
$(gcc --print-file specs) &&
perl -pi -e 's@\*cc1plus:\n@$_%(cc1_ssp) @;' \
$(gcc --print-file specs) &&
echo '*cc1_ssp:
%{!fno-stack-protector*: -fstack-protector-all}
' >> $(gcc --print-file specs)
perl -pi -e 's@\*cc1:\n@$_%(cc1_pie) @;' \
$(gcc --print-file specs) &&
perl -pi -e 's@\*cc1plus;\n@$_%(cc1_pie) @;' \
$(gcc --print-file specs) &&
perl -pi -e 's@%{pie:-pie}@$(link_pie)@;' \
$(gcc --print-file specs) &&
perl -pi -e 's@pie:@!no-pie|pie:@g;' $(gcc --print-file specs) &&
perl -pi -e 's@\*cpp:\n@$_%(cpp_pie) @;' $(gcc --print-file specs) &&
echo '*cc1_pie:
%{!static:%{!no-pie:%{pie: -D__PIC__ -DPIC}}}
' >> $(gcc --print-file specs) &&
echo '*cc1_pie:
%{!static:%{!no-pie:%{!pie: -fPIC}}}
' >> $(gcc --print-file specs) &&
echo '*link_pie:
%{pie:-pie}%{!no-pie:%{!static:%{!Bstatic:%{!i:%{!r: %{!nonow: -z now} %{norelro: -z relro} %{!shared:%{!Bshareable:%{!pie: -pie}}}}}}}}
' >> $(gcc --print-file specs)




This is a copy of my hardened-specs.sh file.
 
  


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
Secure Linux Distro Hardened for Server Operation colline Linux - Security 3 05-13-2005 08:04 PM
linux from scratch build with linux-2.6.11 and my pktsetup problem! behmjoe Linux - Software 8 04-02-2005 04:32 AM
problems finilazing a gentoo hardened instaliation Snerkel Linux - Distributions 3 01-17-2005 08:09 PM
AHLFS (Automated Hardened LFS) Profile for nALFS - See progress reports here... bisailb Linux From Scratch 2 09-28-2004 02:13 PM
Hardened Distribution Obie Linux - Security 6 05-30-2004 11:55 PM


All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
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