安凯anycloud39EV330开发环境搭建
1、安装交叉编译工具链:
sudo tar jxvf arm-anykav500-linux-uclibcgnueabi_V1.0.03.tar.bz2 -C /opt/
安凯文档描述解压,没有带-C /opt,需要注意下
正确方式:
2、修改/etc/profile文件
加入:export PATH=$PATH:/opt/arm-anykav500-linux-uclibcgnueabi/usr/bin/
保存后执行:
source /etc/profile
3、检测是否安装成功:
arm-anykav500-linux-uclibcgnueabi-gcc -v
4、在编译platform程序时候出错
jacklong@jacklong-VirtualBox:~/anyka/V1.01/PDK/SDK/sdk_release_dir/platform$ make all
make[1]: 进入目录“/home/jacklong/anyka/V1.01/PDK/SDK/sdk_release_dir/platform/sample”
make[2]: 进入目录“/home/jacklong/anyka/V1.01/PDK/SDK/sdk_release_dir/platform/sample/mem_ex”
---------------------[build ak_mem_ex_sample.c]----------------------------------
arm-anykav500-linux-uclibcgnueabi-gcc -c -Werror -D_GNU_SOURCE -std=c99 -mlittle-endian -fno-builtin -nostdlib -O2 -mlong-calls -I. -I../../include_inner -I../../include -I. -I../../include_inner -I../../include -o ak_mem_ex_sample.o ak_mem_ex_sample.c
/opt/arm-anykav500-linux-uclibcgnueabi/bin/../libexec/gcc/arm-anykav500-linux-uclibcgnueabi/4.9.4/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
make[2]: *** [/home/jacklong/anyka/V1.01/PDK/SDK/sdk_release_dir/platform/sample/mem_ex/../../rules.mk:37:ak_mem_ex_sample.o] 错误 1
make[2]: 离开目录“/home/jacklong/anyka/V1.01/PDK/SDK/sdk_release_dir/platform/sample/mem_ex”
make[1]: *** [Makefile:20:all] 错误 1
make[1]: 离开目录“/home/jacklong/anyka/V1.01/PDK/SDK/sdk_release_dir/platform/sample”
make: *** [Makefile:18:all] 错误 2
jacklong@jacklong-VirtualBox:~/anyka/V1.01/PDK/SDK/sdk_release_dir/platform$
网上搜索了,和我电脑环境一样
只有libmpfr.so.6 ,没有libmpfr.so.4
解决:
链接一下:
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
编译成功
5、如果是32为的环境,编译会提示:
这样只能安装64位环境了
本文地址:https://blog.csdn.net/longjiacheng2006/article/details/109358152