MantisBT - CMake
View Issue Details
0012247CMakeModulespublic2011-06-06 06:542011-11-11 10:45
Christoph Höger 
Brad King 
normalminoralways
closedfixed 
fedora 15 x86_64linux 2.6.38.6-27
 
CMake 2.8.5CMake 2.8.5 
0012247: python libraries are not searched under lib64/
The FindPythonLibs.cmake module does not search the python library in the correct place. Presumably because of the use of PATH_SUFFIXES.
invoke

find_package(PythonLibs)

under fedora
Find attached a workaround for that problem (probably breaks on other platforms, cannot test there)
No tags attached.
related to 0012037closed Brad King support multiarch lib paths for Debian/Ubuntu 
related to 0012248closed Brad King Boost libraries are not searched in /usr/lib64 
patch cmake-python-libs.patch (538) 2011-06-06 06:54
https://public.kitware.com/Bug/file/3911/cmake-python-libs.patch
Issue History
2011-06-06 06:54Christoph HögerNew Issue
2011-06-06 06:54Christoph HögerFile Added: cmake-python-libs.patch
2011-06-07 08:18Eric NOULARDRelationship addedrelated to 0011964
2011-06-07 08:19Eric NOULARDRelationship addedrelated to 0012037
2011-06-14 13:35Brad KingRelationship addedrelated to 0012248
2011-06-14 13:38Brad KingRelationship deletedrelated to 0011964
2011-06-14 13:39Brad KingNote Added: 0026860
2011-06-14 13:40Brad KingNote Added: 0026861
2011-06-14 13:54Christoph HögerNote Added: 0026862
2011-06-14 14:38Brad KingNote Added: 0026864
2011-06-14 14:39Brad KingNote Added: 0026865
2011-06-14 17:00Christoph HögerNote Added: 0026867
2011-06-14 17:21Brad KingNote Added: 0026868
2011-06-15 04:50Christoph HögerNote Added: 0026869
2011-06-15 08:24Brad KingAssigned To => Brad King
2011-06-15 08:24Brad KingStatusnew => assigned
2011-06-15 09:01Brad KingNote Added: 0026872
2011-06-15 09:01Brad KingStatusassigned => resolved
2011-06-15 09:01Brad KingResolutionopen => fixed
2011-06-21 13:02David ColeFixed in Version => CMake 2.8.5
2011-06-21 13:02David ColeTarget Version => CMake 2.8.5
2011-11-11 10:45David ColeNote Added: 0027776
2011-11-11 10:45David ColeStatusresolved => closed

Notes
(0026860)
Brad King   
2011-06-14 13:39   
Removed relationship with issue 0011964 which is about installation, not finding.
(0026861)
Brad King   
2011-06-14 13:40   
Comment 0012248:0026857 applies here too, I think.

Are you using a Fedora-provided CMake or one downloaded from cmake.org?
(0026862)
Christoph Höger   
2011-06-14 13:54   
This is the fedora rpm (cmake-2.8.4-1.fc15.x86_64), I doubt there are any changes to the Find* scripts.
(0026864)
Brad King   
2011-06-14 14:38   
Please add this code just before the find_package(PythonLibs) call in your project:

  get_property(lib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
  message("lib64=[${lib64}]")

What does it print?
(0026865)
Brad King   
2011-06-14 14:39   
and this one too please:

  message("CMAKE_SIZEOF_VOID_P=[${CMAKE_SIZEOF_VOID_P}]")
(0026867)
Christoph Höger   
2011-06-14 17:00   
lib64=[TRUE]
CMAKE_SIZEOF_VOID_P=[8]

Does that help you in any way?
(0026868)
Brad King   
2011-06-14 17:21   
Re 0012247:0026867: That says that find_library should be doing the lib->lib64 transformation automatically.

Unfortunately I cannot reproduce this, but I do not actually have a Fedora 15 box. A co-worker has a Fedora 14 box with CMake 2.8.4-1 and find_package(PythonLibs) works for him (producing /usr/lib64/...).

Might you be willing to build a debug version of CMake and trace through or add debugging statements?
(0026869)
Christoph Höger   
2011-06-15 04:50   
No need for a debug trace. I just downloaded the source and found the relevant code line:

void cmFindLibraryCommand::AddLib64Paths()
{
  if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
     GetLanguageEnabled("C"))

My project was a CXX only project - I'd guess one might also need dynamic libraries without even using a C/C++ compiler, so I'd propose to remove that statement. Setting my project to also be a C project fixes this one and 0012248 as well.
(0026872)
Brad King   
2011-06-15 09:01   
Re 0012247:0026869: Great! I've committed a fix. See commit message for a full explanation:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ba1713f [^]
(0027776)
David Cole   
2011-11-11 10:45   
Closing resolved issues that have not been updated in more than 4 months.