Issues while installing onnx==1.6.0

I’m trying too install 0nnx1.6.0 because TensorRT 7.1 doesn’t support 0nnx1.7.0. I tried installing with pip & also building it from source. None worked.

  1. I ran pip install onnx==1.6.0
    Below is the error log:(Note: onnx_1.6 is the name of the venv I’m using)

Collecting onnx==1.6.0
Using cached https://files.pythonhosted.org/packages/81/a9/a14c3bc32908c37b46b19a89eb6185b0c90fd9c03ef12379d51940b8fc71/onnx-1.6.0.tar.gz
Requirement already satisfied: numpy in ./onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: protobuf in ./onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: six in ./onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in ./onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: setuptools in ./onnx_1.6/lib/python3.6/site-packages (from protobuf->onnx==1.6.0)
Building wheels for collected packages: onnx
Running setup.py bdist_wheel for onnx … error
Complete output from command /home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-unl0sjjr/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpj10zdsc3pip-wheel- --python-tag cp36:
fatal: not a git repository (or any of the parent directories): .git
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: -c --help [cmd1 cmd2 …]
or: -c --help-commands
or: -c cmd --help

error: invalid command ‘bdist_wheel’


Failed building wheel for onnx
Running setup.py clean for onnx
Failed to build onnx
Installing collected packages: onnx
Running setup.py install for onnx … error
Complete output from command /home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-unl0sjjr/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-c_x10j2z-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/deepedge/onnx_1.6/include/site/python3.6/onnx:
fatal: not a git repository (or any of the parent directories): .git
running install
running build
running build_py
running create_version
running cmake_build
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Protobuf: /usr/local/lib/libprotobuf.so (found version “3.13.0”)
Generated: /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Generated: /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx-operators-ml.proto
CMake Warning at CMakeLists.txt:394 (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"
  (requested version 2.2) 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.


--
-- ******** Summary ********
--   CMake version         : 3.18.2
--   CMake command         : /usr/local/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 7.5.0
--   CXX flags             :  -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   :
--   CMAKE_PREFIX_PATH     :
--   CMAKE_INSTALL_PREFIX  : /usr/local
--   CMAKE_MODULE_PATH     :
--
--   ONNX version          : 1.6.0
--   ONNX NAMESPACE        : onnx
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
--
--   Protobuf compiler     : /usr/local/bin/protoc
--   Protobuf includes     : /usr/local/include
--   Protobuf libraries    : /usr/local/lib/libprotobuf.so
--   BUILD_ONNX_PYTHON     : ON
--     Python version      :
--     Python executable   : /home/deepedge/onnx_1.6/bin/python3
--     Python includes     : /usr/include/python3.6m
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build
Scanning dependencies of target gen_onnx_proto
Scanning dependencies of target onnxifi_dummy
Scanning dependencies of target onnxifi_loader
[  1%] Running gen_proto.py on onnx/onnx.in.proto
[  4%] Building C object CMakeFiles/onnxifi_loader.dir/onnx/onnxifi_loader.c.o
[  4%] Building C object CMakeFiles/onnxifi_dummy.dir/onnx/onnxifi_dummy.c.o
/tmp/pip-build-unl0sjjr/onnx/onnx/onnxifi_dummy.c: In function ‘onnxGetExtensionFunctionAddress’:
/tmp/pip-build-unl0sjjr/onnx/onnx/onnxifi_dummy.c:173:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
           *function = &onnxGetExtensionFunctionAddress;
                     ^
/tmp/pip-build-unl0sjjr/onnx/onnx/onnxifi_dummy.c:176:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
           *function = &onnxSetIOAndRunGraph;
                     ^
[  6%] Linking C static library libonnxifi_loader.a
[  6%] Built target onnxifi_loader
Scanning dependencies of target onnxifi_wrapper
Processing /tmp/pip-build-unl0sjjr/onnx/onnx/onnx.in.proto
Writing /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Writing /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto3
generating /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx_pb.py
[  8%] Linking C shared library libonnxifi_dummy.so
[  9%] Building C object CMakeFiles/onnxifi_wrapper.dir/onnx/onnxifi_wrapper.c.o
[ 11%] Running C++ protocol buffer compiler on /tmp/pip-build-unl0sjjr/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
[ 11%] Built target onnxifi_dummy
--python_out: onnx/onnx-ml.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target 'onnx/onnx-ml.pb.cc' failed
make[2]: *** [onnx/onnx-ml.pb.cc] Error 1
CMakeFiles/Makefile2:214: recipe for target 'CMakeFiles/gen_onnx_proto.dir/all' failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 13%] Linking C shared module libonnxifi.so
[ 13%] Built target onnxifi_wrapper
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-unl0sjjr/onnx/setup.py", line 334, in <module>
    'backend-test-tools = onnx.backend.test.cmd_tools:main',
  File "/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-unl0sjjr/onnx/setup.py", line 209, in run
    self.run_command('cmake_build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-unl0sjjr/onnx/setup.py", line 203, in run
    subprocess.check_call(build_args)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '.', '--', '-j', '4']' returned non-zero exit status 2.

