We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I cross-built the TensorFlow Lite C API shared library `libtensorflowlite_c.so`: my host machine was Linux Ubuntu `x86 64`, and I built the library for Arm `aarch64` target using the latest toolchain: `gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz`.
Then I went to the Arm `aarch64` Ubuntu machine (20.02), and tried to link the library with a test program.
But I got a bunch of "undefined references" to GLIBC:```/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `fstat@GLIBC_2.33'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `__libc_single_threaded@GLIBC_2.32'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `pthread_join@GLIBC_2.34'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `dlsym@GLIBC_2.34'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `stat@GLIBC_2.33'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `dlopen@GLIBC_2.34'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `pthread_once@GLIBC_2.34'/usr/bin/ld: /home/joedoe/git/myproj/subprojects/tensorflow/mycom/binaries/aarch64/libtensorflowlite_c.so: undefined reference to `pthread_create@GLIBC_2.34'```
The `ldd --version` on the target Arm machine gives me: `Ubuntu GLIBC 2.31`.
I went back to the toolchain and executed the GLIBC from the toolchain `aarch64-none-linux-gnu/libc/lib64/libc.so.6`, and I got `GNU C Library (GNU) stable release version 2.34`.So, the toolchain built my library using glibc 2.34, and I am trying to run it on the Arm machine with older 2.31 GLIBC?
I tried to use older toolchain from developer.arm.com/.../downloads, however, I didn't even find the `libc.so.6` at all in those packages.Another option is to update Arm Ubuntu OS to version 21 (which uses GLIBC 2.34), but updating OS isn't a good solution. I'd rather downgrade the toolchain.
Can anyone help? How to use downgraded GLIBC?