| Summary: | building fails with cmake 3.27 + extra-cmake-modules due to CMP0148 | ||
|---|---|---|---|
| Product: | [Developer tools] kdev-python | Reporter: | Björn Strömberg <bjorn.stromberg86> |
| Component: | general | Assignee: | Sven Brauch <mail> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | All | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | APKBUILD for alpine v3.19 + kdev-python-23.08.4 | ||
|
Description
Björn Strömberg
2024-01-01 15:43:44 UTC
hmm tested to patch the code directly and modify the CMakeLists.txt:
```
# handle CMP0148 - NEW is default from cmake 3.27
if(POLICY CMP0148)
message(STATUS "Policy CMP0148 is true: need to be handled!")
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
[...]
```
```
-- Policy CMP0148 is true: need to be handled!
-- Configuring incomplete, errors occurred!
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES
Development Development.Module Development.Embed) (found version "3.11.6")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindPython/Support.cmake:3824 (find_package_handle_standard_args)
/usr/share/cmake/Modules/FindPython3.cmake:545 (include)
CMakeLists.txt:47 (find_package)
*** Failure: Exit code 1 ***
```
so this looks like extra-cmake-packages is not picking up python, even though it finds it?
not sure where the issue is here.. 'extra-cmake-packages', 'alpines python package' or 'just me using find_package(Python3) wrong'
my trial and error: https://invent.kde.org/stromberg/kdev-python/-/commit/7a66da9e614ad7d39c0d31e12ba970265876f821
adding the link to the downstream alpine bug-report also since im not sure where the actual problem is more then the fact that it finds 3.11.6 but fails to find what its looking for.. https://gitlab.alpinelinux.org/alpine/aports/-/issues/15631 well over the river for water.. missing header package for python was the issue. |