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-13-2004, 05:58 PM   #1
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Rep: Reputation: 15
Question Error cross-compiling glibc, chapter 5


At "make AUTOCONF=no" for Glibc-2.3.3, in Chapter 5, LFS 5.1.1, i get the error:

Code:
In file included from ../include/libc-symbols.h:56,
                 from <command line>:6:
/mnt/lfs/sources/glibc-build/config.h:3:3: #error "glibc cannot be compiled without optimization"
make[2]: *** [/mnt/lfs/sources/glibc-build/tcb-offsets.h] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.3.3-lfs-5.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.3.3-lfs-5.1'
make: *** [all] Error 2
lfs:/mnt/lfs/sources/glibc-build$
Im following the book, apart from using the cross-compiling hint (http://archive.daniel-baumann.ch/lin...-x86-5.1-1.txt)

The output of env is:

Code:
TERM=xterm
LC_ALL=POSIX
LFS=/mnt/lfs
CXXFLAGS=-march=pentium
PATH=/tools/bin:/bin:/usr/bin
CHOST=i586-pc-linux-gnu
PWD=/mnt/lfs/sources/glibc-build
PS1=\u:\w\$
SHLVL=1
HOME=/home/lfs
CFLAGS=-march=pentium
_=/usr/bin/env
OLDPWD=/mnt/lfs/sources
To configure i used the options as specified in the crosscompiling hint.

How do i cross-compile glibc?

Thanks.
 
Old 09-16-2004, 03:29 AM   #2
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 121

Rep: Reputation: 15
This isn't quite cross-compiling as such, more fooling the build into thinking you are running
on a different processor type (assuming you are using the kernel module).

One thing to note, according to the hint you set CHOST to be your target cpu type
( ie export CHOST="i386" ), not the full target triplet.

For true cross-compilation there are proof-of-concept scripts available under my homedir
for the adventurous, but these aren't for the faint of heart
( http://www.linuxfromscratch.org/~ryan/scripts/cross-lfs )

[R]
 
Old 09-17-2004, 03:12 PM   #3
donbellioni
Member
 
Registered: Mar 2004
Location: UK
Distribution: Slackware 10
Posts: 137

Original Poster
Rep: Reputation: 15
Thanks for the reply. Ill check it out.

Cheers.
 
  


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
LFS 6.0 Chapter 6: compiling glibc problem Sakur Linux From Scratch 3 08-14-2005 12:39 AM
Error in Glibc Chapter-6 LFS ver-6..Help pls?? chakkaradeepcc Linux From Scratch 10 05-23-2005 01:33 PM
glibc-2.3.3 in chapter 6 error znif Linux From Scratch 11 06-28-2004 08:15 AM
Chapter 6 Glibc error in configure MasterC Linux From Scratch 6 07-17-2003 02:17 PM
LFS 3.3 - chapter 6 - glibc error fend88 Linux From Scratch 5 04-29-2002 12:06 AM


All times are GMT -5. The time now is 03:53 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