Closed saswat0 closed 2 years ago
Hi @saswat0,
Could you please share the versions of the ArmNN and ACL you are building? Also could you confirm that "FLATBUFFERS_ROOT=$BASEDIR/flatbuffers" exist?
I can see in the cmake log that Boost is still there, but it is now removed from Arm NN completely on v21.08.
Best Regards, Sadik
For both armnn and ACL, I'm in the master branch. So I guess I'm in the latest version for both of these
I had indeed used a wrong path for flatbuffers. I renamed the folder and re-ran the following snippet
cmake .. -DARMCOMPUTE_ROOT=$BASEDIR/ComputeLibrary -DARMCOMPUTE_BUILD_DIR=$BASEDIR/ComputeLibrary/build -DTF_GENERATED_SOURCES=$BASEDIR/protobuf-host -DBUILD_TF_LITE_PARSER=1 -DTF_LITE_GENERATED_PATH=$BASEDIR/tensorflow/tensorflow/lite/schema -DFLATBUFFERS_ROOT=$BASEDIR/flatbuffers -DFLATC_DIR=$BASEDIR/flatbuffers/build -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMNNREF=1
But now I'm facing this error
-- Flatbuffers headers are located at: /home/khadas/armnn-dist/flatbuffers-1.12.0/include
-- Flatbuffers library located at: FLATBUFFERS_LIBRARY-NOTFOUND
-- Tf Lite generated header found at: /home/khadas/armnn-dist/tensorflow/tensorflow/lite/schema
-- Flatbuffers headers are located at: /home/khadas/armnn-dist/flatbuffers-1.12.0/include
-- Flatbuffers library located at: FLATBUFFERS_LIBRARY-NOTFOUND
-- Armnn Serializer support is disabled
-- PyArmNN wheel package is disabled
-- PyArmNN source package is disabled
-- TENSORFLOW_ROOT: /home/khadas/armnn-dist/armnn/../tensorflow
-- Including backend common library into the build: /home/khadas/armnn-dist/armnn/src/backends/aclCommon/common.cmake
-- Including backend common library into the build: /home/khadas/armnn-dist/armnn/src/backends/backendsCommon/common.cmake
-- Including backend into the build: /home/khadas/armnn-dist/armnn/src/backends/cl/backend.cmake
-- Including backend into the build: /home/khadas/armnn-dist/armnn/src/backends/neon/backend.cmake
-- Including backend into the build: /home/khadas/armnn-dist/armnn/src/backends/reference/backend.cmake
-- Adding object library dependency to armnn: armnnAclCommon
-- Adding object library dependency to armnn: armnnBackendsCommon
-- Adding object library dependency to armnn: armnnMemoryOptimizationStrategies
-- Adding object library dependency to armnn: armnnClBackend
-- Adding object library dependency to armnn: armnnClBackendWorkloads
-- Adding object library dependency to armnn: armnnNeonBackend
-- Adding object library dependency to armnn: armnnNeonBackendWorkloads
-- Adding object library dependency to armnn: armnnRefBackend
-- Adding object library dependency to armnn: armnnRefBackendWorkloads
-- Adding object library dependency to UnitTests: armnnAclCommonUnitTests
-- Adding object library dependency to UnitTests: armnnBackendsCommonUnitTests
-- Adding object library dependency to UnitTests: armnnMemoryOptimizationStrategiesUnitTests
-- Adding object library dependency to UnitTests: armnnClBackendUnitTests
-- Adding object library dependency to UnitTests: armnnNeonBackendUnitTests
-- Adding object library dependency to UnitTests: armnnRefBackendUnitTests
-- CMAKE_CURRENT_LIST_DIR /home/khadas/armnn-dist/armnn
-- CMAKE_CURRENT_BINARY_DIR /home/khadas/armnn-dist/armnn/build
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FLATBUFFERS_LIBRARY_DEBUG
linked by target "armnnTfLiteParser" in directory /home/khadas/armnn-dist/armnn/src/armnnTfLiteParser
FLATBUFFERS_LIBRARY_RELEASE
linked by target "armnnTfLiteParser" in directory /home/khadas/armnn-dist/armnn/src/armnnTfLiteParser
-- Configuring incomplete, errors occurred!
See also "/home/khadas/armnn-dist/armnn/build/CMakeFiles/CMakeOutput.log".
See also "/home/khadas/armnn-dist/armnn/build/CMakeFiles/CMakeError.log".
Attaching cmake log files for better clarity CMakeError.log CMakeOutput.log
Hi @saswat0,
It seems like it cannot find the Flatbuffers library, there might be a problem with Flatbuffer installation. Could you print out the "FLATBUFFERS_INCLUDE_PATH" and "FLATBUFFERS_LIBRARY"? If they return no paths, it confirms that Flatbuffers is not installed correctly.
Best Regards, Sadik
It turns out that flatbuffers was indeed not in path. I tried to echo the above two env variables but got empty strings
I followed the official guide to build flatbuffers. These are the steps I followed:
$ mkdir build
$ cd build
$ CXXFLAGS="-fPIC" cmake .. -DFLATBUFFERS_BUILD_FLATC=1 -DCMAKE_INSTALL_PREFIX:PATH=$BASEDIR/flatbuffers
And here's the output:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for strtof_l
-- Looking for strtof_l - found
-- Looking for strtoull_l
-- Looking for strtoull_l - found
-- `tests/monster_test.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `tests/monster_test.fbs`: add generation of binary (.bfbs) schema
-- `tests/namespace_test/namespace_test1.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `tests/namespace_test/namespace_test2.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `tests/union_vector/union_vector.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `tests/native_type_test.fbs`: add generation of C++ code with ''
-- `tests/arrays_test.fbs`: add generation of C++ code with '--scoped-enums;--gen-compare'
-- `tests/arrays_test.fbs`: add generation of binary (.bfbs) schema
-- `tests/monster_test.fbs`: add generation of C++ embedded binary schema code with '--no-includes;--gen-compare'
-- `tests/monster_extra.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `samples/monster.fbs`: add generation of C++ code with '--no-includes;--gen-compare'
-- `samples/monster.fbs`: add generation of binary (.bfbs) schema
fatal: not a git repository (or any of the parent directories): .git
-- Configuring done
-- Generating done
-- Build files have been written to: /home/khadas/armnn-dist/flatbuffers/build
It returns a fatal error but runs fine when I run make
after it
Here's the output when I try running make (no errors on console)
Scanning dependencies of target flatbuffers
[ 1%] Building CXX object CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o
[ 2%] Building CXX object CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o
[ 3%] Building CXX object CMakeFiles/flatbuffers.dir/src/reflection.cpp.o
[ 4%] Building CXX object CMakeFiles/flatbuffers.dir/src/util.cpp.o
[ 5%] Linking CXX static library libflatbuffers.a
[ 5%] Built target flatbuffers
Scanning dependencies of target flatc
[ 7%] Building CXX object CMakeFiles/flatc.dir/src/idl_parser.cpp.o
[ 8%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_text.cpp.o
[ 9%] Building CXX object CMakeFiles/flatc.dir/src/reflection.cpp.o
[ 10%] Building CXX object CMakeFiles/flatc.dir/src/util.cpp.o
[ 11%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_cpp.cpp.o
[ 12%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_csharp.cpp.o
[ 14%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_dart.cpp.o
[ 15%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_kotlin.cpp.o
[ 16%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_go.cpp.o
[ 17%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_java.cpp.o
[ 18%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_js_ts.cpp.o
[ 20%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_php.cpp.o
[ 21%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_python.cpp.o
[ 22%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_lobster.cpp.o
[ 23%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_lua.cpp.o
[ 24%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_rust.cpp.o
[ 25%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_fbs.cpp.o
[ 27%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_grpc.cpp.o
[ 28%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_json_schema.cpp.o
[ 29%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_swift.cpp.o
[ 30%] Building CXX object CMakeFiles/flatc.dir/src/flatc.cpp.o
[ 31%] Building CXX object CMakeFiles/flatc.dir/src/flatc_main.cpp.o
[ 32%] Building CXX object CMakeFiles/flatc.dir/src/code_generators.cpp.o
[ 34%] Building CXX object CMakeFiles/flatc.dir/grpc/src/compiler/cpp_generator.cc.o
[ 35%] Building CXX object CMakeFiles/flatc.dir/grpc/src/compiler/go_generator.cc.o
[ 36%] Building CXX object CMakeFiles/flatc.dir/grpc/src/compiler/java_generator.cc.o
[ 37%] Building CXX object CMakeFiles/flatc.dir/grpc/src/compiler/python_generator.cc.o
[ 38%] Building CXX object CMakeFiles/flatc.dir/grpc/src/compiler/swift_generator.cc.o
[ 40%] Linking CXX executable flatc
[ 40%] Built target flatc
Scanning dependencies of target generated_code
[ 41%] Run generation: 'tests/monster_test_generated.h'
[ 42%] Run generation: 'tests/namespace_test/namespace_test1_generated.h'
[ 43%] Run generation: 'tests/namespace_test/namespace_test2_generated.h'
[ 44%] Run generation: 'tests/union_vector/union_vector_generated.h'
[ 45%] Run generation: 'tests/native_type_test_generated.h'
[ 47%] Run generation: 'tests/arrays_test_generated.h'
[ 48%] Run generation: 'tests/monster_test_bfbs_generated.h'
[ 49%] Run generation: 'tests/monster_extra_generated.h'
[ 50%] Run generation: 'samples/monster_generated.h'
[ 51%] All generated files were updated.
[ 52%] Run generation: 'tests/monster_test.bfbs'
[ 54%] Run generation: 'tests/arrays_test.bfbs'
[ 55%] Run generation: 'samples/monster.bfbs'
[ 55%] Built target generated_code
Scanning dependencies of target flatsamplebfbs
[ 56%] Building CXX object CMakeFiles/flatsamplebfbs.dir/src/idl_parser.cpp.o
[ 57%] Building CXX object CMakeFiles/flatsamplebfbs.dir/src/idl_gen_text.cpp.o
[ 58%] Building CXX object CMakeFiles/flatsamplebfbs.dir/src/reflection.cpp.o
[ 60%] Building CXX object CMakeFiles/flatsamplebfbs.dir/src/util.cpp.o
[ 61%] Building CXX object CMakeFiles/flatsamplebfbs.dir/samples/sample_bfbs.cpp.o
[ 62%] Linking CXX executable flatsamplebfbs
[ 63%] Built target flatsamplebfbs
Scanning dependencies of target flatsampletext
[ 64%] Building CXX object CMakeFiles/flatsampletext.dir/src/idl_parser.cpp.o
[ 65%] Building CXX object CMakeFiles/flatsampletext.dir/src/idl_gen_text.cpp.o
[ 67%] Building CXX object CMakeFiles/flatsampletext.dir/src/reflection.cpp.o
[ 68%] Building CXX object CMakeFiles/flatsampletext.dir/src/util.cpp.o
[ 69%] Building CXX object CMakeFiles/flatsampletext.dir/samples/sample_text.cpp.o
[ 70%] Linking CXX executable flatsampletext
[ 71%] Built target flatsampletext
Scanning dependencies of target flathash
[ 72%] Building CXX object CMakeFiles/flathash.dir/src/flathash.cpp.o
[ 74%] Linking CXX executable flathash
[ 74%] Built target flathash
Scanning dependencies of target flatsamplebinary
[ 75%] Building CXX object CMakeFiles/flatsamplebinary.dir/samples/sample_binary.cpp.o
[ 76%] Linking CXX executable flatsamplebinary
[ 77%] Built target flatsamplebinary
Scanning dependencies of target flattests
[ 78%] Building CXX object CMakeFiles/flattests.dir/src/idl_parser.cpp.o
[ 80%] Building CXX object CMakeFiles/flattests.dir/src/idl_gen_text.cpp.o
[ 81%] Building CXX object CMakeFiles/flattests.dir/src/reflection.cpp.o
[ 82%] Building CXX object CMakeFiles/flattests.dir/src/util.cpp.o
[ 83%] Building CXX object CMakeFiles/flattests.dir/src/idl_gen_fbs.cpp.o
[ 84%] Building CXX object CMakeFiles/flattests.dir/tests/test.cpp.o
[ 85%] Building CXX object CMakeFiles/flattests.dir/tests/test_assert.cpp.o
[ 87%] Building CXX object CMakeFiles/flattests.dir/tests/test_builder.cpp.o
[ 88%] Building CXX object CMakeFiles/flattests.dir/tests/native_type_test_impl.cpp.o
[ 89%] Building CXX object CMakeFiles/flattests.dir/src/code_generators.cpp.o
[ 90%] Linking CXX executable flattests
[100%] Built target flattests
Closing this issue as the official guide misses make install
after the build stage. Hence the built files weren't placed in the necessary path
You're correct, that is an error in our guide. Thank you for reporting this.
James
I'm following this guide to build armnn after compiling protobuf and flatbuffers. I'm running the following
And here's the error that I'm facing:
Full trace of errors