Toolchain build failures.

Charity charity at
Fri Jan 26 08:12:06 PST 2007

It seems that the hardened specs file is causing the build to fail due 
to a failure in adjusting the toolchain or the host system not having 
some variables defined.

../../cocoon-toolchain/gcc/hardened-specs.h:48:2: error: #error "You are using an unsupported system. This header can not be used."

That is the line of interest. I've found the statement that causes this.

#if defined(__i386__) && defined(__linux__) && defined(__ELF__) \
        && defined(HAVE_LD_PIE) && defined(TARGET_LIBC_PROVIDES_SSP)

So, I broke it down like this..

#if defined(__i386__)
#error "i386 not defined"

#if defined(__linux__)
#error "linux not defined"

#if defined(__ELF__)
#error "ELF not defined"

#if defined(HAVE_LD_PIE)
#error "HAVE_LD_PIE not defined"

#error "TARGET_LIBC_PROVIDES_SSP not defined"

Which results in the following error

In file included from ../../cocoon-toolchain/gcc/gcc.c:553:
../../cocoon-toolchain/gcc/hardened-specs.h:26:2: error: #error 

This is because -fstack-protector is failing. SSP is not built in the 
first gcc build. Support for it is supposed to be built into glibc-2.5, 
however, after some checking, it tells me "cannot find -lssp_nonshared" 
whenever I try to compile something with -fstack-protector. That means 
that gcc supports it, but it is not installed. How can I be sure it is 
installed in glibc? I made sure I am using the newly compiled gcc and 
the linker seems to be the new glibc.

After some more research, it seems that something is going wrong with 
the first gcc build or glibc is not being linked to properly. I know 
HLFS is in development, but the link to the old stable version of the 
book is broken. I'm going to try rebuilding gcc after each step just to 
see if it builds. This should work right? If bootstrapping builds the 
compiler once, uses the first build to build a second and the second to 
build a third for comparison, then the compiler should be able to be 
built after the installation?

More information about the hlfs-dev mailing list