LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-15-2007, 04:36 PM   #1
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Rep: Reputation: 30
New to LFS - All my install problems.


So I am going to build my own LFS system. I get everyting ready, and
am currently right here. I start compiling my first pakage, and I get an erorr:
Code:
[05:31:10][dv5000t>/mnt/lfs/sources/binutils-build]$ ../binutils-2.16.1/configure --prefix=/tools --disable-nls
creating 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
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Will probally have other problems later.
 
Old 01-15-2007, 05:29 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Ubuntu? "C compiler cannot create executables."? This forum has search...
sudo apt-get install build-essentials
 
Old 01-15-2007, 06:50 PM   #3
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
I have build-essentials installed i'm pretty sure. All the programs I install I ./configure make make install them.

Code:
[07:48:27][dv5000t>/mnt/lfs/sources/binutils-build]$ sudo apt-get install build-essentials
[07:48:30][dv5000t>/mnt/lfs/sources/binutils-build]$ ../binutils-2.16.1/configure --prefix=/tools --disable-nls
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
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
[07:48:55][dv5000t>/mnt/lfs/sources/binutils-build]$
Why wouldn't gcc work? I have used gcc before when I program in C.
 
Old 01-15-2007, 07:13 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, what is in config.log?
 
Old 01-15-2007, 07:30 PM   #5
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1809: checking for gcc
configure:1922: checking whether the C compiler (gcc  ) works
configure:1938: gcc -o conftest    conftest.c  1>&5
collect2: cannot find 'ld'
configure: failed program was:

#line 1933 "configure"
#include "confdefs.h"

main(){return(0);}
 
Old 01-16-2007, 03:28 PM   #6
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225

Rep: Reputation: 31
Did you run the host system requirements script from the prologue? This is from stable 6.2. It provides all the host system requirements.

Code:
cat > version-check.sh << "EOF"
#!/bin/bash

# Simple script to list version numbers of critical development tools

bash --version | head -n1 | cut -d" " -f2-4
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-4
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
gawk --version | head -n1
gcc --version | head -n1
/lib/libc.so.6 | head -n1 | cut -d" " -f1-7
grep --version | head -n1
gzip --version | head -n1
cat /proc/version | head -n1 | cut -d" " -f1-3,5-7
make --version | head -n1
patch --version | head -n1
sed --version | head -n1
tar --version | head -n1

EOF

bash version-check.sh
Good Luck
 
Old 01-16-2007, 03:43 PM   #7
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Code:
system.sh: line 11: gawk: command not found
I guess I'll have to install gawk. I checked man gawk too, that didn't work.
 
Old 01-16-2007, 05:17 PM   #8
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
I have a similar problem on Debian. If I install gawk and purge mawk the problem seems to go away.
 
Old 01-17-2007, 10:50 AM   #9
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225

Rep: Reputation: 31
Cool, let us know the outcome! This is good information to have in this forum!
 
Old 01-18-2007, 02:28 PM   #10
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Ahh same problem, even though I just sucessfully installed gawk 3.0.2, and checked man gawk, and it worked fine.

I have everything else up to date:
Code:
bash, version 3.1.17(1)-release
Binutils: version 2.16.91
bzip2,  Version 1.0.3, 15-Feb-2005.
Coreutils:  5.93
diff (GNU diffutils) 2.8.1
GNU find version 4.2.27
GNU Awk 3.0.3
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
GNU C Library stable release version 2.3.6,
grep (GNU grep) 2.5.1
gzip 1.3.5
Linux version 2.6.15-26-386 (gcc version 4.0.3
GNU Make 3.81beta4
patch 2.5.9
GNU sed version 4.1.4
tar (GNU tar) 1.15.1
Well, doesn't seem like anything is wrong.
 
Old 01-18-2007, 03:35 PM   #11
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Quote:
collect2: cannot find 'ld'
Hmm didn't see that. That is a bit worrying. OK first find out where your ld is.

Code:
which ld
Then I suppose you could try

Code:
LD=/usr/bin/ld ./configure --blah-1 ...
Replace /usr/bin/ld with whereever yours is. Might work I suppose...
 
Old 01-18-2007, 06:49 PM   #12
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Code:
[07:47:44][dv5000t>/mnt/lfs/sources/binutils-build]$ LD=/usr/bin/ld ../binutils-2.16.1/configure --prefix=/tools --disable-nls
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
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
mine was /usr/bin/ld here is the output:
Code:
[07:47:04][dv5000t>~]$ which ld
/usr/bin/ld
hmm...

Thanks so far.
 
Old 01-18-2007, 07:53 PM   #13
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Found something, some guy exactly the same problem. Try putting a copy of ld (renamed as real-ld) in the first directory given by:

Code:
gcc -print-search-dirs
Kind of a long shot .. but hey
 
Old 01-19-2007, 08:01 PM   #14
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Code:
[08:58:28][dv5000t>/usr/bin]$ gcc -print-search-dirs
install: /usr/lib/gcc/i486-linux-gnu/4.0.3/
programs: =/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/libexec/gcc/i486-linux-gnu/4.0.3/:/usr/libexec/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/bin/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/bin/
libraries: =/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../i486-linux-gnu/4.0.3/:/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../:/lib/i486-linux-gnu/4.0.3/:/lib/:/usr/lib/i486-linux-gnu/4.0.3/:/usr/lib/
So I:
Code:
[08:58:49][dv5000t>/usr/bin]$ sudo cp ld /usr/lib/gcc/i486-linux-gnu/4.0.3/
And I get:
Code:
[09:00:19][dv5000t>/mnt/lfs/sources/binutils-build]$ ../binutils-2.16.1/configur                                                                                      
e --prefix=/tools --disable-nls
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
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot creat                                                                                      
e executables.
The same as before.

Thanks for your input
 
Old 01-20-2007, 12:12 AM   #15
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Brute force: run
Code:
strace -o log ../binutils-2.16.1/configure --prefix=/tools --disable-nls
and post strace log.
 
  


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
Having problems with LFS LiveCD threekgtvr4 Linux From Scratch 4 04-29-2006 12:56 AM
LFS 6.1 - Tricks and problems satimis Linux From Scratch 5 07-20-2005 08:58 AM
Install LFS? guygriffiths Linux From Scratch 16 10-16-2003 08:25 AM
Problems with XawTV on new LFS Electrode Linux From Scratch 0 09-15-2003 05:50 PM
LFS Problems RecoilUK Linux - Software 1 12-22-2001 03:51 PM

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

All times are GMT -5. The time now is 03:54 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
Open Source Consulting | Domain Registration