LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-13-2010, 06:58 AM   #1
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Rep: Reputation: 0
Question "C compiler cannot create executables" error message when preparing binutils for buil


All,

I am Using LFS 6.5 on host system Kubuntu 8.04 (fully up to date). My machine is an aging Tosh A30 Satellite 2.4 GHz with 1.5GB RAM.

When I run version-check.sh I get:

lfs@phoenix:/mnt/lfs/sources/binutils-build$ bash version-check.sh
bash, version 3.2.39(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.18.0.20080103
bison (GNU Bison) 2.3
yacc not found
bzip2, Version 1.0.4, 20-Dec-2006.
Coreutils: 6.10
diff (GNU diffutils) 2.8.1
GNU find version 4.2.32
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
GNU C Library stable release version 2.7,
GNU grep 2.5.3
gzip 1.3.12
Linux version 2.6.24-27-generic (buildd@vernadsky) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)) #1 SMP Wed Jan 27 23:54:28 UTC 2010
m4 (GNU M4) 1.4.10
GNU Make 3.81
patch 2.5.9
Perl version='5.8.8';
GNU sed version 4.1.5
tar (GNU tar) 1.19
makeinfo (GNU texinfo) 4.11
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
Compilation failed
lfs@phoenix:/mnt/lfs/sources/binutils-build$


This seems ok.

My problem is that when I am in directory binutils-build, and I run

../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror


I get the following:

checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-lfs-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 for C compiler default output file name... configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: C compiler cannot create executables
See `config.log' for more details.


All the host system packages seem to be there (and be the correct versions) so I don't understand the error.

All help appreciated.

TIA

jackplug
 
Old 03-13-2010, 07:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Originally Posted by jackplughd View Post
.......
tar (GNU tar) 1.19
makeinfo (GNU texinfo) 4.11
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
Compilation failed

lfs@phoenix:/mnt/lfs/sources/binutils-build$

This seems ok.
And I say this is not ok.

Quote:
All the host system packages seem to be there (and be the correct versions)
No, they are not. Gcc seems to be missing.

Please read the output of commands carefully and try to find out what is wrong when an error occurs.
 
Old 03-13-2010, 08:20 AM   #3
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Original Poster
Rep: Reputation: 0
druuna,

how can gcc be missing when it is listed as version 4.2.4 half way up the list?

jackplug
 
Old 03-13-2010, 08:54 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
I now see that the section I highlighted is not the only things thats wrong.....

Quote:
bash, version 3.2.39(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.18.0.20080103
bison (GNU Bison) 2.3
yacc not found
bzip2, Version 1.0.4, 20-Dec-2006.
Coreutils: 6.10
diff (GNU diffutils) 2.8.1
GNU find version 4.2.32
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
GNU C Library stable release version 2.7,
GNU grep 2.5.3
gzip 1.3.12
Linux version 2.6.24-27-generic (buildd@vernadsky) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)) #1 SMP Wed Jan 27 23:54:28 UTC 2010
m4 (GNU M4) 1.4.10
GNU Make 3.81
patch 2.5.9
Perl version='5.8.8';
GNU sed version 4.1.5
tar (GNU tar) 1.19
makeinfo (GNU texinfo) 4.11
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status

Compilation failed
- blue lines -> might cause problems,
- red lines -> will cause problems,
- difference that are not mentioned: will not cause problems (although you cannot be 100% sure...).

If you want to successfully build a LFS system you need to be precise.

I would suggest using the LFS liveCD instead of up/downgrading your host, if you do want to use your current host: Check the Prerequisites again and fix the Host System Requirements.

Hope this helps.
 
Old 03-13-2010, 09:06 AM   #5
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

one more thing to add is, that if you use the liveCD then do not use the sources of the liveCD. They are the sources of the 6.3 book and might not be 100% suitable for a 6.5 build.
 
Old 03-13-2010, 10:00 AM   #6
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Original Poster
Rep: Reputation: 0
druuna,

Thanks for the help. Unfortunately I am no more enlightened than I was before.

In the LFS 6.,5 book it states that "Your host system should have the following software with the minimum versions indicated.

So as far as I can see the problems you indicate in my host system list should all be ok except for yacc (which is not even mentioned in the minimum requirements list). Also as far as my kernel is concerned, it fulfils the minimum requirement as far as I can see.

I think that I am out of my depth here, but am going to persevere anyway.

regards

jackplug
 
Old 03-13-2010, 10:05 AM   #7
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by jackplughd View Post
druuna,

Thanks for the help. Unfortunately I am no more enlightened than I was before.

In the LFS 6.,5 book it states that "Your host system should have the following software with the minimum versions indicated.

So as far as I can see the problems you indicate in my host system list should all be ok except for yacc (which is not even mentioned in the minimum requirements list). Also as far as my kernel is concerned, it fulfils the minimum requirement as far as I can see.

I think that I am out of my depth here, but am going to persevere anyway.

regards

jackplug
One issue - which is also addressed in the book - is
Code:
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
This means that the original source might have been modified by Ubuntu.
 
Old 03-13-2010, 10:13 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

@jackplughd: If you only read the first sentence of a page and ignore/skip over other parts you will never be able to get ahead with building a LFS system.

The page mentions multiple exceptions to the "minimum version" statement. Do not ignore them.

yacc is mentioned: Bison-1.875 (/usr/bin/yacc should be a link to bison or small script that executes bison)

Like I said before: Using the liveCD as host would be best (including crts' remark).
 
Old 03-15-2010, 05:08 AM   #9
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Original Poster
Rep: Reputation: 0
crts and druuna,

Thanks for the help. I tracked down yacc, and installed the build-essential package and that sorted out my problem.

I have built the binutils tool successfully, and will now carry on.

Thanks for the help.

jackplug
 
  


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
Wine compile error: "C compiler cannot create executables" yoav_by Linux - Software 4 04-03-2011 05:23 PM
can't compile; configure won't complete: "C compiler cannot create executables" pbhj Slackware 5 12-15-2010 06:59 AM
"error: C compiler cannot create executables" when I try to compile gcc4.3.2 in/tools spencer8ab Linux From Scratch 4 05-13-2009 11:20 AM
error: "c compiler cannot create executables" when trying to run ./configure fedoraemu Linux - Software 2 04-24-2007 07:43 PM
"c compiler cannot create executables" error Peter Cooper Ubuntu 6 10-21-2006 03:20 PM

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

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