----------------------------------------

Command “/home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-unl0sjjr/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-c_x10j2z-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/deepedge/onnx_1.6/include/site/python3.6/onnx” failed with error code 1 in /tmp/pip-build-unl0sjjr/onnx/

  1. I also tried building it from source with:
    git clone https://github.com/onnx/onnx.git --branch v1.6.0
    cd onnx
    git submodule update --init --recursive
    python setup.py install
    But it failed too.
    The below is the output of python setup.py install

running install
running bdist_egg
running egg_info
creating onnx.egg-info
writing onnx.egg-info/PKG-INFO
writing dependency_links to onnx.egg-info/dependency_links.txt
writing entry points to onnx.egg-info/entry_points.txt
writing requirements to onnx.egg-info/requires.txt
writing top-level names to onnx.egg-info/top_level.txt
writing manifest file ‘onnx.egg-info/SOURCES.txt’
reading manifest file ‘onnx.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
writing manifest file ‘onnx.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
running create_version
running cmake_build
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Protobuf: /usr/local/lib/libprotobuf.so (found version “3.13.0”)
Generated: /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Generated: /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx-operators-ml.proto
CMake Warning at CMakeLists.txt:394 (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”
(requested version 2.2) 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.


– ******** Summary ********
– CMake version : 3.18.2
– CMake command : /usr/local/bin/cmake
– System : Linux
– C++ compiler : /usr/bin/c++
– C++ compiler version : 7.5.0
– CXX flags : -Wnon-virtual-dtor
– Build type : Release
– Compile definitions :
– CMAKE_PREFIX_PATH :
– CMAKE_INSTALL_PREFIX : /usr/local
– CMAKE_MODULE_PATH :

– ONNX version : 1.6.0
– ONNX NAMESPACE : onnx
– ONNX_BUILD_TESTS : OFF
– ONNX_BUILD_BENCHMARKS : OFF
– ONNX_USE_LITE_PROTO : OFF
– ONNXIFI_DUMMY_BACKEND : OFF
– ONNXIFI_ENABLE_EXT : OFF

– Protobuf compiler : /usr/local/bin/protoc
– Protobuf includes : /usr/local/include
– Protobuf libraries : /usr/local/lib/libprotobuf.so
– BUILD_ONNX_PYTHON : ON
– Python version :
– Python executable : /home/deepedge/onnx_1.6/bin/python
– Python includes : /usr/include/python3.6m
– Configuring done
– Generating done
– Build files have been written to: /home/deepedge/onnx/.setuptools-cmake-build
Scanning dependencies of target onnxifi_loader
Scanning dependencies of target gen_onnx_proto
Scanning dependencies of target onnxifi_dummy
[ 3%] Running gen_proto.py on onnx/onnx.in.proto
[ 3%] Building C object CMakeFiles/onnxifi_loader.dir/onnx/onnxifi_loader.c.o
[ 4%] Building C object CMakeFiles/onnxifi_dummy.dir/onnx/onnxifi_dummy.c.o
/home/deepedge/onnx/onnx/onnxifi_dummy.c: In function ‘onnxGetExtensionFunctionAddress’:
/home/deepedge/onnx/onnx/onnxifi_dummy.c:173:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
*function = &onnxGetExtensionFunctionAddress;
^
/home/deepedge/onnx/onnx/onnxifi_dummy.c:176:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
*function = &onnxSetIOAndRunGraph;
^
[ 6%] Linking C static library libonnxifi_loader.a
Processing /home/deepedge/onnx/onnx/onnx.in.proto
Writing /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Writing /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto3
generating /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx_pb.py
[ 8%] Built target onnxifi_loader
[ 8%] Linking C shared library libonnxifi_dummy.so
Scanning dependencies of target onnxifi_wrapper
[ 9%] Running C++ protocol buffer compiler on /home/deepedge/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
[ 11%] Building C object CMakeFiles/onnxifi_wrapper.dir/onnx/onnxifi_wrapper.c.o
[ 11%] Built target onnxifi_dummy
–python_out: onnx/onnx-ml.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target ‘onnx/onnx-ml.pb.cc’ failed
make[2]: *** [onnx/onnx-ml.pb.cc] Error 1
CMakeFiles/Makefile2:214: recipe for target ‘CMakeFiles/gen_onnx_proto.dir/all’ failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 13%] Linking C shared module libonnxifi.so
[ 13%] Built target onnxifi_wrapper
Makefile:148: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “setup.py”, line 334, in
‘backend-test-tools = onnx.backend.test.cmd_tools:main’,
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/init.py”, line 129, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3.6/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/lib/python3.6/distutils/dist.py”, line 955, in run_commands
self.run_command(cmd)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/install.py”, line 67, in run
self.do_egg_install()
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/install.py”, line 109, in do_egg_install
self.run_command(‘bdist_egg’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/bdist_egg.py”, line 172, in run
cmd = self.call_command(‘install_lib’, warn_dir=0)
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/bdist_egg.py”, line 158, in call_command
self.run_command(cmdname)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/install_lib.py”, line 24, in run
self.build()
File “/usr/lib/python3.6/distutils/command/install_lib.py”, line 107, in build
self.run_command(‘build_py’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “setup.py”, line 209, in run
self.run_command(‘cmake_build’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “setup.py”, line 203, in run
subprocess.check_call(build_args)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/local/bin/cmake’, ‘–build’, ‘.’, ‘–’, ‘-j’, ‘4’]’ returned non-zero exit status 2.

Kindly help me solve this issue.
Thanks!

Hi,

Could you try to re-install the wheel module?

$ sudo pip uninstall wheel
$ sudo pip install wheel

Thanks.

Tried them. But getting a little different error log this time with pip install onnx==1.6.0:

Collecting onnx==1.6.0
Using cached https://files.pythonhosted.org/packages/81/a9/a14c3bc32908c37b46b19a89eb6185b0c90fd9c03ef12379d51940b8fc71/onnx-1.6.0.tar.gz
Requirement already satisfied: numpy in /home/deepedge/onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: protobuf in /home/deepedge/onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: six in /home/deepedge/onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /home/deepedge/onnx_1.6/lib/python3.6/site-packages (from onnx==1.6.0)
Requirement already satisfied: setuptools in /home/deepedge/onnx_1.6/lib/python3.6/site-packages (from protobuf->onnx==1.6.0)
Building wheels for collected packages: onnx
Running setup.py bdist_wheel for onnx … error
Complete output from command /home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-xrt6dits/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpug4o564_pip-wheel- --python-tag cp36:
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Protobuf: /usr/local/lib/libprotobuf.so (found version “3.13.0”)
Generated: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Generated: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-operators-ml.proto
CMake Warning at CMakeLists.txt:394 (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"
(requested version 2.2) 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.


– ******** Summary ********
– CMake version : 3.18.2
– CMake command : /usr/local/bin/cmake
– System : Linux
– C++ compiler : /usr/bin/c++
– C++ compiler version : 7.5.0
– CXX flags : -Wnon-virtual-dtor
– Build type : Release
– Compile definitions :
– CMAKE_PREFIX_PATH :
– CMAKE_INSTALL_PREFIX : /usr/local
– CMAKE_MODULE_PATH :

– ONNX version : 1.6.0
– ONNX NAMESPACE : onnx
– ONNX_BUILD_TESTS : OFF
– ONNX_BUILD_BENCHMARKS : OFF
– ONNX_USE_LITE_PROTO : OFF
– ONNXIFI_DUMMY_BACKEND : OFF
– ONNXIFI_ENABLE_EXT : OFF

– Protobuf compiler : /usr/local/bin/protoc
– Protobuf includes : /usr/local/include
– Protobuf libraries : /usr/local/lib/libprotobuf.so
– BUILD_ONNX_PYTHON : ON
– Python version :
– Python executable : /home/deepedge/onnx_1.6/bin/python3
– Python includes : /usr/include/python3.6m
– Configuring done
– Generating done
– Build files have been written to: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build
Scanning dependencies of target gen_onnx_proto
Scanning dependencies of target onnxifi_dummy
Scanning dependencies of target onnxifi_loader
[ 1%] Running gen_proto.py on onnx/onnx.in.proto
[ 3%] Building C object CMakeFiles/onnxifi_loader.dir/onnx/onnxifi_loader.c.o
[ 4%] Building C object CMakeFiles/onnxifi_dummy.dir/onnx/onnxifi_dummy.c.o
/tmp/pip-build-xrt6dits/onnx/onnx/onnxifi_dummy.c: In function ‘onnxGetExtensionFunctionAddress’:
/tmp/pip-build-xrt6dits/onnx/onnx/onnxifi_dummy.c:173:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
*function = &onnxGetExtensionFunctionAddress;
^
/tmp/pip-build-xrt6dits/onnx/onnx/onnxifi_dummy.c:176:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
*function = &onnxSetIOAndRunGraph;
^
[ 6%] Linking C static library libonnxifi_loader.a
[ 6%] Built target onnxifi_loader
Processing /tmp/pip-build-xrt6dits/onnx/onnx/onnx.in.proto
Writing /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Writing /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto3
generating /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx_pb.py
Scanning dependencies of target onnxifi_wrapper
[ 8%] Linking C shared library libonnxifi_dummy.so
[ 9%] Building C object CMakeFiles/onnxifi_wrapper.dir/onnx/onnxifi_wrapper.c.o
[ 11%] Running C++ protocol buffer compiler on /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
[ 11%] Built target onnxifi_dummy
–python_out: onnx/onnx-ml.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target ‘onnx/onnx-ml.pb.cc’ failed
make[2]: *** [onnx/onnx-ml.pb.cc] Error 1
CMakeFiles/Makefile2:214: recipe for target ‘CMakeFiles/gen_onnx_proto.dir/all’ failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 13%] Linking C shared module libonnxifi.so
[ 13%] Built target onnxifi_wrapper
Makefile:148: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-xrt6dits/onnx/setup.py”, line 334, in
‘backend-test-tools = onnx.backend.test.cmd_tools:main’,
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/init.py”, line 129, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3.6/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/lib/python3.6/distutils/dist.py”, line 955, in run_commands
self.run_command(cmd)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/home/deepedge/onnx_1.6/lib/python3.6/site-packages/wheel/bdist_wheel.py”, line 290, in run
self.run_command(‘build’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/lib/python3.6/distutils/command/build.py”, line 135, in run
self.run_command(cmd_name)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/tmp/pip-build-xrt6dits/onnx/setup.py”, line 209, in run
self.run_command(‘cmake_build’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/tmp/pip-build-xrt6dits/onnx/setup.py”, line 203, in run
subprocess.check_call(build_args)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/local/bin/cmake’, ‘–build’, ‘.’, ‘–’, ‘-j’, ‘4’]’ returned non-zero exit status 2.


Failed building wheel for onnx
Running setup.py clean for onnx
Failed to build onnx
Installing collected packages: onnx
Running setup.py install for onnx … error
Complete output from command /home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-xrt6dits/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-25x381nq-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/deepedge/onnx_1.6/include/site/python3.6/onnx:
fatal: not a git repository (or any of the parent directories): .git
running install
running build
running build_py
running create_version
running cmake_build
Generated: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
Generated: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-operators-ml.proto
CMake Warning at CMakeLists.txt:394 (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"
  (requested version 2.2) 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.


--
-- ******** Summary ********
--   CMake version         : 3.18.2
--   CMake command         : /usr/local/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 7.5.0
--   CXX flags             :  -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   :
--   CMAKE_PREFIX_PATH     :
--   CMAKE_INSTALL_PREFIX  : /usr/local
--   CMAKE_MODULE_PATH     :
--
--   ONNX version          : 1.6.0
--   ONNX NAMESPACE        : onnx
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
--
--   Protobuf compiler     : /usr/local/bin/protoc
--   Protobuf includes     : /usr/local/include
--   Protobuf libraries    : /usr/local/lib/libprotobuf.so
--   BUILD_ONNX_PYTHON     : ON
--     Python version      :
--     Python executable   : /home/deepedge/onnx_1.6/bin/python3
--     Python includes     : /usr/include/python3.6m
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build
[  8%] Running C++ protocol buffer compiler on /tmp/pip-build-xrt6dits/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
[  8%] Built target onnxifi_dummy
[  8%] Built target onnxifi_loader
[ 11%] Built target onnxifi_wrapper
--python_out: onnx/onnx-ml.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target 'onnx/onnx-ml.pb.cc' failed
make[2]: *** [onnx/onnx-ml.pb.cc] Error 1
CMakeFiles/Makefile2:214: recipe for target 'CMakeFiles/gen_onnx_proto.dir/all' failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-xrt6dits/onnx/setup.py", line 334, in <module>
    'backend-test-tools = onnx.backend.test.cmd_tools:main',
  File "/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/deepedge/onnx_1.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-xrt6dits/onnx/setup.py", line 209, in run
    self.run_command('cmake_build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-xrt6dits/onnx/setup.py", line 203, in run
    subprocess.check_call(build_args)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '.', '--', '-j', '4']' returned non-zero exit status 2.

----------------------------------------

Command “/home/deepedge/onnx_1.6/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-xrt6dits/onnx/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-25x381nq-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/deepedge/onnx_1.6/include/site/python3.6/onnx” failed with error code 1 in /tmp/pip-build-xrt6dits/onnx/

Hi,

Could not find a package configuration file provided by “pybind11”
(requested version 2.2) with any of the following names:

pybind11Config.cmake
pybind11-config.cmake

Based on this, you can install pybind11 via the following command:

$ sudo pip3 install -U pybind11

Thanks.