再度、XIRのビルド

昨日、行ったXIRのビルド方法は間違えていたようだ。

README.txtをよむと次のようにビルドするらしい。

あいかわらず、README.txtを読めよって→自分。

$ ./cmake.sh --build-python --user

しかし、ビルドしてもエラーが発生する。

$ ./cmake.sh --build-python --user
Native-platform building...
No LSB modules are available.
No LSB modules are available.
cd /home/hidemi/build/build.Ubuntu.20.04.x86_64.Debug/xir
cmake -DBUILD_TEST=ON -DBUILD_CONTRIB=OFF -DBUILD_DOC=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_PYTHON=ON -DINSTALL_HOME=OFF -DINSTALL_USER=ON -DCMAKE_INSTALL_PREFIX=/home/hidemi/.local/Ubuntu.20.04.x86_64.Debug /home/hidemi/workspace/VitisAI/VitisAI_2020.2/Vitis-AI/tools/Vitis-AI-Runtime/VART/xir
-- Found importable target unilog::unilog: /usr/local/lib/libunilog.so.1.3.0
CMake Error at src/python/CMakeLists.txt:46 (find_package):
  By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pybind11",
  but CMake did not find one.

  Could not find a package configuration file provided by "pybind11" with any
  of the following names:

    pybind11Config.cmake
    pybind11-config.cmake

  Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
  "pybind11_DIR" to a directory containing one of the above files.  If
  "pybind11" provides a separate development package or SDK, be sure it has
  been installed.

-- Configuring incomplete, errors occurred!
See also "/home/hidemi/build/build.Ubuntu.20.04.x86_64.Debug/xir/CMakeFiles/CMakeOutput.log".
See also "/home/hidemi/build/build.Ubuntu.20.04.x86_64.Debug/xir/CMakeFiles/CMakeError.log".
``

つぎのようにpipでpybind11をインストールするも解消しない。

``
$ pip3 install pybind11
$ pip3 install pybind11_cmake

エラーでインストールすべきはこちらのほうだった。

$ sudo apt install pybind11-dev

再度、ビルド

$ ./cmake.sh --build-python --user
Native-platform building...
No LSB modules are available.
No LSB modules are available.
cd /home/hidemi/build/build.Ubuntu.20.04.x86_64.Debug/xir
cmake -DBUILD_TEST=ON -DBUILD_CONTRIB=OFF -DBUILD_DOC=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_PYTHON=ON -DINSTALL_HOME=OFF -DINSTALL_USER=ON -DCMAKE_INSTALL_PREFIX=/home/hidemi/.local/Ubuntu.20.04.x86_64.Debug /home/hidemi/workspace/Vitis-AI/tools/Vitis-AI-Runtime/VART/xir
-- Found importable target unilog::unilog: /usr/local/lib/libunilog.so.1.3.0
-- Found PythonInterp: /usr/bin/python (found version "2.7.18") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hidemi/build/build.Ubuntu.20.04.x86_64.Debug/xir
<<<ビルドステータスなので略す>>>
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/share/cmake/xir/xir-config.cmake
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/share/cmake/xir/xir-config-version.cmake
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/lib/libxir.so.1.3.0
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/lib/libxir.so.1
-- Set runtime path of "/home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/lib/libxir.so.1.3.0" to "/usr/local/lib"
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/lib/libxir.so
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/xir.h
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/op/op.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/op/op_def.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/attrs/attrs.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/attrs/attr_def.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/attrs/attr_expander.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/util/any.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/util/tool_function.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/util/data_type.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/graph/graph.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/graph/graph_template.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/graph/subgraph.hpp
-- Up-to-date: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/include/xir/tensor/tensor.hpp
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/share/cmake/xir/xir-targets.cmake
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/share/cmake/xir/xir-targets-debug.cmake
-- Installing: /home/hidemi/.local/lib/python2.7/site-packages/xir.so
-- Set runtime path of "/home/hidemi/.local/lib/python2.7/site-packages/xir.so" to "/usr/local/lib"
-- Installing: /home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/bin/xir
-- Set runtime path of "/home/hidemi/.local/Ubuntu.20.04.x86_64.Debug/bin/xir" to "/usr/local/lib"

う〜ん、python2.7のところに入ってしまった。

ひとまず、ビルドできたし次に進もう。

もし、先に進んでエラーがでたらそのとき、ここだと覚えておけばよいだろう。

write: 2021/01/26/ 23:00:00