View Issue Details

IDProjectCategoryView StatusLast Update
0001850Slicer4Core: Building (CMake, Superbuild)public2012-08-21 09:47
Reporterdomibel Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001850: Found PythonLibs: ... get_filename_component unknown component optimized
Description

System is Debian Testing
$ cmake --version
cmake version 2.8.7

Following the standard compilation workflow with superbuild and latest unpatched Slicer4 sources off the trunk I am running into compilation issues:

-- Found PythonLibs: optimized;optimized;optimized;debug;optimized;debug;optimized;optimized;debug;optimized
CMake Error at CMake/ctkMacroCompilePythonScript.cmake:22 (get_filename_component):
get_filename_component unknown component optimized
Call Stack (most recent call first):
Libs/Scripting/Python/Core/Python/CMakeLists.txt:37 (ctkMacroCompilePythonScript)

TagsNo tags attached.

Activities

jcfr

jcfr

2012-04-01 17:16

administrator   ~0003939

Does this error happen while configuring Slicer or CTK ?

Is there a "virtual box file" that I could use to reproduce and debug on my side ?

domibel

domibel

2012-04-01 17:30

developer   ~0003940

Unfortunately I don't have a virtual box available.

But if you have a PC with an external harddrive (or lots of RAM ~20GB) you could start a Ubuntu 12.04 beta live CD and compile there. Ubuntu 12.04 should be very similar to Debian Testing.

domibel

domibel

2012-04-02 16:18

developer   ~0003956

I made a change to Slicer4-SuperBuild/CTK/CMake/ctkMacroCompilePythonScript.cmake

Extract python lib path

  • message(STATUS "PYTHON_LIBRARY_PATH: ${PYTHON_LIBRARY_PATH} , PYTHON_LIBRARY: ${PYTHON_LIBRARY}")
    get_filename_component(PYTHON_LIBRARY_PATH ${PYTHON_LIBRARY} PATH)

This results in
-- Found PythonLibs: optimized;optimized;optimized;debug;optimized;debug;optimized;optimized;debug;optimized
-- PYTHON_LIBRARY_PATH: , PYTHON_LIBRARY: optimized;optimized;optimized;debug;optimized;debug;optimized;optimized;debug;optimized
CMake Error at CMake/ctkMacroCompilePythonScript.cmake:23 (get_filename_component):
get_filename_component unknown component optimized
Call Stack (most recent call first):
Libs/Scripting/Python/Core/Python/CMakeLists.txt:37 (ctkMacroCompilePythonScript)

For some weird reason it cannot find Slicer's python library.

gregsharp

gregsharp

2012-04-12 18:46

developer   ~0004015

I can explain the problem, and it seems clearly a bug in FindPythonLibs.cmake. But don't know the solution, nor can I understand why only debian testing sees this problem.

(1) find_package(PythonLibs) is called several times in different CTK scripts
(2) inside FindPythonLib.cmake, the variable PYTHON_LIBRARY and PYTHON_LIBRARIES are set. they are set as a string that contains both the debug and release versions: "optimized;library.so;debug;optimized.so". this is by design; this string is sent to target_link_libraries(), which is smart enough to understand a string of this form.
(3) the second time find_package(PythonLibs) is included, PYTHON_LIBRARY still has its old value. It is passed as an argument to select_library_configuration(), which is illegal because that function only works on plain library strings (like "library.so") instead of the complicated library strings.

bmoloney

bmoloney

2012-04-25 16:24

reporter   ~0004077

I am seeing this on Debian Squeeze with CMake 2.8.7 installed from backports.

$ apt-show-versions cmake
cmake/squeeze-backports uptodate 2.8.7-4~bpo60+1

I guess this is either a bug in this version of CMake or the Debian packaging.

bmoloney

bmoloney

2012-04-26 12:33

reporter   ~0004091

I just built CMake 2.8.8 from source and it fixed this issue.

jcfr

jcfr

2012-04-26 12:37

administrator   ~0004092

Thanks for looking into the issue :)

Dominique, Greg> Could you confirm that building using CMake 2.8.8 solves the problem.

domibel

domibel

2012-04-26 16:09

developer   ~0004103

cmake 2.8.8 works for me.

Now I am fighting with the missing launcher, but this is another story.

Issue History

Date Modified Username Field Change
2012-04-01 16:55 domibel New Issue
2012-04-01 16:55 domibel Status new => assigned
2012-04-01 16:55 domibel Assigned To => jcfr
2012-04-01 17:16 jcfr Note Added: 0003939
2012-04-01 17:30 domibel Note Added: 0003940
2012-04-02 16:18 domibel Note Added: 0003956
2012-04-12 18:46 gregsharp Note Added: 0004015
2012-04-25 16:24 bmoloney Note Added: 0004077
2012-04-26 12:33 bmoloney Note Added: 0004091
2012-04-26 12:37 jcfr Note Added: 0004092
2012-04-26 12:37 jcfr Assigned To jcfr => domibel
2012-04-26 12:37 jcfr Assigned To domibel => jcfr
2012-04-26 12:37 jcfr Status assigned => feedback
2012-04-26 13:16 jcfr Status feedback => assigned
2012-04-26 13:16 jcfr Assigned To jcfr => domibel
2012-04-26 16:09 domibel Note Added: 0004103
2012-04-26 16:09 domibel Status assigned => resolved
2012-04-26 16:09 domibel Resolution open => fixed
2012-04-27 12:59 jcfr Status resolved => assigned
2012-04-27 12:59 jcfr Assigned To domibel => jcfr
2012-04-27 12:59 jcfr Status assigned => closed
2012-04-27 12:59 jcfr Fixed in Version => Slicer 4.x AHM Summer 2012
2012-08-21 09:47 jcfr Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012