-
-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Hi Abhishek,
i am trying to crosscompile a small example libusb example for Raspberry PI OS 64 Bit (Debian 10 / Buster).
The example is basically [testlibusb.c][https://github.com/libusb/libusb/blob/v1.0.22/examples/testlibusb.c] from libusb version 1.0.22 (which is also installed in Raspberry PI OS Buster).
To crosscompile I downloaded "Raspberry Pi GCC 64-Bit Cross-Compiler Toolchains" for gcc 8.3.0, link
Besides other libs I need to fetch the aarch64 libusb from raspberry PI to a local folder, here "rootfs_part".
The problem I run into is that the libusb from Debian Buster is linked to glibc 2.28, the version Buster is build with, but the toolchain I downloaded is built with 2.24:
/opt/sdk/cross-pi-gcc-8.3.0-64/bin/aarch64-linux-gnu-gcc -rdynamic CMakeFiles/testlibusb.dir/testlibusb.c.o -o testlibusb -L/home/visglz/src/vistrrdedock10/raspi/cmake/../build/raspi_libs/rootfs_part/usr/lib/aarch64-linux-gnu -lusb-1.0 -L/home/visglz/src/vistrrdedock10/raspi/cmake/../build/raspi_libs/rootfs_part/lib/aarch64-linux-gnu -ludev
/home/visglz/src/vistrrdedock10/raspi/cmake/../build/raspi_libs/rootfs_part/lib/aarch64-linux-gnu/libudev.so: undefined reference to `getrandom@GLIBC_2.25'
/home/visglz/src/vistrrdedock10/raspi/cmake/../build/raspi_libs/rootfs_part/lib/aarch64-linux-gnu/libudev.so: undefined reference to `fcntl64@GLIBC_2.28'
/home/visglz/src/vistrrdedock10/raspi/cmake/../build/raspi_libs/rootfs_part/lib/aarch64-linux-gnu/libudev.so: undefined reference to `reallocarray@GLIBC_2.26'
$ find /opt/sdk/cross-pi-gcc-8.3.0-64 -name "libc-2*so"
/opt/sdk/cross-pi-gcc-8.3.0-64/aarch64-linux-gnu/libc/lib64/libc-2.24.so
Wouldn't it make sense to also provide a 64 Bit version with the Compiler and glibc matching for Debian Buster? I can't find such a combination in builder_64.yml
currently.
Locally I built a toolchain with the following settings:
./RTBuilder_64b -g 8.3.0 -t 2
With the resulting crosscompiler I was able to crossbuild testlibusb.c
and let run the resulting binary on the pi.
BTW: Great work you are doing with this project. 👍
Regards
Georg