Open jerryzhangzj opened 2 years ago
Same issue on Ubuntu 20.04 here. Some information regarding whether or not the software supports Ubuntu 20.04 would be very helpful! Thanks :)
mv -f src/.deps/testlib-testlib.Tpo src/.deps/testlib-testlib.Po
/bin/bash ../libtool --tag=CC --mode=link gcc --std=c99 -I../include -Iinclude -g -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -g -O2 -static -L.libs -L../lib/.libs -lethercat_wrapper -lethercat -o testlib src/testlib-testlib.o
../libtool: line 7577: cd: .libs: No such file or directory
libtool: error: cannot determine absolute directory name of '.libs'
make[2]: *** [Makefile:492: testlib] Error 1
make[2]: Leaving directory '/home/timomueller/Documents/Work/Emm/support/Etherlab_EtherCAT_Master/libethercat_wrapper'
make[1]: *** [Makefile:513: all-recursive] Error 1
make[1]: Leaving directory '/home/timomueller/Documents/Work/Emm/support/Etherlab_EtherCAT_Master'
make: *** [Makefile:439: all] Error 2
Compiling the code on a virtual Ubuntu 18.04 machine solved the above error, but still failed at a different point in the compilation process.
libtool: link: gcc -I../../include -Wall -g -O2 -o .libs/ec_user_example ec_user_example-main.o -L../../lib/.libs /home/virtualbox/Documents/Etherlab_EtherCAT_Master/lib/.libs/libethercat.so -Wl,-rpath -Wl,/opt/etherlab/lib
make[4]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples/user'
make[4]: Entering directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples'
make[3]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples'
make[2]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples'
make[2]: Entering directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master'
make[2]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master'
make[1]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master'
make -C "/usr/src/linux-headers-5.3.0-28-generic" M="/home/virtualbox/Documents/Etherlab_EtherCAT_Master" modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-28-generic'
CC [M] /home/virtualbox/Documents/Etherlab_EtherCAT_Master/devices/generic.o
LD [M] /home/virtualbox/Documents/Etherlab_EtherCAT_Master/devices/ec_generic.o
CC [M] /home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples/mini/mini.o
LD [M] /home/virtualbox/Documents/Etherlab_EtherCAT_Master/examples/mini/ec_mini.o
CC [M] /home/virtualbox/Documents/Etherlab_EtherCAT_Master/master/cdev.o
/home/virtualbox/Documents/Etherlab_EtherCAT_Master/master/cdev.c:93:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fault = eccdev_vma_fault
^~~~~~~~~~~~~~~~
/home/virtualbox/Documents/Etherlab_EtherCAT_Master/master/cdev.c:93:14: note: (near initialization for ‘eccdev_vm_ops.fault’)
cc1: some warnings being treated as errors
There seem to be some issues with the compilation process that need to be fixed.
Even when manually overriding the -Werror
by adding --disable-werror
to the ./configure
command in install.sh
the compilation still fails on Ubuntu 18.04
/bin/bash ../libtool --tag=CC --mode=link gcc --std=c99 -I../include -Iinclude -g -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Wno-error -static -L.libs -L../lib/.libs -lethercat_wrapper -lethercat -o testlib src/testlib-testlib.o
libtool: link: gcc --std=c99 -I../include -Iinclude -g -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Wno-error -o testlib src/testlib-testlib.o -L.libs -L../lib/.libs /home/virtualbox/Documents/Etherlab_EtherCAT_Master/libethercat_wrapper/.libs/libethercat_wrapper.a /home/virtualbox/Documents/Etherlab_EtherCAT_Master/lib/.libs/libethercat.a
src/testlib-testlib.o: In function `main':
/home/virtualbox/Documents/Etherlab_EtherCAT_Master/libethercat_wrapper/src/testlib.c:460: undefined reference to `timespec_diff'
/home/virtualbox/Documents/Etherlab_EtherCAT_Master/libethercat_wrapper/src/testlib.c:461: undefined reference to `calc_mean'
collect2: error: ld returned 1 exit status
Makefile:487: recipe for target 'testlib' failed
make[2]: *** [testlib] Error 1
make[2]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master/libethercat_wrapper'
Makefile:514: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/virtualbox/Documents/Etherlab_EtherCAT_Master'
Makefile:440: recipe for target 'all' failed
make: *** [all] Error 2
hello! I am used ubuntu20.04,when I execute cmd$ chmod +x install.sh && ./install.sh return error.please tell me how to resolve this problem?thanks!
/bin/bash ../libtool --tag=CC --mode=link gcc --std=c99 -I../include -Iinclude -g -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -g -O2 -static -L.libs -L../lib/.libs -lethercat_wrapper -lethercat -o testlib src/testlib-testlib.o
../libtool: line 7577: cd: .libs: No such file or directory libtool: error: cannot determine absolute directory name of '.libs' make[2]: [Makefile:492: testlib] Error 1 make[2]: Leaving directory '/home/zzj/Etherlab_EtherCAT_Master/libethercat_wrapper' make[1]: [Makefile:514: all-recursive] Error 1 make[1]: Leaving directory '/home/zzj/Etherlab_EtherCAT_Master' make: *** [Makefile:440: all] Error 2