第一次编译binutils-2.17出现的错误,求救
时间:2008-01-01
来源:互联网
hi ~ all
i am tring to compile binutils2.17 for my lfs
env: vmware5.5
liveCD:lfslivecd-x86-6.3-r2160.iso
i do like this:
我参考的文档
http://www.linuxfromscratch.org/ ... binutils-pass1.html
tar xvf /lfs-sources/binutils-2.17.tar.bz2
cd binutils-2.17
mkdir -v ../binutils-build
cd ../binutils-build
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror
then
vi config.log
**************************************************
configure:2317: checking for correct version of gmp.h configure:2330: gcc -B/usr/bin/ -c -g -O2 conftest.c 1>&5 configure:2320:17: error: gmp.h: No such file or directory configure: In function 'main': configure:2324: error: 'choke' undeclared (first use in this function) configure:2324: error: (Each undeclared identifier is reported only once configure:2324: error: for each function it appears in.) configure:2324: error: expected ';' before 'me' configure: failed program was: #line 2319 "configure" #include "confdefs.h" #include "gmp.h" int main() { #if __GNU_MP_VERSION < 3 choke me #endif ; return 0; }
and what i have to do this??
Where do I get gmp.h? Do I need it? What else can be wrong?
thank you.
作者: awnun 发布时间: 2008-01-01
作者: deargodzw 发布时间: 2008-01-01
作者: youbest 发布时间: 2008-01-01
我做天用软件写到iso里面,结果liveCD坏掉了
汗
你们是如何传文件过去的到liveCD中
作者: awnun 发布时间: 2008-01-01
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror
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 -B/usr/bin/ checking whether the C compiler (gcc -B/usr/bin/ ) works... yes checking whether the C compiler (gcc -B/usr/bin/ ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc -B/usr/bin/ accepts -g... yes checking for gnatbind... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for correct version of gmp.h... no checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... no checking for runtest... no checking for i686-pc-linux-gnu-ar... no checking for ar... ar checking for i686-pc-linux-gnu-as... no checking for as... as checking for i686-pc-linux-gnu-dlltool... no checking for dlltool... no checking for i686-pc-linux-gnu-ld... /usr/bin/ld checking for i686-pc-linux-gnu-lipo... no checking for lipo... no checking for i686-pc-linux-gnu-nm... no checking for nm... nm checking for i686-pc-linux-gnu-ranlib... no checking for ranlib... ranlib checking for i686-pc-linux-gnu-strip... no checking for strip... strip checking for i686-pc-linux-gnu-windres... no checking for windres... no checking for i686-pc-linux-gnu-objcopy... no checking for objcopy... objcopy checking for i686-pc-linux-gnu-objdump... no checking for objdump... objdump checking for i686-pc-linux-gnu-cc... no checking for cc... cc checking for i686-pc-linux-gnu-c++... no checking for c++... c++ checking for i686-pc-linux-gnu-gcc... no checking for gcc... gcc checking for i686-pc-linux-gnu-gcj... no checking for gcj... no checking for i686-pc-linux-gnu-gfortran... no checking for gfortran... no checking for ar... no checking for i686-pc-linux-gnu-ar... no checking for ar... ar checking for as... no checking for i686-pc-linux-gnu-as... no checking for as... as checking for dlltool... no checking for i686-pc-linux-gnu-dlltool... no checking for dlltool... no checking for ld... no checking for i686-pc-linux-gnu-ld... no checking for ld... ld checking for lipo... no checking for i686-pc-linux-gnu-lipo... no checking for lipo... no checking for nm... no checking for i686-pc-linux-gnu-nm... no checking for nm... nm checking for objdump... no checking for i686-pc-linux-gnu-objdump... no checking for objdump... objdump checking for ranlib... no checking for i686-pc-linux-gnu-ranlib... no checking for ranlib... ranlib checking for strip... no checking for i686-pc-linux-gnu-strip... no checking for strip... strip checking for windres... no checking for i686-pc-linux-gnu-windres... no checking for windres... no checking where to find the target ar... just compiled checking where to find the target as... just compiled checking where to find the target cc... host tool checking where to find the target c++... host tool checking where to find the target c++ for libstdc++... host tool checking where to find the target dlltool... just compiled checking where to find the target gcc... host tool checking where to find the target gcj... host tool checking where to find the target gfortran... host tool checking where to find the target ld... just compiled checking where to find the target lipo... host tool checking where to find the target nm... just compiled checking where to find the target objdump... just compiled checking where to find the target ranlib... just compiled checking where to find the target strip... just compiled checking where to find the target windres... just compiled checking whether to enable maintainer-specific portions of Makefiles... no updating cache ./config.cache creating ./config.status creating Makefile
lfs:/mnt/lfs/sources/binutils-2.17$
作者: awnun 发布时间: 2008-01-01
作者: youbest 发布时间: 2008-01-01
到binutils-build目录下面看config.log会报错
在binutils-2.17下面放的code
mkdir -v ../binutils-build cd ../binutils-build CC="gcc -B/usr/bin/" ../binutils-2.17/configure \ --prefix=/tools --disable-nls --disable-werror
不清楚怎么解决
要换版本??
又是怎么拷到liveCD中的呢
作者: awnun 发布时间: 2008-01-01
作者: youbest 发布时间: 2008-01-01
看来和预料的一样,configure完成了,不过你这个应该是在binutils-build里,最好别在binutils代码的目录里.
能否具体说清楚点不?
作者: yingkity 发布时间: 2008-05-26
作者: yingkity 发布时间: 2008-05-26
使用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);}
作者: dusks 发布时间: 2008-08-12
作者: dusks
我第一次编译的时候使用的命令是:
使用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
作者: dusks 发布时间: 2008-08-12
正愁着不知如何解决呢
作者: lofeng410 发布时间: 2008-10-18
作者: lofeng410
我也碰上了和楼主一样的问题
正愁着不知如何解决呢 |
用虚拟机的就应该明白虚拟机下一切皆有可能。
LFS的光盘和手册都是针对不用虚拟机的情况进行的测试。
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
楼主用的是vmware,怎能不出错?
用虚拟机的就应该明白虚拟机下一切皆有可能。 LFS的光盘和手册都是针对不用虚拟机的情况进行的测试。 |
但是跟楼主的问题一样 make的时候陷入死循环
现在发现可能是binutils-2.17中的很多文件的time stamp比系统时间还要新(系统时间是GMT 2002.12.31),在我这可能是这个原因造成死循环的。
我正在尝试用touch命令更改binutils-2.17中文件的time stamp,但是这个方式不是很好,因为后面还会出现这个问题。我想问下,可有直接更新系统时间的命令(通过网络更新)?这样才能彻底的解决问题
作者: lofeng410 发布时间: 2008-10-18
作者: lofeng410 发布时间: 2008-10-18
作者: lofeng410
现在我没有用虚拟机了
但是跟楼主的问题一样 make的时候陷入死循环 现在发现可能是binutils-2.17中的很多文件的time stamp比系统时间还要新(系统时间是GMT 2002.12.31),在我这可能是这个原因造成死循环的。 我正在尝试用touch命令更改binutils-2.17中文件的time stamp,但是这个方式不是很好,因为后面还会出现这个问题。我想问下,可有直接更新系统时间的命令(通过网络更新)?这样才能彻底的解决问题 |
作者: ti8er 发布时间: 2008-10-18
echo TZ
2、用date命令直接改你的系统时间
date 101811402008
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
你现在的系统时间是多少?
|
我已经date -s 081018了
但是错误依旧 在config.log文件中依然提示找不到:
-----------------------------------------------------------------------------------------------
configure:2324: error: 'choke' undeclared (first use in this function)
configure:2324: error: (Each undeclared identifier is reported only once
configure:2324: error: for each function it appears in.)
configure:2324: error: expected ';' before 'me'
configure: failed program was:
#line 2319 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
#if __GNU_MP_VERSION < 3
choke me
#endif
; return 0; }
作者: lofeng410 发布时间: 2008-10-18
一直循环显示的包含下面的内容:
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er 发布时间: 2008-10-18
echo $PATH
我看看你的PATH。
然后
mount
给我看看。
作者: ti8er 发布时间: 2008-10-18
./config.guess
给我看看结果。
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
你开始是怎么做的?
|
export输出也正常的
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
你现在是在LIVECD环境下的吧?
echo $PATH 我看看你的PATH。 然后 mount 给我看看。 |
/tools/bin:/bin:/usr/bin
mount的输出是:
/dev/mapper/lfs-cd on / type ext2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
decpts on /dev/pts type devpts (rw,gid=4,mode=620)
/dev/hda4 on /mnt/lfs type ext3 (rw)
./config.guess的输出是:
i686-pc-linux-gnu
作者: lofeng410 发布时间: 2008-10-18
给分配了5.5G的空间 /dev/hda4
/dev/hda3为交换分区
作者: lofeng410 发布时间: 2008-10-18
ln -sv /mnt/lfs/tools /
这个命令。
作者: ti8er 发布时间: 2008-10-18
cd ../binutils-build
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror
你确保输入正确了吧?看看屏幕是否有什么提示没有?
作者: ti8er 发布时间: 2008-10-18
whereis gcc
看看结果。
作者: ti8er 发布时间: 2008-10-18
作者: lofeng410
echo $PATH的输出是:
/tools/bin:/bin:/usr/bin mount的输出是: /dev/mapper/lfs-cd on / type ext2 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) decpts on /dev/pts type devpts (rw,gid=4,mode=620) /dev/hda4 on /mnt/lfs type ext3 (rw) ./config.guess的输出是: i686-pc-linux-gnu |
/dev/hda7 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=4,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
这是我的LFS系统的mount
作者: ti8er 发布时间: 2008-10-18
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er
你在/目录下建立了tools的连接没有?
ln -sv /mnt/lfs/tools / 这个命令。 |
作者: ti8er
mkdir -v ../binutils-build
cd ../binutils-build CC="gcc -B/usr/bin/" ../binutils-2.17/configure \ --prefix=/tools --disable-nls --disable-werror 你确保输入正确了吧?看看屏幕是否有什么提示没有? |
checking where to find the target ar... just compiled
checking where to find the target as... ust compiled
checking where to find the target cc... host tool
checking where to find the target c++... host tool
作者: ti8er
输入命令:
whereis gcc 看看结果。 |
/usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er
你的mount怎么会没有tmpfs这个挂载?
/dev/hda7 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=4,mode=620) tmpfs on /dev/shm type tmpfs (rw) 这是我的LFS系统的mount |
作者: lofeng410 发布时间: 2008-10-18
作者: lofeng410
我也不知道 但是我多了/dev/mapper/lfs-cd on / type ext2 (rw)我是从光盘启动的
|
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
不过不清楚少这个会不会影响到编译。你再make,还不行吗?
作者: ti8er 发布时间: 2008-10-18
md5sum binutils-2.17.tar.bz2
看看结果是不是下面的:
e26e2e06b6e4bf3acf1dc8688a94c0d1 binutils-2.17.tar.bz2
我怀疑是不是你的软件包有问题?
上面的代码,0是数字零,不是英文字母o
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
光盘启动也应该有tmpfs的挂载项目。你看看英文手册6.2.3章的内容:
mount -vt devpts devpts $LFS/dev/pts mount -vt tmpfs shm $LFS/dev/shm mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys 不过不清楚少这个会不会影响到编译。你再make,还不行吗? |
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er
输入命令:
md5sum binutils-2.17.tar.bz2 看看结果是不是下面的: e26e2e06b6e4bf3acf1dc8688a94c0d1 binutils-2.17.tar.bz2 我怀疑是不是你的软件包有问题? 上面的代码,0是数字零,不是英文字母o |
作者: lofeng410 发布时间: 2008-10-18
mount -vt tmpfs tmpfs /dev/shm
作者: ti8er 发布时间: 2008-10-18
作者: ti8er 发布时间: 2008-10-18
作者: ti8er 发布时间: 2008-10-18
作者: ti8er
不行就只好用LFS6.2的binutils-2.16.1版本了。
|
http://ftp.gnu.org/gnu/binutils/
下载binutils-1.16.1
LFS6.2里面的导出来比较麻烦
作者: lofeng410 发布时间: 2008-10-18
作者: ti8er
你现在不是在那台机器上工作的吗?你用live-cd 的图形界面不可以上网和打中文吗?
|
作者: lofeng410 发布时间: 2008-10-18
你那台机器的配置是怎么样的?你挂载tmpfs试试行了没有?不行的话重启电脑,再mount看看有没有这个系统。如果还没有,你把CD拿到你另一台机器上试试,看看有没有?
作者: ti8er 发布时间: 2008-10-18
作者: ti8er 发布时间: 2008-10-18
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28