Skip to content

OneRT x86 build

Jang Jiseob edited this page Feb 23, 2022 · 2 revisions
$ sudo apt-get install libboost-all-dev libhdf5-dev
$ pip install numpy
$ cp Makefile.template Makefile
$ make all

Problem Solving

Not Found Boost library

problem

$ make all
NNFW_WORKSPACE="/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug" NNFW_INSTALL_PREFIX=/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/out ./nnfw configure \
        -DCMAKE_BUILD_TYPE=debug \
        -DNNFW_OVERLAY_DIR=/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay \
        -DEXTERNALS_BUILD_THREADS=8 \
         -DENABLE_COVERAGE=OFF
-- Building for x86-64 Linux
-- GCC version higher than 6.0
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Check ARM Compute library extension build: need ARM Compute library
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR log program_options
  filesystem system) (Required is at least version "1.58.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args)
  /home/jiseob.jang/git/ragmani/ONE/infra/nnfw/cmake/packages/BoostConfig.cmake:83 (find_package)
  /home/jiseob.jang/git/ragmani/ONE/infra/nnfw/CMakeLists.txt:44 (find_package)
  /home/jiseob.jang/git/ragmani/ONE/runtime/contrib/logging/CMakeLists.txt:7 (nnfw_find_package)


CMake Error at /home/jiseob.jang/git/ragmani/ONE/infra/nnfw/CMakeLists.txt:44 (find_package):
  Found package configuration file:

    /home/jiseob.jang/git/ragmani/ONE/infra/nnfw/cmake/packages/BoostConfig.cmake

  but it set Boost_FOUND to FALSE so package "Boost" is considered to be NOT
  FOUND.
Call Stack (most recent call first):
  /home/jiseob.jang/git/ragmani/ONE/runtime/contrib/logging/CMakeLists.txt:7 (nnfw_find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/obj/CMakeFiles/CMakeOutput.log".
See also "/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/obj/CMakeFiles/CMakeError.log".
make: *** [Makefile:141: configure_internal] Error 1
$ sudo add-apt-repository ppa:mhier/libboost-latest
$ sudo apt-get update
$ sudo apt-get libboost-all-dev

Not Found HDF5

problem

$ make all
NNFW_WORKSPACE="/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug" NNFW_INSTALL_PREFIX=/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/out ./nnfw configure \
	-DCMAKE_BUILD_TYPE=debug \
	-DNNFW_OVERLAY_DIR=/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay \
	-DEXTERNALS_BUILD_THREADS=8 \
	 -DENABLE_COVERAGE=OFF
-- Building for x86-64 Linux
-- GCC version higher than 6.0
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Check ARM Compute library extension build: need ARM Compute library
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Search acl in /home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/overlay/lib
-- Opencl_Headers: Source not found
CMake Warning at /home/jiseob.jang/git/ragmani/ONE/tests/tools/nnpackage_run/CMakeLists.txt:29 (message):
  HDF5 NOT found.  Install libhdf5-dev or set EXT_HDF5_DIR to support
  load/dump in nnpackage_run.
...

solve

$ sudo apt install libhdf5-dev

No module named 'numpy'

problem

...
Traceback (most recent call last):
  File "/home/jiseob.jang/git/ragmani/ONE/tests/nnapi/nnapi_test_generator/android-10/cts_generator.py", line 36, in <module>
    import test_generator as tg
  File "/home/jiseob.jang/git/ragmani/ONE/tests/nnapi/nnapi_test_generator/android-10/test_generator.py", line 39, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
make[3]: *** [tests/nnapi/CMakeFiles/generate-runtime-nnapi-tests.dir/build.make:852: /home/jiseob.jang/git/ragmani/ONE/tests/nnapi/src/generated/all_generated_V1_2_cts_tests.cpp] Error 1
make[3]: Leaving directory '/home/jiseob.jang/git/ragmani/ONE/Product/x86_64-linux.debug/obj'
make[2]: *** [CMakeFiles/Makefile2:5247: tests/nnapi/CMakeFiles/generate-runtime-nnapi-tests.dir/all] Error 2
...

solve

$ pip install numpy

Clone this wiki locally