Problem(s) to cross-compile to armhf
Hi!
I'm trying to cross-compile from x86_64 to armhf, following these instructions, but I can't get it to work.
I have installed all dependencies and also crossbuild-essential-armhf
.
My configure line:
/home/user/lely-core/build $ ../configure --host=arm-linux-gnueabihf --disable-python --prefix=/home/user/lely-core/install
I noticed it does find bluetooth/bluetooth.h
and bluetooth/rfcomm.h
.
It does not find a library containing str2ba
.
When I run make, I have problems because of str2ba
and ba2str
:
...
make[2]: Entering directory '/home/user/lely-core/build/tools'
CC can2udp.o
CC coctl.o
CC cocat.o
CC cocatd.o
CC dcf2c.o
CCLD dcf2c
CCLD can2udp
CCLD cocatd
CCLD cocat
CCLD coctl
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `str2ba'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `ba2str'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:556: can2udp] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `str2ba'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `ba2str'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:564: cocatd] Error 1
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `str2ba'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `ba2str'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:560: cocat] Error 1
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `str2ba'
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: ../src/io/.libs/liblely-io.so: undefined reference to `ba2str'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:568: coctl] Error 1
make[2]: Leaving directory '/home/user/lely-core/build/tools'
make[1]: *** [Makefile:470: all-recursive] Error 1
make[1]: Leaving directory '/home/grilo/lely-core/build'
make: *** [Makefile:398: all] Error 2
I can get rid of this problem by editing config.h
and undefining the bluetooth related lines:
...
/* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
#undef HAVE_BLUETOOTH_BLUETOOTH_H
/* Define to 1 if you have the <bluetooth/rfcomm.h> header file. */
#undef HAVE_BLUETOOTH_RFCOMM_H
...
But then I get stuck here:
make[2]: Entering directory '/media/grilo/Data/Git/lely-core/build/tools'
CC can2udp.o
CCLD can2udp
CC coctl.o
CCLD coctl
CC cocat.o
CCLD cocat
CC cocatd.o
CCLD cocatd
CC dcf2c.o
CCLD dcf2c
make[2]: Leaving directory '/media/grilo/Data/Git/lely-core/build/tools'
Making all in test
make[2]: Entering directory '/media/grilo/Data/Git/lely-core/build/test'
/bin/bash ../exec-wrapper.sh ../tools/dcf2c ../../test/co-sdev.dcf test_co_sdev -o test-co-sdev.h
/media/grilo/Data/Git/lely-core/build/tools/.libs/dcf2c: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
make[2]: *** [Makefile:1915: test-co-sdev.h] Error 127
make[2]: Leaving directory '/media/grilo/Data/Git/lely-core/build/test'
make[1]: *** [Makefile:470: all-recursive] Error 1
make[1]: Leaving directory '/media/grilo/Data/Git/lely-core/build'
make: *** [Makefile:398: all] Error 2
Does someone have some advice?
Thanks!