在编译openwrt系统的过程中,出现了@相关的一些问题,例如bfd.info出现问题,或者makeinfo出现问题,通过google定位到binutils软件安装版本太高,来安装最常见的binutils 2.23.2,源码下载完成,tar zxvf命令直接搞出来放在了opt/arm/build-tools中。
源码下载: ftp://ftp.gnu.org/gnu/binutils/
放置目录:http://www.360doc.com/content/10/1214/22/4525948_78191458.shtml
安装参考网页:http://www.linuxfromscratch.org/lfs/view/7.4/chapter06/binutils.html
首先安装:except
执行expect -c "spawn ls"
看到输出结果:
spawn ls
接着执行
rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in
下面语句修复了一些texinfo中的问题
sed -i -e 's/@colophon/@@colophon/' -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
但是在面执行的过程中我们仍然遭遇了问题
继续执行下列语句
配置:
../binutils-2.23.2/configure --prefix=/usr --enable-shared
编译一定要加上后面的语句
make tooldir=/usr
安装过程中
问题1:
configure: error: no acceptable C compiler found in $PATH
这是因为没有安装gcc编译器的缘故,apt-get install gcc即可
按照所给安装过程中仍然出现了
问题2
unknown command ‘cygnus’,make[3] ***[bfd.info] Error 1
参考网站:http://trac.cross-lfs.org/ticket/926,执行以下语句:
sed -i -e 's/@colophon/@@colophon/' -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
然后继续make /tooldir=/usr
顺利编译通过
执行最后几句语句:
make check
make tooldir=/usr install
cp -v ../binutils-2.23.2/include/libiberty.h /usr/include
完成安装,使用语句
ld -v
查看安装版本,可以看见版本为2.23.2,放心继续编译openwrt。