Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
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.


  Search this Thread
Old 01-25-2007, 11:34 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 22

Rep: Reputation: 15
HLFS glibc-2.5 and ssp

I'm trying to at least get started on the development HLFS since the original link for the old version has been broken for awhile. I get stuck on Chapter 5.9 The Cocoon Toolchain. Since the mailing list won't accept my posts, I thought I'd try here.

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 "TARGET_LIBC_PROVIDES_SSP not defined"

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.
Old 01-26-2007, 10:24 AM   #2
LQ Newbie
Registered: Jan 2007
Posts: 22

Original Poster
Rep: Reputation: 15
Got the mailing list to work, but an update on my attempt at building HLFS.

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?
Old 01-29-2007, 01:56 PM   #3
LQ Newbie
Registered: Jan 2007
Posts: 22

Original Poster
Rep: Reputation: 15

I'm trying a new approach. I can't get the whole toolchain to build at once
after it's installed no matter what I try. It seems to mess up the
linking. I'm trying to follow the seperate build instructions just using
the newer gcc and binutils. Then I noticed the gcc build instructions
say it needs gmp and mpfr. It may not be absolutely needed, but it does
get rid of the error in the configure stage.


That seems to work. I followed the package and build oder of
SVN-20060510 and just used most of the configure options and extra fixes
from SVN-20061205. I'm now in the chroot environment and working on
Chapter 6 without problems so far. I did have to add gmp and mpfr prior
to anything else.


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
problem installing glibc-2.3.2-4.80.i686, glibc-common-2.3.2-4.80.8.i386.rpm martianpackets Red Hat 8 05-01-2009 03:22 PM
HLFS: sed-4.1.4 & uClibc-0.9.28, Memory Exhausted. Yerp Linux From Scratch 1 01-05-2006 02:26 PM
OpenBSD vs Linux+PaX+SSP+RSBAC jakaro *BSD 3 06-23-2005 07:05 PM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
hlfs iso? irq13 Linux From Scratch 0 03-08-2004 05:24 PM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration