No smart_holder.h in pybind11
Hi authors,
When installing openspiel (build from source), I met the following issue.
[ 93%] Building CXX object python/CMakeFiles/pyspiel.dir/pybind11/algorithms_trajectories.cc.o In file included from /Users/wangyzh/PycharmProjects/open_spiel/open_spiel/python/pybind11/algorithms_corr_dist.cc:15: In file included from /Users/wangyzh/PycharmProjects/open_spiel/open_spiel/../open_spiel/python/pybind11/algorithms_corr_dist.h:18: In ./open_spiel/python/pybind11/pybind11.h:29:10: fatal error: 'pybind11/include/pybind11/smart_holder.h' file not found #include "pybind11/include/pybind11/smart_holder.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I found that smart_holder.h only exists in the smart_holder branch of pybind11 rather than the master branch. So it is possible that the smart_holder branch is not installed by default.
Thanks.
Hi @wyz2368, the install.sh script clones the smart holder branch here: https://github.com/deepmind/open_spiel/blob/a432cf7441acc08479b868ffc2cde208464d403e/open_spiel/scripts/install.sh#L98
Have you pulled from master within an older clone (possibly before we started using the smart holder branchof pybind11)? Or did you start from scratch (running install.sh on a fresh clone)?
Hi @lanctot ,
I fetched the newest open_spiel to merge the local old version. I found that the pybind11 in my old version was not removed after the merge. I guess when I compiled, the installation detected the old pybind11 so it didn't download the new smart_holder branch. The issue was solved when I replaced the old pybind11 with the new one. Interestingly, the pybind11 folder was not placed in the download_cache directory (I guess it is due to the old setting).
For curiosity, I cloned a brand new openspiel from master and tried to install it. Everything, including pybind11, double_dummy_solver and abseil-cpp, was downloaded to the download_cache directory, following the install.sh exactly. So it is like the issue was raised by the residue of previous installations.
Anyway, thank you so much for your help. : )
Great, glad you were able to fix it!