pckiller 发表于 2013-3-18 01:16:29

CentOS 64bit 系统中编译uboot出错

本帖最后由 pckiller 于 2013-3-18 11:20 编辑

由于一直使用redhat的linux,并熟悉其操作,因此没有安装手册推荐的ubuntuLinux,安装的是CentOS64bit系统,根据手册的介绍的ubuntu_evn_install.sh,自行安装了java,并更新了部分的软件包,也设置好了交叉工具链的环境变量,在编译厂家提供的uboot时,出现了如下错误:
arm-linux-gcc -g-Os   -fno-strict-aliasing-fno-common -ffixed-r8 -msoft-float-D__KERNEL__ -DTEXT_BASE=0xc3e00000 -I/home/george/ArmTQ210/opt/EmbedSky/TQ210/uboot_TQ210_1.3.4/include -fno-builtin -ffreestanding -nostdinc -isystem /home/george/ArmTQ210/opt/EmbedSky/4.4.6/bin/../lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/include -pipe-DCONFIG_ARM -D__ARM__ -march=armv5te -mabi=apcs-gnu -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -c -o hello_world.o hello_world.c
/home/george/ArmTQ210/opt/EmbedSky/4.4.6/bin/../lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** Error 2
make: Leaving directory `/home/george/ArmTQ210/opt/EmbedSky/TQ210/uboot_TQ210_1.3.4/examples'
make: *** Error 2

发现是由于系统找不到libz.so.1的共享库文件而导致的as程序不能正常运行,通过查找所需要的共享库文件在交叉工具链的lib中有,因此希望通过在/etc/ld.so.conf中增加搜索路径,并用ldconfig增加到程序执行的共享库搜索路径中,仍然出现此错误。于是有考虑直接在系统的/usr/lib中直接建立该库文件的链接,还是不能解决此问题。想请问对于交叉工具链还需要进行哪些设置,是否是我疏忽掉的?

亚瑟王 发表于 2013-3-18 10:05:21

你的PC环境中有没有libz这个库?

pckiller 发表于 2013-3-18 10:36:29

pc环境里没有libz,但是在交叉编译链中有,我已经做了个链接到pc环境里,还是不能使用

pckiller 发表于 2013-3-18 10:43:57

再就是更新软件包时,有些包找不到,比如build_essential等等,没有安装,不知道是不是这个影响的。

pckiller 发表于 2013-3-18 11:20:00

安装zlib和zlib-devel后问题解决。
页: [1]
查看完整版本: CentOS 64bit 系统中编译uboot出错