博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
OK335xS canutils deal with compile error
阅读量:5799 次
发布时间:2019-06-18

本文共 7978 字,大约阅读时间需要 26 分钟。

/************************************************************************************** *                  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/390465516    2. AM335X DCAN Driver Guide        http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#CAN_Utilities    3. AM335x DCAN driver compile issues        https://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 install        Making install in include        make[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 644  libsocketcan.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 file        make[2]: *** [install-nobase_includeHEADERS] Error 1        make[2]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make[1]: *** [install-am] Error 2        make[1]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0.8/include'        make: *** [install-recursive] Error 1    2. 解决方法:        export GNUEABI=arm-linux-gnueabihf        export CC=$GNUEABI-gcc        export LD=$GNUEABI-ld        export NM=$GNUEABI-nm        export AR=$GNUEABI-ar        export RANLIB=$GNUEABI-ranlib        export CXX=$GNUEABI-c++filt        export INSTALL_PATH=$PWD        export PREFIX=$INSTALL_PATH/        export CROSS_COMPILE_PREFIX=$PREFIX        export 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. 错误现象:        checking for pkg-config... /home/Qt/ti-processor-sdk-linux-am335x-evm-01.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/pkg-config        checking pkg-config is at least version 0.9.0... yes        checking for libsocketcan... no        configure: error: *** libsocketcan version above 0.0.8 not found on your system    2. 解决方法:        export GNUEABI=arm-linux-gnueabihf        export CC=$GNUEABI-gcc        export LD=$GNUEABI-ld        export NM=$GNUEABI-nm        export AR=$GNUEABI-ar        export RANLIB=$GNUEABI-ranlib        export CXX=$GNUEABI-c++        export PREFIX=$FILESYS_PATH/usr        export CROSS_COMPILE_PREFIX=$PREFIX        export PATH=$TOOL_CHAIN_PATH/bin:$PATH        export LIBSOCKETCAN_INSTALL_DIR=$LIBSOCKETCAN_PATH/install        export PKG_CONFIG_PATH=$LIBSOCKETCAN_PATH/config        export 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/.libs        export 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 install        Making install in include        make[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 in config        make[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 denied        make[2]: *** [install-pkgconfigDATA] Error 1        make[2]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make[1]: *** [install-am] Error 2        make[1]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0.6/config'        make: *** [install-recursive] Error 1    2. 解决方法:        export GNUEABI=arm-linux-gnueabihf        export CC=$GNUEABI-gcc        export LD=$GNUEABI-ld        export NM=$GNUEABI-nm        export AR=$GNUEABI-ar        export RANLIB=$GNUEABI-ranlib        export CXX=$GNUEABI-c++        #export PREFIX=$FILESYS_PATH/usr        # 换一个有权限的路径        export PREFIX=$PWD        export CROSS_COMPILE_PREFIX=$PREFIX        export PATH=$TOOL_CHAIN_PATH/bin:$PATH        export LIBSOCKETCAN_INSTALL_DIR=$LIBSOCKETCAN_PATH/install        export PKG_CONFIG_PATH=$LIBSOCKETCAN_PATH/config        export 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/.libs        export 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

 

转载地址:http://rupfx.baihongyu.com/

你可能感兴趣的文章
git 入门宝典
查看>>
spring-boot支持websocket
查看>>
菜鸟笔记(一) - Java常见的乱码问题
查看>>
移动web端自定义tap与模拟hover效果
查看>>
[译] Java 8 Nashorn 教程
查看>>
我理想中的前端工作流
查看>>
记一次Git异常操作:将多个repository合并到同一repository的同一分支
查看>>
CodeIgniter 3.0 新手捣鼓源码(一) base_url()
查看>>
Chrome 广告屏蔽功能不影响浏览器性能
查看>>
【九度OJ1516】|【剑指offer14】调整数组顺序使奇数位于偶数前面
查看>>
PHP去掉转义后字符串中的反斜杠\函数stripslashes
查看>>
一个快速的开发框架Wabacus
查看>>
Spring Test+JUnit完美组【使用Spring测试套件】
查看>>
Llinux 编译安卓 “android list targets 无target显示” 的解决方法
查看>>
Java NIO
查看>>
李炎恢老师XHTML视频教程(90课时)[已完结]
查看>>
我的友情链接
查看>>
JavaScript基础(三)运算符和数据类型转换
查看>>
shell getopt
查看>>
集团电话术语整理
查看>>