[Bug 1084281] New: [cmake] feature-suse-python-interp-search-order.patch breaks cantor
http://bugzilla.novell.com/show_bug.cgi?id=1084281 Bug ID: 1084281 Summary: [cmake] feature-suse-python-interp-search-order.patch breaks cantor Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: christophe@krop.fr QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- feature-suse-python-interp-search-order.patch causes an issue on the KDE CI hosts. The python2 backend in Cantor no longer builds as shown here: https://build.kde.org/job/Applications%20cantor%20kf5-qt5%20SUSEQt5.9/29/con... The relevant part is here: 06:03:01 -- Found PythonLibs: /usr/lib64/libpython3.6m.so (found suitable version "3.6.4", minimum required is "2.7") Cantor explicitly tries to find python 2 but due to the patch, CMake ignores the version. Reverting the patch locally fixes the issue. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 Christophe Giboudeaux <christophe@krop.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |opensuse-kde-bugs@opensuse. | |org, simonf.lees@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c1 --- Comment #1 from Simon Lees <simonf.lees@suse.com> --- (In reply to Christophe Giboudeaux from comment #0)
feature-suse-python-interp-search-order.patch causes an issue on the KDE CI hosts.
The python2 backend in Cantor no longer builds as shown here: https://build.kde.org/job/Applications%20cantor%20kf5-qt5%20SUSEQt5.9/29/ consoleFull
The relevant part is here: 06:03:01 -- Found PythonLibs: /usr/lib64/libpython3.6m.so (found suitable version "3.6.4", minimum required is "2.7")
Cantor explicitly tries to find python 2 but due to the patch, CMake ignores the version.
Reverting the patch locally fixes the issue.
Can you give me a link to your CMakeLists.txt, all this patch does is removes the assumption that /usr/bin/python is the default python interpreter and instead looks for a python version that meets the constraints from newest to oldest. The reason behind this is in openSUSE, python3 is the default but we have decided not to change /usr/bin/python to python3 for reasons instead we encorage everyone to either use /usr/bin/python2 /usr/bin/python3 rather then /usr/bin/python, reverting the patch fixes it for you because then cmake looks for /usr/bin/python first which is python2 rather then python3. It looks like cmake rightly presumes that 3.6.4 is a higher number then 2.7.
From reading FindPythonInterp I recommend you look at the following.
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp). I suspect you just want to set that variable to 2.7 (you could list additional python2 versions here as well if people are actually still using any others) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c2 --- Comment #2 from Christophe Giboudeaux <christophe@krop.fr> --- (In reply to Simon Lees from comment #1)
Can you give me a link to your CMakeLists.txt, all this patch does is removes the assumption that /usr/bin/python is the default python interpreter and instead looks for a python version that meets the constraints from newest to oldest. The reason behind this is in openSUSE, python3 is the default but we have decided not to change /usr/bin/python to python3 for reasons instead we encorage everyone to either use /usr/bin/python2 /usr/bin/python3 rather then /usr/bin/python, reverting the patch fixes it for you because then cmake looks for /usr/bin/python first which is python2 rather then python3. It looks like cmake rightly presumes that 3.6.4 is a higher number then 2.7.
Indeed. Here's the CMakeLists.txt : https://cgit.kde.org/cantor.git/tree/src/backends/CMakeLists.txt
From reading FindPythonInterp I recommend you look at the following.
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp).
That's what cantor does already: set(Python_ADDITIONAL_VERSIONS 2.7) find_package(PythonLibs 2.7)
I suspect you just want to set that variable to 2.7 (you could list additional python2 versions here as well if people are actually still using any others)
The patch causes another issue: if python2 isn't installed (it's optional) but python3 is, CMake will assume both were found. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c3 --- Comment #3 from Christophe Giboudeaux <christophe@krop.fr> --- (In reply to Christophe Giboudeaux from comment #2)
From reading FindPythonInterp I recommend you look at the following.
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp).
That's what cantor does already: set(Python_ADDITIONAL_VERSIONS 2.7) find_package(PythonLibs 2.7)
Note that this won't help, FindPythonInterp is already called by a build dependency. (but that gives me an idea to work around the regression) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c4 --- Comment #4 from Christophe Giboudeaux <christophe@krop.fr> --- https://phabricator.kde.org/D11176 should take care of this issue. Waiting for feedback -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c5 --- Comment #5 from Simon Lees <simonf.lees@suse.com> --- (In reply to Christophe Giboudeaux from comment #4)
https://phabricator.kde.org/D11176 should take care of this issue. Waiting for feedback
Thanks, there might be some other issues that I found in testing (or I broke my local install as well) so i'll keep looking at those as well, Monday was a holiday here. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1084281 http://bugzilla.novell.com/show_bug.cgi?id=1084281#c8 Simon Lees <simonf.lees@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |UPSTREAM --- Comment #8 from Simon Lees <simonf.lees@suse.com> --- I think this can be closed now, reopen if there is still something required in the cmake package -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com