socketcand
socketcand copied to clipboard
make: error: Compilation error in ARM processor
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, [email protected]:~/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 [email protected]:~/socketcandFolder/sock utils/socketcand/socketcand-master$
Looking forward to solve this issue.
Best Regards, Gajalakshmi
Try ./configure --without-config
or cross-compile libconfig first. Another alternative would be to use buildroot to create your custom root file system.
@dschanoeh I think, this issue can be closed.
Here is my solution:
./configure --without-config
make CC=arm-none-linux-gnueabi-gcc