QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1406|回复: 7

编译LFS6.1到5.12. Binutils.。。。出错

[复制链接]
发表于 2005-8-7 12:09:07 | 显示全部楼层 |阅读模式
当我编译LFS6.1到5.12. Binutils-2.15.94.0.2.2 - Pass 2时出错,内容如下:
lfs://mnt/lfs/sources/binutils-2.15.94.0.2.2$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': File exists
lfs://mnt/lfs/sources/binutils-2.15.94.0.2.2$ cd ../binutils-build
lfs://mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls --enable-shared --with-lib-path=/tools/lib
loading cache ./config.cache
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... (cached) /usr/bin/ginstall -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... (cached) gnatbind
checking whether compiler driver understands Ada... (cached) yes
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... (cached) bison
checking for bison... (cached) bison -y
checking for gm4... (cached) m4
checking for flex... (cached) flex
checking for flex... (cached) flex
checking for makeinfo... (cached) makeinfo
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing opcodes/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
*** removing binutils/Makefile to force reconfigure
*** removing gas/Makefile to force reconfigure
*** removing ld/Makefile to force reconfigure
*** removing gprof/Makefile to force reconfigure
*** removing etc/Makefile to force reconfigure
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... (cached) /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... (cached) objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
creating Makefile
lfs://mnt/lfs/sources/binutils-build$ make
Configuring in libiberty
configure: loading cache ./config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -g -O2
configure:   current value: -g -O2
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make: *** [configure-libiberty] Error 1
lfs://mnt/lfs/sources/binutils-build$
谢谢各位帮忙看一下
发表于 2005-8-7 20:21:05 | 显示全部楼层
configure: error: `CFLAGS' has changed since the previous run:

这句比较可疑, 你的CFLAGS是什么, 试试用通用的非优化的CFLAGS看看, 比如i586什么的
回复

使用道具 举报

 楼主| 发表于 2005-8-7 22:19:58 | 显示全部楼层
多谢linky_fan版主回复,我还是不太明白你的意思,我在先前按文档的步骤编译没有看到有什么的错误提示,上面的提示是否说我在运行先前的步骤后`CFLAGS'已经改变。置于你提到试试用通用的非优化的CFLAGS,我应该没有优化过CFLAGS,如果优化过CFLAGS是否运行
unset  CFLAGS 还请版主详细说下我该如果做,谢谢。
回复

使用道具 举报

发表于 2005-8-8 09:03:06 | 显示全部楼层

Re: 编译LFS6.1到5.12. Binutils.。。。出错

[quote:e6335f02aa="timwong"]lfs://mnt/lfs/sources/binutils-2.15.94.0.2.2$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': File exists[/quote]
你必须先将第一次编译剩下的东西删除.
[code:1]cd ../binutils-build
rm -Rf *
[/code:1]
然后再编译
[code:1]
configure ...
make ...
[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-8-8 09:30:25 | 显示全部楼层
谢谢blackwolf回复,你有意思是把sources目录下的binutils-2.15.94.0.2.2源码目录和binutils-build目录删除吗?但我有些不明白在LFS6.1文档中提到:
After installing each package, delete its source and build directories, unless specifically instructed otherwise. Deleting the sources saves space and prevents mis-configuration when the same package is reinstalled later. Only three of the packages need to retain the source and build directories in order for their contents to be used by later commands. Pay special attention to these reminders.
之后在5.3. Binutils-2.15.94.0.2.2 - Pass 1中有个warning写到:

Warning

Do not remove the Binutils build and source directories yet. These will be needed again in their current state later in this chapter.
我该如果继续下去 thanks
回复

使用道具 举报

发表于 2005-8-8 10:29:43 | 显示全部楼层
1. Binutils Pass 1 (Do not remove the build and source)
2. Adjusting Toolchain ( the Binutils Pass 1 build directory is needed at here)
3. remove the build directory
4. Binutils Pass2 (Do not remove the build and source)
5. Re-adjusting the Toolchain (the Binutils Pass2 build directory is needed at here)
6. remove the build directory
7. install the Binutils Final Pass.
回复

使用道具 举报

 楼主| 发表于 2005-8-8 10:41:48 | 显示全部楼层
hi blackwolf
首先谢谢你的回复及支持,我再重新看了一遍5.7. Adjusting the Toolchain里面果然提到:
Now that the adjusted linker is installed, the Binutils build and source directories should be removed.
你有流程已经讲得很详细了,谢谢。
回复

使用道具 举报

发表于 2005-8-8 20:17:55 | 显示全部楼层
当我编译LFS6.1到5.12. Binutils-2.15.94.0.2.2 - Pass 2时出错,内容如下:
lfs://mnt/lfs/sources/binutils-2.15.94.0.2.2$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': File exists
lfs://mnt/lfs/sources/binutils-2.15.94.0.2.2$ cd ../binutils-build
lfs://mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls --enable-shared

我以为前面那几句是楼主mkdir后又mkdir了一遍呢     
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 17:06 , Processed in 0.039829 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表