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.15k stars 307 forks source link

Armnn 21.08 fails to build with glibc 2.34 #581

Closed ggardet closed 2 years ago

ggardet commented 2 years ago

Armnn 21.08 fails to build with glibc 2.34:

[ 1125s] /usr/bin/c++ -DARMNNREF_ENABLED -DARMNN_SERIALIZER -DARMNN_SERIALIZER_SCHEMA_PATH=\"/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnnSerializer/ArmnnSchema.fbs\" -DARMNN_TF_LITE_PARSER -DDYNAMIC_BACKEND_BUILD_DIR=\"/home/abuild/rpmbuild/BUILD/armnn-21.08/build\" -DWITH_VALGRIND=1 -I/home/abuild/rpmbuild/BUILD/armnn-21.08/include -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnn -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnnUtils -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/profiling -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling/server/src/basePipeServer -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling/common/include -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling/server/include/timelineDecoder -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/timelineDecoder -I/home/abuild/rpmbuild/BUILD/armnn-21.08/tests/profiling/gatordmock -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test -isystem /home/abuild/rpmbuild/BUILD/armnn-21.08/third-party -isystem /usr/include/tensorflow/lite/schema -isystem /home/abuild/rpmbuild/BUILD/armnn-21.08/build/src/armnnSerializer -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -g -pthread  -Wno-error=stringop-overread -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=deprecated-copy -Wno-error=deprecated-declarations -Wno-error=implicit-fallthrough -Wno-error=unused-parameter -std=c++14 -Wall -Wextra -Werror -Wold-style-cast -Wno-missing-braces -Wconversion -Wsign-conversion -O2 -g  -fPIE -MD -MT CMakeFiles/UnitTests.dir/src/armnn/test/UnitTests.cpp.o -MF CMakeFiles/UnitTests.dir/src/armnn/test/UnitTests.cpp.o.d -o CMakeFiles/UnitTests.dir/src/armnn/test/UnitTests.cpp.o -c /home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnn/test/UnitTests.cpp
[ 1125s] In file included from /home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnn/test/UnitTests.cpp:9:
[ 1125s] /home/abuild/rpmbuild/BUILD/armnn-21.08/third-party/doctest/doctest.h:4032:47: error: size of array 'altStackMem' is not an integral constant-expression
[ 1125s]  4032 |         static char             altStackMem[4 * SIGSTKSZ];
[ 1125s]       |                                               ^
[ 1125s] make[2]: *** [CMakeFiles/UnitTests.dir/build.make:714: CMakeFiles/UnitTests.dir/src/armnn/test/UnitTests.cpp.o] Error 1

This has been fixed in upstream doctest: https://github.com/onqtam/doctest/issues/473 https://github.com/onqtam/doctest/commit/099d5414e97244ec44cf46b14cd176b3a3dc52e3

So, likely just a matter of updating the local copy.

ggardet commented 2 years ago

If I update doctest/doctest.h to version 2.4.6, I get the following error:

[  141s] [ 16%] Building CXX object src/backends/backendsCommon/test/CMakeFiles/armnnBackendsCommonUnitTests.dir/DynamicBackendTests.cpp.o
[  141s] cd /home/abuild/rpmbuild/BUILD/armnn-21.08/build/src/backends/backendsCommon/test && /usr/bin/c++ -DARMCOMPUTECL_ENABLED -DARMNNREF_ENABLED -DARMNN_SERIALIZER -DARMNN_SERIALIZER_SCHEMA_PATH=\"/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnnSerializer/ArmnnSchema.fbs\" -DARMNN_TF_LITE_PARSER -DDYNAMIC_BACKEND_BUILD_DIR=\"/home/abuild/rpmbuild/BUILD/armnn-21.08/build\" -I/home/abuild/rpmbuild/BUILD/armnn-21.08/include -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnn -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/armnnUtils -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends -I/home/abuild/rpmbuild/BUILD/armnn-21.08/src/profiling -I/home/abuild/rpmbuild/BUILD/armnn-21.08/profiling/common/include -isystem /home/abuild/rpmbuild/BUILD/armnn-21.08/third-party -isystem /usr/include/half -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -pthread  -Wno-error=stringop-overread -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=deprecated-copy -Wno-error=deprecated-declarations -Wno-error=implicit-fallthrough -Wno-error=unused-parameter -std=c++14 -Wall -Wextra -Werror -Wold-style-cast -Wno-missing-braces -Wconversion -Wsign-conversion -O2 -g  -fPIC -MD -MT src/backends/backendsCommon/test/CMakeFiles/armnnBackendsCommonUnitTests.dir/DynamicBackendTests.cpp.o -MF CMakeFiles/armnnBackendsCommonUnitTests.dir/DynamicBackendTests.cpp.o.d -o CMakeFiles/armnnBackendsCommonUnitTests.dir/DynamicBackendTests.cpp.o -c /home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test/DynamicBackendTests.cpp
[  141s] In file included from /home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test/DynamicBackendTests.hpp:21,
[  141s]                  from /home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test/DynamicBackendTests.cpp:6:
[  141s] /home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test/DynamicBackendTests.hpp: In lambda function:
[  141s] /home/abuild/rpmbuild/BUILD/armnn-21.08/src/backends/backendsCommon/test/DynamicBackendTests.hpp:149:69: error: no match for 'operator+' (operand types are 'doctest::detail::MessageBuilder' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
[  141s]   149 |                     "Base path for shared objects does not exist: " + sharedObjectPath.string());
[  141s]       |                                                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
[  141s]       |                                                                                              |
[  141s]       |                                                                                              std::string {aka std::__cxx11::basic_string<char>}
Colm-in-Arm commented 2 years ago

Hi @ggardet

The update to 2.4.6 is in progress: https://review.mlplatform.org/c/ml/armnn/+/6331

Colm.

ggardet commented 2 years ago

The update to 2.4.6 is in progress: https://review.mlplatform.org/c/ml/armnn/+/6331

I will give it a try, thanks!

ggardet commented 2 years ago

It applies properly, but I still get the error mentioned above https://github.com/ARM-software/armnn/issues/581#issuecomment-925549011

janeil01 commented 2 years ago

Hey @ggardet the patch is now merged into master if you would like to give it another go

ggardet commented 2 years ago

Commits 13d2e0d and 4ec6d42 rebased for 21.08 fixed the build with glibc 2.34.