如何解决此错误 - 在编译socketcan实用程序时

时间:2013-10-06 02:40:49

标签: linux can-bus socketcan

我已从SVN下载了实用工具。因为默认情况下,utitlities不在内核中。

svn checkout svn://svn.berlios.de/socketcan/trunk/can-utils

我正在使用的内核是: -

ignite@ignite:~/socketcan/can-utils$ uname -a
Linux ignite 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux

然后我重新编译了这些功能。这是错误isotp.h未找到:---

ignite@ignite:~/socketcan/can-utils$ make all
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN    isotprecv.c   -o isotprecv
isotprecv.c:60:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotprecv] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN    isotpsend.c   -o isotpsend
isotpsend.c:60:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpsend] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN    isotpsniffer.c   -o isotpsniffer
isotpsniffer.c:61:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpsniffer] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN    isotptun.c   -o isotptun
isotptun.c:69:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotptun] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN    isotpserver.c   -o isotpserver
isotpserver.c:80:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpserver] Error 1
make: Target `all' not remade because of errors.

1 个答案:

答案 0 :(得分:4)

克隆最新的can-utils存储库:

git clone https://github.com/linux-can/can-utils.git
cd can-utils
./autogen.sh
./configure
make
make install