LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04: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, 02:29 AM   #2
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
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, 02: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:07 PM.

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
Open Source Consulting | Domain Registration