交叉编译遇到一些问题
来源:互联网 发布:淘宝客公司 编辑:程序博客网 时间:2024/05/21 21:41
1、从仓库中clone一份到本地
git clone http://arago-project.org/git/projects/test-automation/ltp-ddt.git
2、先生成configure文件,一般使用make autotools
3、./configuer 需要有一些参数
./configure --build=x86_64-linux --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/opt/ltp --exec_prefix=/opt/ltp --bindir=/opt/ltp/bin --sbindir=/opt/ltp/sbin --libexecdir=/opt/ltp/lib/ltp --datadir=/opt/ltp/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/opt/ltp/lib --includedir=/opt/ltp/include --oldincludedir=/opt/ltp/include --infodir=/opt/ltp/share/info --mandir=/opt/ltp/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=$SDKTARGETSYSROOT --with-power-management-testsuite --with-realtime-testsuite --without-tirpc --without-numa
4、遇到的一些问题
1)
/tmp/ccEW4rwZ.o: In function `st_audio_file_playback':
/home/ts/work/ltp-ddt/testcases/ddt/alsa_test_suite/src/testcases/st_alsa_file_playback_test.c:101: undefined reference to `st_read'
/home/ts/work/ltp-ddt/testcases/ddt/alsa_test_suite/src/testcases/st_alsa_file_playback_test.c:144: undefined reference to `st_close'
/tmp/cc17CaZZ.o: In function `st_audio_file_capture':
/home/ts/work/ltp-ddt/testcases/ddt/alsa_test_suite/src/testcases/st_alsa_capture_file_test.c:113: undefined reference to `st_write'
解决办法: 将-I $(ALSA_INCPATH)移到前面位置
#INCLUDES = -I $(KERNEL_USR_INC) -I/home/ts/work/ltp-ddt/testcases/ddt/alsa_test_suite/src/interface/common -I ../utils/user -I $(ALSA_INCPATH)
INCLUDES = -I $(KERNEL_USR_INC) -I/home/ts/work/ltp-ddt/testcases/ddt/alsa_test_suite/src/interface/common -I $(ALSA_INCPATH) -I/home/ts/work/ltp-ddt/testcases/ddt/utils/user/
2)
/opt/fsl-imx-wayland/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lc
collect2: error: ld returned 1 exit status
解决:调整 -I $(KERNEL_INC) 位置
INCLUDES = -I src/user/parser -I src/user/interface/common -I $(KERNEL_INC)-I ../utils/user
3)
/opt/fsl-imx-wayland/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find ../utils/user: File format not recognized
/opt/fsl-imx-wayland/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find -lc
解决办法:
将 -I $(KERNEL_USR_INC)去掉,一般为空
#INCLUDES = -I $(KERNEL_USR_INC) -I src/interface/common -I ../utils/user
INCLUDES = -I src/interface/common -I ../utils/user
主要原因时:在make的时候, -I $(KERNEL_USR_INC) 为空,此时编译的时候就与后面的 -I -I src/interface/common 构成,makefile识别失败,所以会报错
4)
tests_rpc_stress.c:57:29: fatal error: linux/rpmsg_rpc.h: No such file or directory
#include "linux/rpmsg_rpc.h"
在CFLAGS添加头文件的路径
CFLAGS += -g -Wall -O1 -fomit-frame-pointer -I/home/ts/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/linux-libc-headers/4.9-r0.arago2/sysroot-destdir/usr/include
这个原因需要下在这个库 /tisdk/
git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
总结:
一般这些问题都是makefile文件里有语法错误
- 交叉编译遇到一些问题
- 交叉编译遇到的问题
- 交叉编译遇到的问题
- 在构造交叉编译链的时候遇到的一些问题
- 交叉编译ffmpeg遇到的问题
- 交叉编译Apache遇到的各种问题
- 交叉编译QT4.8.6遇到问题记录
- 关于SQLite3 编译及交叉编译的一些问题
- 交叉编译D-BUS时遇到abstract socket的问题。
- 交叉编译opencv到tiny210所遇到的问题
- [交叉编译qt4.8.4 for ARM]遇到到问题
- 交叉编译qt5.7可能遇到的问题及解决
- 交叉编译过程中遇到的问题总结
- C++编译spidermonkey遇到的一些问题
- android 源码编译遇到得一些问题
- android 源码编译遇到得一些问题
- Windows服务编译遇到的一些问题
- USB驱动编译遇到的一些问题
- python3及wxpythonGUI多线程防假死与线程消息传递消息(最新)
- J2EE学习笔记
- List、Map、Set三个接口,存取元素的特点
- 洛谷 P2564 [SCOI2009]生日礼物
- [ [资源贴] ]数据集、函数、python、tensorflow、caffe等相关的资源分享
- 交叉编译遇到一些问题
- 个人收集的一些第三方库
- 样式的层叠
- 函数:使用数组名作为函数参数进行操作
- Oracle 不同字符集(中英文字符集)直接转换查询,解决中文乱码,以ZHS16GBK转为WE8ISO8859P1为例
- 对各个知识节点的归纳反思
- DNSmasq配置DHCP服务器DNS的方法
- Oracle的decode函数和sign函数
- 大规模codis集群的治理与实践