MantisBT - CMake
View Issue Details
0014156CMakeModulespublic2013-05-19 06:102016-06-10 14:31
Modestas Vainius 
Ben Boeckel 
normalminoralways
closedmoved 
amd64Debian GNU/Linuxsid
CMake 2.8.11 
 
0014156: FindPythonLibs: fully support Python on Debian multi-arch systems
Hello,

I don't know the details but the following patch is needed to make FindPythonLibs properly work on Debian multi-arch systems (that's for future Debian 8.0 and some recent Ubuntu)

http://anonscm.debian.org/gitweb/?p=collab-maint/cmake.git;a=blob;f=debian/patches/multiarch-python-include-dirs.diff;hb=master [^]
No tags attached.
Issue History
2013-05-19 06:10Modestas VainiusNew Issue
2013-05-19 18:05Jean-Christophe Fillion-RobinNote Added: 0033096
2013-05-20 01:48Modestas VainiusNote Added: 0033098
2013-08-08 23:46domibelNote Added: 0033690
2013-08-12 10:36domibelNote Added: 0033699
2013-08-13 09:07Brad KingAssigned To => Ben Boeckel
2013-08-13 09:07Brad KingStatusnew => assigned
2013-12-13 12:18Dmitrijs LedkovsNote Added: 0034771
2016-06-10 14:28Kitware RobotNote Added: 0042284
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0033096)
Jean-Christophe Fillion-Robin   
2013-05-19 18:05   
In the same time, the patched CMake is causing trouble to build some project. See http://www.na-mic.org/Bug/view.php?id=3116 [^]

@Modestas: Waiting to fix the CMake version of FindPythonLibs.cmake, do you know who should be contacted / what it the process to tweak the module currently provided within Debian ?

Would be helpful if "PYTHON_INCLUDE_DIRS" is appended to the list of path to search when setting "PYTHON_INCLUDE_DIRS2".

Thanks
(0033098)
Modestas Vainius   
2013-05-20 01:48   
That would be me. Thanks for letting us know about the problem.

The patch is supposed to be backwards compatible so we will try to fix your problem with the patch. Watch this bug for updates.
(0033690)
domibel   
2013-08-08 23:46   
I have the same problem with Debian Testing right now.

The patch mentioned above needs another change. JC's idea worked for me:

   find_path(PYTHON_INCLUDE_DIR2
     NAMES pyconfig.h
     PATHS
+ ${PYTHON_INCLUDE_DIR}
       ${PYTHON_FRAMEWORK_INCLUDES}
       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
       [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
(0033699)
domibel   
2013-08-12 10:36   
The patch above doesn't work in some cases.

Here is another patch which has to be applied on top of the original patch in the Debian repository.

It looks for pyconfig.h in the original folder PYTHON_INCLUDE_DIR, and uses the alternative location only if the file couldn't be located.

+ find_path(PYTHON_INCLUDE_DIR2
+ NAMES pyconfig.h
+ PATHS
+ ${PYTHON_INCLUDE_DIR}
+ )
+
+ if (NOT PYTHON_INCLUDE_DIR2)
   find_path(PYTHON_INCLUDE_DIR2
     NAMES pyconfig.h
     PATHS
@@ -162,6 +183,10 @@
       python${_CURRENT_VERSION}u
       python${_CURRENT_VERSION}
   )
+ endif()

Slicer4 compiles on Debian testing and Ubuntu 13.04 with that change.
http://slicer.cdash.org/index.php?project=Slicer4 [^]
(0034771)
Dmitrijs Ledkovs   
2013-12-13 12:18   
It has proven too much work to have pyconfig.h in an multiarch location.

Therefore, pyconfig.h was re-introduced in an non-multiarch location. Instead it is a compatibility header that using compiler macros includes the correct pyconfig.h from a multiarch location.

This patch should be dropped, as it's no longer needed.
(0042284)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.