P39
../binutils-2.15/configure --target=$TARGET --prefix=$PREFIX
运行出错:
solar@solar-linus:~/armlinux/build-tools/build-binutils$ ../binutils-2.15/configure --target=$TARGET --prefix=$PREFIX
creating cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking target system type... arm-unknown-linux-gnu
checking build system type... i686-pc-linux-gnulibc1
checking for a BSD compatible install... /usr/bin/install -c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
solar@solar-linus:~/armlinux/build-tools/build-binutils$
安装libc6-dev就没问题了
solar@solar-linus:~/armlinux/build-tools/build-binutils$ sudo apt-get install libc6-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
将会安装下列额外的软件包:
linux-libc-dev
建议安装的软件包:
glibc-doc manpages-dev
下列【新】软件包将被安装:
libc6-dev linux-libc-dev
共升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 3940kB 的软件包。
解压缩后会消耗掉 17.3MB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://security.ubuntu.com gutsy-security/main linux-libc-dev 2.6.22-14.52 [653kB]
获取:2 http://cn.archive.ubuntu.com gutsy-updates/main libc6-dev 2.6.1-1ubuntu10 [3287kB]
下载 3940kB,耗时 5m32s (11.8kB/s)
选中了曾被取消选择的软件包 linux-libc-dev。
(正在读取数据库 ... 系统当前总共安装有 92714 个文件和目录。)
正在解压缩 linux-libc-dev (从 .../linux-libc-dev_2.6.22-14.52_i386.deb) ...
选中了曾被取消选择的软件包 libc6-dev。
正在解压缩 libc6-dev (从 .../libc6-dev_2.6.1-1ubuntu10_i386.deb) ...
正在设置 linux-libc-dev (2.6.22-14.52) ...
正在设置 libc6-dev (2.6.1-1ubuntu10) ...
solar@solar-linus:~/armlinux/build-tools/build-binutils$ ../binutils-2.15/configure --target=$TARGET --prefix=$PREFIX
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
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... dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
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-windres... no
checking for windres... windres
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 arm-linux-ar... no
checking for arm-linux-as... no
checking for arm-linux-dlltool... no
checking for arm-linux-ld... no
checking for arm-linux-nm... no
checking for arm-linux-ranlib... no
checking for arm-linux-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
接着make,又出错:
……
/home/solar/armlinux/build-tools/binutils-2.15/ld/configure: 4415: flex: not found
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... /home/solar/armlinux/build-tools/binutils-2.15/ld/configure: 1: lex: not found
configure: error: cannot find output from lex; giving up
make: *** [configure-ld] 错误 1
solar@solar-linus:~/armlinux/build-tools/build-binutils$
这里需要安装flex,执行下面的命令就可以通过了。
sudo atp-get install flex