Repository: mlcommons/inference
Issue: Building classification_and_detection, fatal error: 'pybind11/functional.h' file not found
Root cause: Architectural Constraint

In `v0.5/classification_and_detection`, running the initial install:

`cd ../../loadgen; CFLAGS="-std=c++14" python setup.py develop; cd ../v0.5/classification_and_detection`


However, it fails with `fatal error: 'pybind11/functional.h' file not found`.

I have ensure that PyBind11 is installed in my environment using `pip install pybind11`

```
>>> import pybind11
>>> pybind11.__version__
'2.5.0'
>>> pybind11.get_include()
'/home/wheest/.virtualenvs/venv20/lib/python3.6/site-packages/pybind11/include'
```

Running `tree` in that include directory confirms that the file this there.

```
.
└── pybind11
    ├── functional.h
    ...
    └── stl.h
```

The longer failed build output is:
 
```
running build_ext
building 'mlperf_loadgen' extension
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c loadgen.cc -o build/temp.linux-x86_64-3.6/loadgen.o
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c logging.cc -o build/temp.linux-x86_64-3.6/logging.o
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c test_settings_internal.cc -o build/temp.linux-x86_64-3.6/test_settings_internal.o
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c utils.cc -o build/temp.linux-x86_64-3.6/utils.o
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c version.cc -o build/temp.linux-x86_64-3.6/version.o
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c bindings/python_api.cc -o build/temp.linux-x86_64-3.6/bindings/python_api.o
bindings/python_api.cc:26:10: fatal error: 'pybind11/functional.h' file not found
#include "pybind11/functional.h"
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
```

Any ideas, or similar issues?

Is https://github.com/mlperf/inference/issues/230 any good?

On Sun, 21 Jun 2020, 19:47 Wheest, <notifications@github.com> wrote:

> In v0.5/classification_and_detection, running the initial install:
>
> cd ../../loadgen; CFLAGS="-std=c++14" python setup.py develop; cd
> ../v0.5/classification_and_detection
>
> However, it fails with fatal error: 'pybind11/functional.h' file not found
> .
>
> I have ensure that PyBind11 is installed in my environment using pip
> install pybind11
>
> >>> import pybind11
>
> >>> pybind11.__version__
>
> '2.5.0'
>
> >>> pybind11.get_include()
>
> '/home/wheest/.virtualenvs/venv20/lib/python3.6/site-packages/pybind11/include'
>
>
> Running tree in that include directory confirms that the file this there.
>
> .
>
> └── pybind11
>
>     ├── functional.h
>
>     ...
>
>     └── stl.h
>
>
> The longer failed build output is:
>
> running build_ext
>
> building 'mlperf_loadgen' extension
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c loadgen.cc -o build/temp.linux-x86_64-3.6/loadgen.o
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c logging.cc -o build/temp.linux-x86_64-3.6/logging.o
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c test_settings_internal.cc -o build/temp.linux-x86_64-3.6/test_settings_internal.o
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c utils.cc -o build/temp.linux-x86_64-3.6/utils.o
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c version.cc -o build/temp.linux-x86_64-3.6/version.o
>
> /usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -std=c++14 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=5 -I. -I../third_party/pybind/include -I/usr/include/python3.6m -I/home/wheest/.virtualenvs/venv20/include/python3.6m -c bindings/python_api.cc -o build/temp.linux-x86_64-3.6/bindings/python_api.o
>
> bindings/python_api.cc:26:10: fatal error: 'pybind11/functional.h' file not found
>
> #include "pybind11/functional.h"
>
>          ^~~~~~~~~~~~~~~~~~~~~~~
>
> 1 error generated.
>
> error: command '/usr/bin/clang' failed with exit status 1
>
>
> Any ideas, or similar issues?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/mlperf/inference/issues/626>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABSKZOUFYXPPAH5NRJK5GZTRXZIUBANCNFSM4OD7ITYA>
> .
>


Thanks, hadn't found those issues.

Purged pip PyBind11, and ensured submodules were pulled.

Rerunning produced correct build.  Thanks

what are  submodules？
What should I do?