dschanoeh / socketcand

A deprecated fork of socketcand. Please got to linux-can for the latest version.
https://github.com/linux-can/socketcand
131 stars 40 forks source link

make: error: Compilation error in ARM processor #24

Open GajalakshmiSenthil opened 5 years ago

GajalakshmiSenthil commented 5 years ago

Hi All,

Tried to compile socketcand for ARM processor, used cross compilation, added below lines in Makefile CROSS_COMPILE = arm-linux-gnueabihf- ccache $(CROSS_COMPILE)gcc

Compilation is not successful, got the following error, duser@169.254.240.122:~/socketcandFolder/sock utils/socketcand/socketcand-master$ make ccache arm-none-linux-gnueabi-gcc -Wall -Wno-parentheses -DPF_CAN=29 -DAF_CAN=PF_CAN -DHAVE_CONFIG_H -I . -I ./include -o socketcand ./socketcand.c ./statistics.c ./beacon.c ./state_bcm.c ./state_raw.c ./state_isotp.c ./state_control.c -lpthread -lconfig ./socketcand.c:68:23: error: libconfig.h: No such file or directory ./socketcand.c: In function 'main': ./socketcand.c:177: error: 'config_t' undeclared (first use in this function) ./socketcand.c:177: error: (Each undeclared identifier is reported only once ./socketcand.c:177: error: for each function it appears in.) ./socketcand.c:177: error: expected ';' before 'config' ./socketcand.c:192: warning: implicit declaration of function 'config_init' ./socketcand.c:192: error: 'config' undeclared (first use in this function) ./socketcand.c:193: error: 'CONFIG_TRUE' undeclared (first use in this function) ./socketcand.c:193: warning: implicit declaration of function 'config_read_file' ./socketcand.c:194: warning: implicit declaration of function 'config_lookup_int' ./socketcand.c:195: warning: implicit declaration of function 'config_lookup_string' make: *** [socketcand] Error 1 duser@169.254.240.122:~/socketcandFolder/sock utils/socketcand/socketcand-master$

Looking forward to solve this issue.

Best Regards, Gajalakshmi

yegorich commented 5 years ago

Try ./configure --without-config or cross-compile libconfig first. Another alternative would be to use buildroot to create your custom root file system.

yegorich commented 5 years ago

@dschanoeh I think, this issue can be closed.

qianfan-Zhao commented 5 years ago

Here is my solution:

./configure --without-config
make CC=arm-none-linux-gnueabi-gcc