LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-15-2006, 11:57 AM   #1
cruiseoveride
LQ Newbie
 
Registered: Dec 2004
Location: Gaborone, Botswana, Southern Africa
Distribution: Fedora, RedHat Enterprise
Posts: 9

Rep: Reputation: 0
Unhappy LFS - 5.4. GCC-3.4.3 - Pass 1 - Failed


../gcc-3.4.3/configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
target-libstdc++-v3 target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
(Any other directories should still work fine.)
/tools/bin/ld:/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libc.so: file format not recognized; treating as linker script
/tools/bin/ld:/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libc.so:5: syntax error
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

wats going on?
here is the output from the "set" command
set
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="1" [2]="7" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='3.1.7(1)-release'
COLORS=/etc/DIR_COLORS.xterm
COLUMNS=118
CVS_RSH=ssh
DIRSTACK=()
DISPLAY=:0.0
EUID=505
GROUPS=()
G_BROKEN_FILENAMES=1
HISTFILE=/home/lfs/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/home/lfs
HOSTNAME=kamal
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LC_ALL=POSIX
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LFS=/mnt/lfs
LINES=26
LOGNAME=lfs
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi =01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=0 0;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.g z=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/lfs
MAILCHECK=60
OLDPWD=/home/lfs/build
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/tools/bin:/bin:/usr/bin:/home/lfs/bin
PIPESTATUS=([0]="1")
PPID=15400
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '
PWD=/home/lfs/build/gcc-build
QTDIR=/usr/lib/qt-3.3
QTINC=/usr/lib/qt-3.3/include
QTLIB=/usr/lib/qt-3.3/lib
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:histexpand:interactive-comments:monitor
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SUPPORTED=en_US.UTF-8:en_US:en
TERM=xterm
UID=505
USER=lfs
XAUTHORITY=/home/lfs/.xauthVboCFd
_=--enable-languages=c


I really wanna get this working, please help me.
 
Old 05-15-2006, 01:29 PM   #2
cruiseoveride
LQ Newbie
 
Registered: Dec 2004
Location: Gaborone, Botswana, Southern Africa
Distribution: Fedora, RedHat Enterprise
Posts: 9

Original Poster
Rep: Reputation: 0
it seems to work fine as root
 
Old 05-15-2006, 01:48 PM   #3
cruiseoveride
LQ Newbie
 
Registered: Dec 2004
Location: Gaborone, Botswana, Southern Africa
Distribution: Fedora, RedHat Enterprise
Posts: 9

Original Poster
Rep: Reputation: 0
Building as root gives me this error when i make bootstrap

./xgcc -B./ -B/tools/i686-pc-linux-gnu/bin/ -isystem /tools/i686-pc-linux-gnu/include -isystem /tools/i686-pc-linux-gnu/sys-include -L/home/lfs/build/gcc-build/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o libgcc_s.so.1.tmp libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-glibc.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o -lc && rm -f libgcc_s.so && if [ -f libgcc_s.so.1 ]; then mv -f libgcc_s.so.1 libgcc_s.so.1.`basename `; else true; fi && mv libgcc_s.so.1.tmp libgcc_s.so.1 && ln -s libgcc_s.so.1 libgcc_s.so
/tools/i686-pc-linux-gnu/bin/ld:/usr/lib/libc.so: file format not recognized; treating as linker script
/tools/i686-pc-linux-gnu/bin/ld:/usr/lib/libc.so:5: syntax error
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/home/lfs/build/gcc-build/gcc'
make[2]: *** [libgcc.a] Error 2
make[2]: Leaving directory `/home/lfs/build/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/home/lfs/build/gcc-build/gcc'
make: *** [bootstrap] Error 2

help
 
Old 05-16-2006, 01:30 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by cruiseoveride
/tools/bin/ld:/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libc.so: file format not recognized; treating as linker script
/tools/bin/ld:/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libc.so:5: syntax error
collect2: ld returned 1 exit status
libc.so.5 is too old. You'll need to install a distro which uses libc.so.6 if you want to install LFS. See http://www.linuxfromscratch.org/lfs/.../hostreqs.html
 
Old 05-16-2006, 03:26 PM   #5
linuxcbon
Member
 
Registered: May 2006
Posts: 56

Rep: Reputation: 16
Your are installing from redhat, so your gcc and libc versions may be incompatible.
I recommend you to install LFS from live cd (I tried it but it takes too much time).
ftp://ftp.osuosl.org/pub/lfs-livecd/

Be carefull : LFS guide is not for live cd installation... (so you need to use correct directories like /lfs-sources/ etc.)
 
Old 05-16-2006, 05:33 PM   #6
cruiseoveride
LQ Newbie
 
Registered: Dec 2004
Location: Gaborone, Botswana, Southern Africa
Distribution: Fedora, RedHat Enterprise
Posts: 9

Original Poster
Rep: Reputation: 0
I am using FC5, and i gave up on fixing the host, have put the livcd onto VMware and doing it, thanks for the response anyways.
 
Old 06-25-2006, 05:10 AM   #7
zefox
LQ Newbie
 
Registered: May 2006
Location: Belgium
Distribution: SuSe on Desktop, SlackWare and CentOS on Servers
Posts: 3

Rep: Reputation: 0
libc.so:5 : syntax error means that the script /usr/lib/libc.so is wrong at line 5.
Just log in as root and temporarily change the line 5 from
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 )
to
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

Don't forget to set it back to the original form when you stop working on the LFS.

Hopes it helps. It did solve the problem for me.

---------
 
Old 06-07-2007, 10:34 PM   #8
beatles1823
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by zefox
libc.so:5 : syntax error means that the script /usr/lib/libc.so is wrong at line 5.
Just log in as root and temporarily change the line 5 from
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 )
to
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

Don't forget to set it back to the original form when you stop working on the LFS.

Hopes it helps. It did solve the problem for me.

---------
It did fix my problem ,too.

Thanks a lot.
 
  


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-5.0 GCC problem with binutils-2.14 pass 1 NCappaZoo Linux From Scratch 6 06-14-2009 03:47 AM
questions on GCC-3.4.3 - Pass 2 and Binutils-2.15.94.0.2.2 - Pass 2 satimis Linux From Scratch 7 12-26-2005 09:23 PM
building Binutils-2.14 pass 1 (LFS 5.1.1) alihamza Linux From Scratch 1 10-10-2005 07:37 AM
Error Compiling GCC (1st Pass) in LFS 6.0 TGWDNGHN Linux From Scratch 1 06-30-2005 08:57 PM
LFS 5.1.1: another problem after binutils pass 2 7.e.Q Linux From Scratch 1 07-12-2004 04:37 AM

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

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