ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.14k stars 307 forks source link

Building ARM NN via Docker approach with specific GLIBC , GLIBCXX versions ... #754

Closed terablade2001 closed 5 months ago

terablade2001 commented 5 months ago

Hi. I have the following problem.

I build ARM-NN via Docker for aarch64, as described in documentation. Then I tried to link with over a target sysroot via cross compiling and got errors like the following ones:

libarmnn.so.33: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
libarmnn.so.33: undefined reference to `exp@GLIBC_2.29'

The sysroot seems to have just previous such versions:

To my understanding, if I am correct, the build via the Docker seems to use different GLIBC, GLIBCXX versions that the ones the target sysroot has. Thus I want to actually build again the ARM NN via the Docker but with the specified GLIB, GLIBCXX versions. Is there any what to achieve this (for example, by adding somewhow these specifications in the Dockerfile)?

Ps. I am already have spotted #353 issue for possible alternative workarounds, but because it's a bit old, I ask if currently there is an easier way to address such issues, and especially directly from the docker build.

Thank you

tracyn-arm commented 5 months ago

Hi. Not sure if I fully understand your question but the common.sh script of build-tool forces the Arm NN aarch64 compiler: AARCH64_COMPILER_FLAGS+="CC=/usr/bin/aarch64-linux-gnu-gcc CXX=/usr/bin/aarch64-linux-gnu-g++ " Possibly the source of your symbol mismatch if multiple compilers end up being used. Thanks.

MatthewARM commented 5 months ago

The build-tool builds for Ubuntu 20.04... I would say if you're going to be building and deploying to something older than that, or not similar to Ubuntu, you'll either need to modify the build-tool scripts or build directly using cmake.

terablade2001 commented 5 months ago

Thanks for the quick replies. I think my case is of "building and deploying to something older than, or not similar to, Ubuntu 20.04". From what I now understand, I probably have to edit the shell scripts at build-tool/scripts/ properly (or use them as a guide) thus to build the recent ARM NN with the target's cross-compilation tools. Thanks.