Created attachment 164597 [details] APKBUILD for alpine v3.19 + kdev-python-23.08.4 SUMMARY *** on alpine linux with python 3.11.6 + -DCMAKE_POLICY_DEFAULT_CMP0148=OLD -- Found PythonInterp: /usr/bin/python3.11 (found suitable version "3.11.6", minimum required is "3.11") CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.11") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindPythonLibs.cmake:323 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:60 (find_package) -- Configuring incomplete, errors occurred! ----------------------- and with CMP0148=NEW ------------------------ CMake Error at CMakeLists.txt:64 (message): Python >= 3.4.3 but < 3.12 with --enable-shared is required to build kdev-python https://cmake.org/cmake/help/latest/policy/CMP0148.html so if CMP0148 is new it should use FindPython3 instead.. as of master commit 5a22e29cd676fbe5851554c381da0e899bd4cf55 this is not the case yet. *** STEPS TO REPRODUCE 1. alpine 3.19 with kdevelop installed 2. build the attached APKBUILD with 'abuild -r' 3. error triggers due to cmake 3.27 uses FindPython3 instead of old ones. OBSERVED RESULT error messages EXPECTED RESULT clean compile that takes CMP0148 into account SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION this will be a issue with 24.02 also since the code has not changed in master yet
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.