hal
hal copied to clipboard
FindPythonInterp is deprecated, use FindPython3 instead [fixed in new HAL version 4.0]
The following line causes a cmake failure on my Ubuntu 20.04 machine: https://github.com/emsec/hal/blob/5e004f6010a9e690b56fe02b54f38a970f8fa5f9/cmake/detect_dependencies.cmake#L148
"Dual stack" python installs, i.e. having both python2 and python3 installed, will trigger this if the system's default python points to python2.
For this reason, as of cmake 3.12, FindPython3 should be used instead of FindPythonInterp.
(The same goes for deps/pybind11
which still has the deprecated CMakeLists)
As someone who just had the issue, one can work around this by using the cmake option
-DPYTHON_EXECUTABLE=`which python3`
@RenWal could you prepare a Pull Request?
Can someone from your team point out whether there's anything that prevents updating pybind to a version that doesn't use deprecated CMake? (And while we're at it – it looks like you have the entire pybind repo verbatim inside your git repository. Don't know if @swallat still manages your build system; have you considered making this a git submodule, as is recommended by the pybind maintainers? This would make managing such dependencies easier.)
The pybind version has been updated to 2.9. We also fixed the python3 include if both python2.7 and python3 are installed. This will be merged into the master with the new HAL v4.0. Note that we will not include pybind as a git submodule, since these create more problems for beginners. We will keep the static dependency.
https://github.com/emsec/hal/tree/v4.0.0
This has been merged, closing.