|
发表于 2008-8-12 16:14:32
|
显示全部楼层
Post by dusks;1885049
我第一次编译的时候使用的命令是:
使用lfs用户登陆:
cd $LFS/source
tar -jxvf binutils-2.17.tar.bz2
mkdir -v ../binutils-build
cd ../binutils-build
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-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 -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/ ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
vi ./config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:611: checking host system type
configure:632: checking target system type
configure:650: checking build system type
configure:705: checking for a BSD compatible install
configure:758: checking whether ln works
configure:782: checking whether ln -s works
configure:1867: checking for gcc
configure:1980: checking whether the C compiler (gcc -B/usr/bin ) works
configure:1996: gcc -B/usr/bin -o conftest conftest.c 1>&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:
#line 1991 "configure"
#include "confdefs.h"
main(){return(0);}
问题解决!方法如下:
是这个文件缺失:crt1.o
使用下例的方法找到并安装上,即可解决问题。
On Ubuntu:
apt-get install libc6-dev
On debian:
apt-get install libc6-dev
On Fedora:
$ locate crt1.o
/usr/lib/crt1.o
$ rpm -qf /usr/lib/crt1.o
glibc-devel-X.X.X-XX
Then install the package glibc-devel-X.X.X-XX using yum, rpm, etc |
|