/***************************************************************************************                  OK335xS canutils deal with compile error* 声明:*     本文主要是记录解决编译can测试工具(canutils)时遇到的一些编译错误。**                                          2015-9-4 晴 深圳 南山平山村 曾剑锋*************************************************************************************/\\\\\\\\\\\\\\\\\\\\\-*- 目录 -*-////|一、参考文章:|      二、编译后简略的3层文件结构(tree -L 3):|三、libsocketcan make install 问题:|四、canutils 找不到 libsocketcan 问题:|五、canutils 安装权限不足:                  \\\\\\\\\\\\\\\\\\\\\\\\\\\//
一、参考文章:1. 有谁编译过canutils-4.0.6的吗?http://bbs.csdn.net/topics/3904655162. AM335X DCAN Driver Guidehttp://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#CAN_Utilities3. AM335x DCAN driver compile issueshttps://e2e.ti.com/support/embedded/linux/f/354/t/270303
二、最后编译出来简略的3层文件结构(tree-L 3):.├── canutils-4.0.6│   ├── aclocal.m4│   ├── AUTHORS│   ├── autogen.sh│   ├── ChangeLog│   ├── config│   ├── config.log│   ├── config.status│   ├── configure│   ├── configure.ac│   ├── COPYING│   ├── GNUmakefile│   ├── GNUmakefile.am│   ├── GNUmakefile.in│   ├── include│   ├── install│   │   ├── bin│   │   ├── lib│   │   ├── sbin│   │   └── share│   ├── libtool│   ├── man│   ├── remake.sh│   └── src├── canutils-4.0.6.tar.bz2├── libsocketcan-0.0.8│   ├── aclocal.m4│   ├── autogen.sh│   ├── config│   ├── config.log│   ├── config.status│   ├── configure│   ├── configure.ac│   ├── GNUmakefile│   ├── GNUmakefile.am│   ├── GNUmakefile.in│   ├── include│   ├── install│   │   ├── include│   │   ├── lib│   │   └── share│   ├── INSTALL│   ├── libtool│   ├── README│   ├── remake.sh│   ├── src│   └── tests└── libsocketcan-0.0.8.tar.bz2三、libsocketcan make install 问题:1. 出错现象:Qt@zengjf:~/practice/c/canTest/libsocketcan-0.0.8$ make installMaking installinincludemake[1]: Entering directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make[2]: Entering directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make[2]: Nothing to be done for `install-exec-am'.test -z "/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include" || /bin/mkdir -p"/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include"/usr/bin/install -c -m 644libsocketcan.h can_netlink.h'/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include/.'/usr/bin/install: `libsocketcan.h'and`/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include/./libsocketcan.h'are the same file/usr/bin/install: `can_netlink.h'and`/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include/./can_netlink.h'are the same filemake[2]: *** [install-nobase_includeHEADERS] Error 1make[2]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make[1]: *** [install-am] Error 2make[1]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make: *** [install-recursive] Error 12. 解决方法:export GNUEABI=arm-linux-gnueabihfexport CC=$GNUEABI-gccexport LD=$GNUEABI-ldexport NM=$GNUEABI-nmexport AR=$GNUEABI-arexport RANLIB=$GNUEABI-ranlibexport CXX=$GNUEABI-c++filtexport INSTALL_PATH=$PWDexport PREFIX=$INSTALL_PATH/export CROSS_COMPILE_PREFIX=$PREFIXexport PATH=$TOOL_CHAIN_PATH/bin:$PATH#./configure --host=arm-linux --prefix=$PREFIX --enable-debug     # 官网给出的安装目录出错导致的,给出合适的安装路径./configure --host=arm-arago-linux --prefix=$PREFIX/install --enable-debug四、canutils 找不到 libsocketcan 问题:1. 错误现象:checkingfor pkg-config... /home/Qt/ti-processor-sdk-linux-am335x-evm-01.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yescheckingforlibsocketcan... noconfigure: error:*** libsocketcan version above 0.0.8not found on your system2. 解决方法:export GNUEABI=arm-linux-gnueabihfexport CC=$GNUEABI-gccexport LD=$GNUEABI-ldexport NM=$GNUEABI-nmexport AR=$GNUEABI-arexport RANLIB=$GNUEABI-ranlibexport CXX=$GNUEABI-c++export PREFIX=$FILESYS_PATH/usrexport CROSS_COMPILE_PREFIX=$PREFIXexport PATH=$TOOL_CHAIN_PATH/bin:$PATHexport LIBSOCKETCAN_INSTALL_DIR=$LIBSOCKETCAN_PATH/installexport PKG_CONFIG_PATH=$LIBSOCKETCAN_PATH/configexport LD_LIBRARY_PATH=${LIBDIR}:${LD_LIBRARY_PATH}export LD_RAN_PATH=${LIBDIR}:${LD_RAN_PATH}:/home/Qt/practice/c/canTest/libsocketcan-0.0.8/src/.libsexport LDFLAGS="-Wl,--rpath -Wl,$LIBSOCKETCAN_INSTALL_DIR/lib"export INCLUDES="-I$LIBSOCKETCAN_INSTALL_DIR/include"#./configure --host=arm-arago-linux --prefix=$PREFIX --enable-debug# 加上libsocketcan库的位置./configure --host=arm-linux --prefix=$PREFIX/install --enable-debug libsocketcan_LIBS=-lsocketcan LDFLAGS="-L$PWD/../libsocketcan-0.0.8/install/lib" libsocketcan_CFLAGS=-I$PWD/../libsocketcan-0.0.8/install/include五、canutils 安装权限不足:1. 错误现象:Qt@zengjf:~/practice/c/canTest/canutils-4.0.6$ make installMaking installinincludemake[1]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0.6/include'        make[2]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0.6/include'        make[2]: Nothing to be done for `install-exec-am'.make[2]: Nothing to be done for `install-data-am'.make[2]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/include'        make[1]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/include'        Making install inconfigmake[1]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make[2]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make[2]: Nothing to be done for `install-exec-am'.test -z "/usr/install/lib/pkgconfig" || /bin/mkdir -p "/usr/install/lib/pkgconfig"/bin/mkdir: cannot create directory `/usr/install': Permission deniedmake[2]: *** [install-pkgconfigDATA] Error 1make[2]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make[1]: *** [install-am] Error 2make[1]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make: *** [install-recursive] Error 12. 解决方法:export GNUEABI=arm-linux-gnueabihfexport CC=$GNUEABI-gccexport LD=$GNUEABI-ldexport NM=$GNUEABI-nmexport AR=$GNUEABI-arexport RANLIB=$GNUEABI-ranlibexport CXX=$GNUEABI-c++#export PREFIX=$FILESYS_PATH/usr        # 换一个有权限的路径export PREFIX=$PWDexport CROSS_COMPILE_PREFIX=$PREFIXexport PATH=$TOOL_CHAIN_PATH/bin:$PATHexport LIBSOCKETCAN_INSTALL_DIR=$LIBSOCKETCAN_PATH/installexport PKG_CONFIG_PATH=$LIBSOCKETCAN_PATH/configexport LD_LIBRARY_PATH=${LIBDIR}:${LD_LIBRARY_PATH}export LD_RAN_PATH=${LIBDIR}:${LD_RAN_PATH}:/home/Qt/practice/c/canTest/libsocketcan-0.0.8/src/.libsexport LDFLAGS="-Wl,--rpath -Wl,$LIBSOCKETCAN_INSTALL_DIR/lib"export INCLUDES="-I$LIBSOCKETCAN_INSTALL_DIR/include"#./configure --host=arm-arago-linux --prefix=$PREFIX --enable-debug./configure --host=arm-linux --prefix=$PREFIX/install --enable-debug libsocketcan_LIBS=-lsocketcan LDFLAGS="-L$PWD/../libsocketcan-0.0.8/install/lib" libsocketcan_CFLAGS=-I$PWD/../libsocketcan-0.0.8/install/include

