Problem with QT+ Opencv + TX2 Compilation

I am currently developing applications using QT+ Opencv + TX2。
The compile error shows as below:

/home/michael/Documents/TX2COMPILE/sysroot/lib/aarch64-linux-gnu/ undefined reference to `__close_nocancel@GLIBC_PRIVATE'
/home/michael/Documents/TX2COMPILE/sysroot/usr/local/lib/ undefined reference to `logf@GLIBC_2.27'

I have looked at many cases where the version of glibc referenced by GCC is inconsistent with TX2.
TX2 was compiled at version 2.27 of glibc.
Official recommended compiler chain gcc-linaro-7.3-2018.05.tar version of glibc is 2.25.
Are there any other GCC cross-build toolchains or upgraded versions available?

Thanks,I fixed this problem.

Thanks for the update, are you willing to share what the cause is?

Sure, This problem is caused by different versions of glibc.
This version difference refers to the glibc version referenced by the cross-editing tool and the glibc version used when compiling Opencv.This is independent of the glibc version of the host PC.
L4T 32.6.1 uses version 2.27 of Glibc.gcc-linaro-7.3-2018.05.tar version of glibc is 2.25.
Make them version consistent.There are two ways to solve this problem:
1、You can lower the glibc version on TX2 and recompile Opencv.
2、Upgrade the version of glibc used by the cross-compilation tool chain
In my use case,I copied the path of /lib/aarch64-linux-gnu all files in the TX2 to the cross-compile chain reference library path:…/…/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/lib .

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.