trep/opentrep

Compatibility issue with Python 3.10

frenzymadness opened this issue · 2 comments

Hello.

I'm trying to follow your docs and build opentrep on Fedora rawhide (future 35) where Python 3.10 is the main Python. It seems to me that CMake has some troubles detecting the Python version:

-- The C compiler identification is GNU 11.1.1
-- The CXX compiler identification is GNU 11.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Requires Git without specifying any version
-- Current Git revision name: 15ef88fa8d7ec359134d64c2b1857d6264695d58 master
-- Requires Python with version 3.6; however just Python3 is considered here
CMake Error at config/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Python3 (missing: Python3_LIBRARIES Python3_INCLUDE_DIRS
  Development)
Call Stack (most recent call first):
  config/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  config/FindPython/Support.cmake:2400 (find_package_handle_standard_args)
  config/FindPython3.cmake:311 (include)
  config/project_config_embeddable.cmake:501 (find_package)
  config/project_config_embeddable.cmake:342 (get_python)
  CMakeLists.txt:69 (get_external_libs)

Excellent, thanks @frenzymadness and @hroncok !

Yes, you are right, I/we need to update those CMake files. You may wonder why we/I keep maintaining our own versions of those CMake files (which are usually part of modern Linux distributions), it is because OpenTREP also builds on very old distributions, where such files do not exist or are well outdated.

Do not hesitate to create a pull request if you are faster than myself (as I am busy with work/day job tasks these days).