转载于:https://www.cnblogs.com/zengjfgit/p/4781773.html

OK335xS canutils deal with compile error相关推荐

  1. linux freemodbus tcp,FreeModbus LINUXTCP Compile ERROR

    /********************************************************************************* * FreeModbus LINU ...

  2. JRebel启动报错:compile error: cannot find constructor org.zeroturnaround.javarebel.integration.spring

    背景: JRebel版本:2020.2.5.1 SpringBoot版本:2.5.7 在启动的时候报错,信息如下: Cause by:  compile error: cannot find cons ...

  3. {“error“:{“root_cause“:[{“type“:“script_exception“,“reason“:“compile error“,“script_stack“:[“... par

    前言 最近想更新ES里面已经存在的数据,报错 错误如下 {"error":{"root_cause":[{"type":"scri ...

  4. FreeModbus LINUXTCP Compile ERROR

    /********************************************************************************** FreeModbus LINUX ...

  5. C语言nullptr错误,编译错误'nullptr'未声明的标识符(Compile error 'nullptr' undeclared identifier)...

    编译错误'nullptr'未声明的标识符(Compile error 'nullptr' undeclared identifier) 我打算用Visual Studio 2008 Express编译 ...

  6. linux c 编译报错 Compile error : undefined reference to‘__atomic_fetch_add_4’ 解决方法

    代码如下: #include <opencv2/opencv.hpp> using namespace cv;int main() {Mat img=imread("cornea ...

  7. ODB 之 persist compile error

    今天遇到一个很诡异的问题,报错如下: C:\DiskD\Projects.plus\Kolo\PatientManagement\Common\odb/database.txx(38): error ...

  8. Unity3D入门,compile error

    上手了一个官方的实例项目,Space Shooter,结果添加了模型和背景图之后才发现,一大堆error,大约有100多个"namespace not found",其中大部分都是 ...

  9. VS+Eigen+CUDA compile error: C2244 and MSB3721

    编译环境Eigen3+CUDA9.2+VS2015 错误如下: 解决方式: 将Eigen中的JacobiSVD and BDCSVD里的Index用Eigen::Index替换 http://eige ...

最新文章

  1. 计算机网络中路由器,浅析计算机网络中的路由器
  2. Zotero参考文献管理
  3. OVS vxlan 底层结构分析 - 每天5分钟玩转 OpenStack(148)
  4. 领扣简单版--两数之和(Two Sum)
  5. gradle普通项目构建外部依赖jar的终极方法gradle瘦身
  6. Leaflet学习笔记-Leaflet.awesome-markers
  7. linux下安装anconda
  8. angular1 搜索服务 ,震灾名称是必填
  9. latex 插图排版
  10. Python绘制简单漂亮好玩的散点图
  11. httpUtils 工具类
  12. LM2596电源模块原理图及PCB分享
  13. pyqt显示圆形图片
  14. 电壁挂炉该如何配电表和电线
  15. hp450 g8摄像头打开后黑屏
  16. 【BZOJ】【P1406】【AHOI2007】【密码箱】【题解】【数论】
  17. 数字和ASII码之间的转换
  18. 微信对账单--每日定时任务获取昨日微信支付账单
  19. 二代测序原理及其流程
  20. matlab如何添加数据集,如何用matlab把数据集导入数据库

热门文章

  1. 查询2019-06-20日 和 2019-06-23  每个商品每天的入库情况
  2. 小程序开发工具不显示tobar图标
  3. 从源码分析RocketMQ系列-Producer的SendResult来自哪里?
  4. 【MyBatis框架】查询缓存-二级缓存原理
  5. Ubuntu server中静态IP配置
  6. 《Go 语言程序设计》读书笔记 (三) 方法
  7. RocketMQ 4.5.1 环境搭建
  8. 分库分表及其解决方案
  9. 技本功丨用短平快的方式告诉你:Flink-SQL的扩展实现
  10. VSS新建项目后导致项目组成员不能打开解决方案的解决方法