ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

C++ binding CMakeLists does not find the correct Python libraries in a virtual environment #746

Open peter-t-fox opened 4 years ago

peter-t-fox commented 4 years ago

The CMake build of the C++ binding uses the (deprecated since 3.12) FindPythonLibs script to locate the Python shared libraries.

This script does not appear to be compatible with an active Python virtual environment, and will default to using the system installation of Python. This can cause linker errors at the end of the build, as the system installation of Python may be the wrong version or have the wrong packages.

The CMakeLists should instead use the FindPython3 script, which has support for virtual environments via the Python3_FIND_VIRTUALENV hint, but only since CMake 3.15. This would require constraining the build further from its current requirement of CMake 3.10.

github-actions[bot] commented 4 years ago

Heads up @mrow84 @bobturneruk - the "data pipeline api" label was applied to this issue.

kzscisoft commented 3 years ago

This has been been implemented in https://github.com/ScottishCovidResponse/cpp-data-pipeline.