breeze-gtk-5.16.4 fails to build because it refers to /usr/bin/python3.7 instead of python3.6 as configured with eselect: ---------------------------------------------------------------------------- -- The C compiler identification is GNU 9.1.0 -- The CXX compiler identification is GNU 9.1.0 -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Sass: /usr/bin/sassc -- Found Python3: /usr/bin/python3.7 (found version "3.7.4") found components: Interpreter Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'cairo' -- The following RUNTIME packages have been found: * GTKEngine, Pixmap/Pixbuf theme engine for GTK 2, <http://www.gtk.org/> Required for GTK 2 theme -- The following REQUIRED packages have been found: * ECM (required version >= 0.0.9) * Sass, SASS compiler, <https://sass-lang.com/> Required for building GTK themes * Python3 * Breeze (required version >= 5.14.90) Required to build the Breeze GTK+ styles * Qt5 * Qt5Core -- The following REQUIRED packages have not been found: * PythonCairo Required to render assets CMake Error at /usr/share/cmake/Modules/FeatureSummary.cmake:457 (message): feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run. Call Stack (most recent call first): CMakeLists.txt:24 (feature_summary) -- Configuring incomplete, errors occurred! ---------------------------------------------------------------------------- $ eselect python list Available Python interpreters, in order of preference: [1] python3.6 [2] python3.7 (fallback) [3] python3.5 (fallback) [4] python2.7 (fallback) $ emerge --info dev-python/pycairo dev-python/pycairo-1.18.1::gentoo was built with the following: USE="-doc -examples -test" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -pypy -pypy3 -python3_5 -python3_7" $ emerge --info dev-util/cmake dev-util/cmake-3.15.1::gentoo was built with the following: USE="ncurses -doc -emacs -qt5 -system-jsoncpp -test" ABI_X86="(64)"
Btw, this only happens because I have python:3.7 installed, but PYTHON_TARGETS="python2_7 python3_6", which is ignored by the breeze-gtk ebuild. So why doesn't it use PYTHON_TARGETS or PYTHON_SINGLE_TARGET like all the other packages?
Please check if adding the following code to ebuild would help: src_configure() { local mycmakeargs=( -DPython3_EXECUTABLE="${PYTHON}" ) kde5_src_configure }
Nope, same thing, i.e. still picks up 3.7, which then fails because of missing pycairo.
Looks to me like the python-any-r1 eclass is not the right choice since it depends not just on "some" python interpreter as the docu states, but it has a build-time depencency on a specific python library. So what it does there simply needs to be in sync with PYTHON_TARGETS and/or PYTHON_SINGLE_TARGET.
When using CMake >=3.12, wrong version of Python was detected since: https://cgit.kde.org/breeze-gtk.git/commit/CMakeLists.txt?id=3f82a073a3fee302e04d6e16edeaa95a9e5fd14a https://cgit.kde.org/breeze-gtk.git/commit/CMakeLists.txt?id=df36153445cc908a8a0a23d43a5b4723b2195696 Problem became more visible in Gentoo when check for cairo module was added: https://cgit.kde.org/breeze-gtk.git/commit/?id=fda7d4375883cb18a5f21b6a6b767fe13e9bbc08 The older FindPythonInterp.cmake and FindPythonLibs.cmake are more reliable in Gentoo, because they respect user-requested Python version (user == ebuild in Gentoo context). FindPython.cmake, FindPython2.cmake and FindPython3.cmake introduced in CMake 3.12 are missing support for respecting user-requested Python version. CMake upstream bug: https://gitlab.kitware.com/cmake/cmake/issues/19492 A quick workaround in kde-plasma/breeze-gtk ebuilds would be to force using FindPythonInterp.cmake until CMake is fixed: [[[ --- /cmake/FindPythonCairo.cmake +++ /cmake/FindPythonCairo.cmake @@ -1,10 +1,4 @@ -if(CMAKE_VERSION VERSION_LESS 3.12.0) - find_package(PythonInterp 3 REQUIRED) - # PythonInterp sets PYTHON_EXECUTABLE -else() - find_package(Python3 COMPONENTS Interpreter REQUIRED) - set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") -endif() +find_package(PythonInterp 3 REQUIRED) # Check for python cairo execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import cairo" ]]] With above patch applied, ebuild would need to set -DPYTHON_EXECUTABLE="${PYTHON}", not -DPython3_EXECUTABLE="${PYTHON}".
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) > When using CMake >=3.12, wrong version of Python was detected since: > https://cgit.kde.org/breeze-gtk.git/commit/CMakeLists. > txt?id=3f82a073a3fee302e04d6e16edeaa95a9e5fd14a > https://cgit.kde.org/breeze-gtk.git/commit/CMakeLists. > txt?id=df36153445cc908a8a0a23d43a5b4723b2195696 > > Problem became more visible in Gentoo when check for cairo module was added: > https://cgit.kde.org/breeze-gtk.git/commit/ > ?id=fda7d4375883cb18a5f21b6a6b767fe13e9bbc08 > > > The older FindPythonInterp.cmake and FindPythonLibs.cmake are more reliable > in Gentoo, because they respect user-requested Python version (user == > ebuild in Gentoo context). > > FindPython.cmake, FindPython2.cmake and FindPython3.cmake introduced in > CMake 3.12 are missing support for respecting user-requested Python version. > CMake upstream bug: > https://gitlab.kitware.com/cmake/cmake/issues/19492 > > > A quick workaround in kde-plasma/breeze-gtk ebuilds would be to force using > FindPythonInterp.cmake until CMake is fixed: > [[[ > --- /cmake/FindPythonCairo.cmake > +++ /cmake/FindPythonCairo.cmake > @@ -1,10 +1,4 @@ > -if(CMAKE_VERSION VERSION_LESS 3.12.0) > - find_package(PythonInterp 3 REQUIRED) > - # PythonInterp sets PYTHON_EXECUTABLE > -else() > - find_package(Python3 COMPONENTS Interpreter REQUIRED) > - set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") > -endif() > +find_package(PythonInterp 3 REQUIRED) > > # Check for python cairo > execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import cairo" > ]]] > With above patch applied, ebuild would need to set > -DPYTHON_EXECUTABLE="${PYTHON}", not -DPython3_EXECUTABLE="${PYTHON}". I'll give this a try in the morning. If I understand all this correctly. Currently cmake pick the highest python version installed even if it's not the system selected python version (eselect python set --python3 "PYTHON_VERSION"? And this patch will cause it instead to explicitly use the system selected python even if it's not the highest version installed?
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) > A quick workaround in kde-plasma/breeze-gtk ebuilds would be to force using > FindPythonInterp.cmake until CMake is fixed: > [[[ > --- /cmake/FindPythonCairo.cmake > +++ /cmake/FindPythonCairo.cmake > @@ -1,10 +1,4 @@ > -if(CMAKE_VERSION VERSION_LESS 3.12.0) > - find_package(PythonInterp 3 REQUIRED) > - # PythonInterp sets PYTHON_EXECUTABLE > -else() > - find_package(Python3 COMPONENTS Interpreter REQUIRED) > - set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") > -endif() > +find_package(PythonInterp 3 REQUIRED) > > # Check for python cairo > execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import cairo" > ]]] > With above patch applied, ebuild would need to set > -DPYTHON_EXECUTABLE="${PYTHON}", not -DPython3_EXECUTABLE="${PYTHON}". With this patch it builds fine for me.
Well a workaround is also to add the necessary Python 3.7 flag to pycairo: dev-python/pycairo python_targets_python3_7 and rebuild dev-python/pycairo. After that the emerge of kde-plasma/breeze-gtk would be OK
Please adjust the summary to include the error message, e.g. ... - The following REQUIRED packages have not been found: PythonCairo
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) > The older FindPythonInterp.cmake and FindPythonLibs.cmake are more reliable > in Gentoo, because they respect user-requested Python version (user == > ebuild in Gentoo context). > > FindPython.cmake, FindPython2.cmake and FindPython3.cmake introduced in > CMake 3.12 are missing support for respecting user-requested Python version. > CMake upstream bug: > https://gitlab.kitware.com/cmake/cmake/issues/19492 That issue has been closed in the meantime. Is it possible to backport the fix to the versions available in Gentoo?
Much too big to backport, we'll have to hope for an upstream pick into 3.15 branch.
Brave souls may now test with cmake-3.16_rc2, thanks to Lars.
Created attachment 593262 [details] build.log (In reply to Andreas Sturmlechner from comment #12) > Brave souls may now test with cmake-3.16_rc2, thanks to Lars. The issue persists: -- Found Python3: /usr/sbin/python3.7 (found version "3.7.5") found components: Interpreter Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'cairo' [...] -- The following REQUIRED packages have not been found: * PythonCairo Required to render assets CMake Error at /usr/share/cmake/Modules/FeatureSummary.cmake:457 (message): feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run. Call Stack (most recent call first): CMakeLists.txt:24 (feature_summary)
Created attachment 593264 [details] CMakeOutput.log
(In reply to Andreas Sturmlechner from comment #12) > Brave souls may now test with cmake-3.16_rc2 Features implemented in FindPython.cmake, FindPython2.cmake and FindPython3.cmake require passing explicit options. kde-plasma/breeze-gtk ebuilds probably should have: src_configure() { local mycmakeargs=( -DPython3_EXECUTABLE="${PYTHON}" ) kde5_src_configure }
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=c4fac72ada1f8baeee835017f47d14ca5589cfa5 commit c4fac72ada1f8baeee835017f47d14ca5589cfa5 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-10-27 09:50:13 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-10-27 10:30:42 +0000 kde-plasma/breeze-gtk: Fix python executable selection Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> Bug: https://bugs.gentoo.org/691092 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-plasma/breeze-gtk/breeze-gtk-5.17.49.9999.ebuild | 17 +++++++++++++++++ kde-plasma/breeze-gtk/breeze-gtk-9999.ebuild | 17 +++++++++++++++++ .../files/breeze-gtk-5.16.5-cmake-pre-3.16.patch | 16 ++++++++++++++++ 3 files changed, 50 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27754d34eb02ba1cf6aaffa04be7b490441fc8a7 commit 27754d34eb02ba1cf6aaffa04be7b490441fc8a7 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-10-27 09:50:13 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-10-27 10:35:31 +0000 kde-plasma/breeze-gtk: Fix python executable selection Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> Closes: https://bugs.gentoo.org/691092 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-plasma/breeze-gtk/breeze-gtk-5.16.5.ebuild | 17 +++++++++++++++++ kde-plasma/breeze-gtk/breeze-gtk-5.17.1.ebuild | 17 +++++++++++++++++ .../files/breeze-gtk-5.16.5-cmake-pre-3.16.patch | 16 ++++++++++++++++ 3 files changed, 50 insertions(+)
(In reply to Larry the Git Cow from comment #17) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=27754d34eb02ba1cf6aaffa04be7b490441fc8a7 > > commit 27754d34eb02ba1cf6aaffa04be7b490441fc8a7 > Author: Andreas Sturmlechner <asturm@gentoo.org> > AuthorDate: 2019-10-27 09:50:13 +0000 > Commit: Andreas Sturmlechner <asturm@gentoo.org> > CommitDate: 2019-10-27 10:35:31 +0000 > > kde-plasma/breeze-gtk: Fix python executable selection I confirm: This makes it build for me.