user1315621
user1315621

Reputation: 3412

pybind11.h: No such file or directory

I am trying to compile Deepstream 6.0 Python bindings. My guess it that the issue not related to Deepstream, but to general C/C++ compiling issues:

sudo apt install -y git python-dev python3 python3-pip python3.6-dev python3.8-dev cmake g++ build-essential \
    libglib2.0-dev libglib2.0-dev-bin python-gi-dev libtool m4 autoconf automake
sudo apt-get -y install pybind11-dev
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
cd deepstream_python_apps
git checkout v1.1.0
cd bindings
mkdir build
cd build
cmake ..
make

I encounter the error:

ubuntu@ip-x-x-x-x:~/pycharm/libs/deepstream_python_apps/bindings/build$ cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/build
ubuntu@ip-x-x-x-x:~/pycharm/libs/deepstream_python_apps/bindings/build$ make
Scanning dependencies of target pyds
[  6%] Building CXX object CMakeFiles/pyds.dir/src/pyds.cpp.o
In file included from /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/include/bind/bindanalyticsmeta.hpp:23:0,
                 from /home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/src/pyds.cpp:19:
/home/ubuntu/pycharm/libs/deepstream_python_apps/bindings/include/pyds.hpp:22:10: fatal error: pybind11.h: No such file or directory
 #include <pybind11.h>
          ^~~~~~~~~~~~
compilation terminated.
CMakeFiles/pyds.dir/build.make:62: recipe for target 'CMakeFiles/pyds.dir/src/pyds.cpp.o' failed
make[2]: *** [CMakeFiles/pyds.dir/src/pyds.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pyds.dir/all' failed
make[1]: *** [CMakeFiles/pyds.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

If I look for pybind11.h I can find it in:

/usr/include/pybind11/pybind11.h

Upvotes: 0

Views: 1261

Answers (1)

niid
niid

Reputation: 518

you need to install the gst-python dependency as stated in the README.

make sure to pull all the git submodules beforehand, otherwise the 3rdparty/gst-python folder might be empty for you.

Upvotes: 0

Related Questions