Bug 876118 - Inconsistent results of FindPythonInterp and FindPythonLibs
Summary: Inconsistent results of FindPythonInterp and FindPythonLibs
Alias: None
Product: Fedora
Classification: Fedora
Component: cmake
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL: http://public.kitware.com/Bug/view.ph...
Depends On:
TreeView+ depends on / blocked
Reported: 2012-11-13 11:23 UTC by Jaroslav Škarvada
Modified: 2014-12-17 20:19 UTC (History)
10 users (show)

Fixed In Version: cmake-2.8.12-2.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-10-31 02:58:27 UTC
Type: Bug

Attachments (Terms of Use)
Simple config (reproducer) (102 bytes, text/plain)
2012-11-13 11:25 UTC, Jaroslav Škarvada
no flags Details

Description Jaroslav Škarvada 2012-11-13 11:23:22 UTC
Description of problem:
Inconsistent results of FindPythonInterp and FindPythonLibs, e.g.:
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
-- Found PythonLibs: /usr/lib64/libpython3.2mu.so (found version "3.2.3") 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. yum install python-devel python3-devel
2. Run 'cmake .' on simple cmake config (will be attached)
Actual results:
Inconsistent Python versions found:
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
-- Found PythonLibs: /usr/lib64/libpython3.2mu.so (found version "3.2.3") 

Expected results:
Consistent Python versions found (i.e. in this case both 2.7.3 or 3.2.3).

Additional info:
Upstream ticket: http://www.cmake.org/Bug/view.php?id=10077

Comment 1 Jaroslav Škarvada 2012-11-13 11:25:49 UTC
Created attachment 644062 [details]
Simple config (reproducer)

Comment 2 Darryl L. Pierce 2013-04-03 12:48:43 UTC
I'm experiencing this exact same problem with both Qpid and Proton.

Comment 3 Orion Poplawski 2013-04-03 16:07:42 UTC
Link to upstream bug.  Workaround may be to explicitly specify version desired:


Comment 4 Darryl L. Pierce 2013-04-03 17:10:21 UTC
(In reply to comment #3)
> Link to upstream bug.  Workaround may be to explicitly specify version
> desired:

This does not work. Specifying 2.7 still results in the 3.3 libraries being returned.

Comment 5 Kevin Kofler 2013-04-13 21:03:41 UTC
Specifying 2.7 only requires at least 2.7, not exactly 2.7.

Comment 6 Kevin Kofler 2013-04-13 21:12:15 UTC
Well, looking at the FindPython*.cmake files, they actually use the minimum version in a way that they only check versions with the same major version number, which might not really be the way this is supposed to work, but it makes sense to do it that way for Python. So I'm not sure why you end up with 3.3 still being found.

Does your project set Python_ADDITIONAL_VERSIONS anywhere?

Comment 7 Fedora End Of Life 2013-07-04 06:39:15 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2013-08-01 18:15:12 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Björn 'besser82' Esser 2013-08-19 14:04:26 UTC
This problem still exists in Fedora 19.  Any fix / workaround so far?

Comment 10 Rex Dieter 2013-08-19 14:19:42 UTC
Upstream bug http://public.kitware.com/Bug/view.php?id=13794 has a proposed patch, but otherwise upstream hasn't acted on this issue yet.

Comment 11 Orion Poplawski 2013-08-28 17:24:49 UTC
I've added the patch from the upstream tracker to the rawhide build.  It seems to work for me.  I'll try to propagate it down when 2.8.12 is released.

Comment 12 Fedora Update System 2013-10-10 04:29:25 UTC
cmake-2.8.12-1.fc19 has been submitted as an update for Fedora 19.

Comment 13 Fedora Update System 2013-10-11 02:29:25 UTC
Package cmake-2.8.12-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cmake-2.8.12-2.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2013-10-31 02:58:27 UTC
cmake-2.8.12-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Orion Poplawski 2014-03-03 17:11:51 UTC
cmake-3.0.0-0.3.rc1 now carries upstream's version of the fix.  Let me know if it causes any problems.

Note You need to log in before you can comment on or make changes to this bug.