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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-13-2010, 06:58 AM
|
#1
|
LQ Newbie
Registered: Jan 2010
Posts: 22
Rep:
|
"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
|
|
|
03-13-2010, 07:09 AM
|
#2
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Quote:
Originally Posted by jackplughd
.......
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.
|
|
|
03-13-2010, 08:20 AM
|
#3
|
LQ Newbie
Registered: Jan 2010
Posts: 22
Original Poster
Rep:
|
druuna,
how can gcc be missing when it is listed as version 4.2.4 half way up the list?
jackplug
|
|
|
03-13-2010, 08:54 AM
|
#4
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
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.
|
|
|
03-13-2010, 09:06 AM
|
#5
|
Senior Member
Registered: Jan 2010
Posts: 2,020
|
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.
|
|
|
03-13-2010, 10:00 AM
|
#6
|
LQ Newbie
Registered: Jan 2010
Posts: 22
Original Poster
Rep:
|
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
|
|
|
03-13-2010, 10:05 AM
|
#7
|
Senior Member
Registered: Jan 2010
Posts: 2,020
|
Quote:
Originally Posted by jackplughd
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.
|
|
|
03-13-2010, 10:13 AM
|
#8
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
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).
|
|
|
03-15-2010, 05:08 AM
|
#9
|
LQ Newbie
Registered: Jan 2010
Posts: 22
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:28 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|