OK335xS canutils deal with compile error
/**************************************************************************************
* OK335xS canutils deal with compile error
* 声明:
* 本文主要是记录解决编译can测试工具(canutils)时遇到的一些编译错误。
*
* 2015-9-4 晴 深圳 南山平山村 曾剑锋
*************************************************************************************/ \\\\\\\\\\\\\\\\\\\\\-*- 目录 -*-////////////////////
| 一、参考文章:
| 二、编译后简略的3层文件结构(tree -L ):
| 三、libsocketcan make install 问题:
| 四、canutils 找不到 libsocketcan 问题:
| 五、canutils 安装权限不足:
\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////// 一、参考文章:
. 有谁编译过canutils-4.0.6的吗?
http://bbs.csdn.net/topics/390465516
. AM335X DCAN Driver Guide
http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#CAN_Utilities
. AM335x DCAN driver compile issues
https://e2e.ti.com/support/embedded/linux/f/354/t/270303 二、最后编译出来简略的3层文件结构(tree -L ):
.
├── canutils-4.0.
│ ├── 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..tar.bz2
├── libsocketcan-0.0.
│ ├── 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..tar.bz2 三、libsocketcan make install 问题:
. 出错现象:
Qt@zengjf:~/practice/c/canTest/libsocketcan-0.0.$ make install
Making install in include
make[]: Entering directory `/home/Qt/practice/c/canTest/libsocketcan-0.0./include'
make[]: Entering directory `/home/Qt/practice/c/canTest/libsocketcan-0.0./include'
make[]: 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 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./include/./libsocketcan.h' are the same file
/usr/bin/install: `can_netlink.h' and
`/home/Qt/practice/c/canTest/libsocketcan-0.0./include/./can_netlink.h' are the same file
make[]: *** [install-nobase_includeHEADERS] Error
make[]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0./include'
make[]: *** [install-am] Error
make[]: Leaving directory `/home/Qt/practice/c/canTest/libsocketcan-0.0./include'
make: *** [install-recursive] Error
. 解决方法:
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 问题:
. 错误现象:
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.... yes
checking for libsocketcan... no
configure: error: *** libsocketcan version above 0.0. not found on your system
. 解决方法:
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./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./install/include 五、canutils 安装权限不足:
. 错误现象:
Qt@zengjf:~/practice/c/canTest/canutils-4.0.$ make install
Making install in include
make[]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0./include'
make[]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0./include'
make[]: Nothing to be done for `install-exec-am'.
make[]: Nothing to be done for `install-data-am'.
make[]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0./include'
make[]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0./include'
Making install in config
make[]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0./config'
make[]: Entering directory `/home/Qt/practice/c/canTest/canutils-4.0./config'
make[]: 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[]: *** [install-pkgconfigDATA] Error
make[]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0./config'
make[]: *** [install-am] Error
make[]: Leaving directory `/home/Qt/practice/c/canTest/canutils-4.0./config'
make: *** [install-recursive] Error
. 解决方法:
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./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./install/include
OK335xS canutils deal with compile error的更多相关文章
- VBA Excel WideCharToMultiByte Compile error on 64-bit System
Compile Error: The code in this project must be updated for use on64-bit systems. Please review and ...
- FreeModbus LINUXTCP Compile ERROR
/********************************************************************************* * FreeModbus LINU ...
- Handling CLIK AS3 Compile Error 1152 & 5000
Handling CLIK AS3 Compile Error 1152 & 5000 Action You add a CLIK AS3 component from CLIK_Compon ...
- caffe: compile error : undefined reference to `cv::imread(cv::String const&, int)' et al.
when I compile caffe file : .build_debug/lib/libcaffe.so: undefined reference to `cv::imread(cv::Str ...
- ASIHTTPREQUEST framework compile error when method is called / link error
never mind!!! duplicate: Error with iOS 5.1 when i use ASIHTTPRequest and SBJSON "I would take ...
- caffe: fuck compile error again : error: a value of type "const float *" cannot be used to initialize an entity of type "float *"
wangxiao@wangxiao-GTX980:~/Downloads/caffe-master$ make -j8find: `wangxiao/bvlc_alexnet/spl': No suc ...
- compile error
stray \241 程序有非法字符,如空格,引号等,一般因为从别的地方粘贴导致这个错误.
- caffe: compile error: Could not open or find file your path~~/resized_data/0 and a total of 2 images .
I0219 14:48:40.965386 31108 net.cpp:76] Memory required for data: 0I0219 14:48:40.965517 31108 layer ...
- Visual Studio Code compile error - launch.json must be configured...
一.在最初使用VS Code创建控制台应用时, 使用VS Code调试工具默认会跑出异常: launch: program 'launch: launch.json must be configure ...
随机推荐
- [ios][map]自定义地图标注
参考:http://blog.csdn.net/mad1989/article/details/8794762 ios 一步一步学会自定义地图吹出框(CalloutView)-->(百度地图,高 ...
- C# WPF 利用NPOI读写Excel文件
https://blog.csdn.net/a312024054/article/details/70139172 [各种样式] https://www.cnblogs.com/xwgli/archi ...
- English trip -- Phonics 2 元音字母a
xu言: 欲速则不达,如果这是你生命中最后一天.你还愿意花这么多精力继续坚持你现在做的事吗?如果答案是否定的,那么你需要改变了! What makes a word? 单词构成 Word 单词: ...
- 第五章 [BX]和loop指令
5.1 [bx] [bx]是什么 和 [0] 有些类似,[0] 表示内存单元,它的偏移地址是 0. 例如: mov ax, [0] 内存以字节为单位:ax以字(16bit = 2Byte)为单位:al ...
- codeforces 484b//Maximum Value// Codeforces Round #276(Div. 1)
题意:给一个数组,求其中任取2个元素,大的模小的结果最大值. 一个数x,它的倍数-1(即kx-1),模x的值是最大的,然后kx-2,kx-3模x递减.那么lower_bound(kx)的前一个就是最优 ...
- Confluence 6 LDAP 成员结构设置
用户组成员属性(Group Members Attribute) 这个属性字段将在载入用户组成员的时候使用.例如: member 用户成员属性(User Membership Attribute) 这 ...
- Confluence 6 设置公共访问
你可以通过为匿名用户启用 'Use Confluence' 权限来启用匿名用户的站点访问(也称为公共访问) 一个匿名用户的定义为一个不需要登录就可以访问 Confluence 站点.使用 Conflu ...
- 『cs231n』绪论
笔记链接 cs231n系列所有图片笔记均拷贝自网络,链接如上,特此声明,后篇不再重复. 计算机视觉历史 总结出视觉两个重要结论:1.基础的视觉神经识别的是简单的边缘&轮廓2.视觉是分层的 数据 ...
- csp公共钥匙盒
1.公共钥匙盒 问题描述 有一个学校的老师共用N个教室,按照规定,所有的钥匙都必须放在公共钥匙盒里,老师不能带钥匙回家.每次老师上课前,都从公共钥匙盒里找到自己上课的教室的钥匙去开门,上完课后,再将钥 ...
- Leetcode 115
Ø r a b b b i t Ø r a b b i t class Solution { public: int numDistinct(string s, string t) { ; ; int ...