"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 |
Hi,
Quote:
Quote:
Please read the output of commands carefully and try to find out what is wrong when an error occurs. |
druuna,
how can gcc be missing when it is listed as version 4.2.4 half way up the list? jackplug |
I now see that the section I highlighted is not the only things thats wrong.....
Quote:
- 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. |
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. |
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 |
Quote:
Code:
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) |
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). |
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 10:05 PM. |