[Bug 699] New: CMake python bindings problem

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=699

Summary: CMake python bindings problem
Product: KDL
Version: kdl-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P3
Component: Build system
AssignedTo: orocos-dev [..] ...
ReportedBy: meeussen [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

There is a typo in the cmake macro to find the python bindings.

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 30449)
+++ CMakeLists.txt (working copy)
@@ -66,10 +66,11 @@

INCLUDE (${PROJ_SOURCE_DIR}/config/DependentOption.cmake)

OPTION( PYTHON_BINDINGS "Build python-bindings?" OFF)
-IF(PYTHON-BINDINGS)
+IF(PYTHON_BINDINGS)
INCLUDE (${PROJ_SOURCE_DIR}/config/FindSIPandPython.cmake)
-ENDIF(PYTHON-BINDINGS)
+ENDIF(PYTHON_BINDINGS)

OPTION(ENABLE_TESTS OFF "Enable building of tests")
IF( ENABLE_TESTS )

The patch above fixes the detection of the bindings, but I get yet another
error when installing kdl:

- Installing:
/u/meeussen/ros/ros-pkg-svn/stacks/geometry/kdl/kdl/lib/liborocos-kdl.so
-- Installing: /usr/lib/python2.5/site-packages/PyKDL.so
CMake Error at src/bindings/python/cmake_install.cmake:42 (FILE):
file INSTALL cannot copy file

"/u/meeussen/ros/ros-pkg-svn/stacks/geometry/kdl/kdl-svn-trunk/build/src/bindings/python/PyKDL.so"
to "/usr/lib/python2.5/site-packages/PyKDL.so".
Call Stack (most recent call first):
src/cmake_install.cmake:145 (INCLUDE)
cmake_install.cmake:42 (INCLUDE)

Ruben Smits's picture

[Bug 699] CMake python bindings problem

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=699

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |ruben [dot] smits [..] ...en.b
| |e
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #1 from Ruben Smits <ruben [dot] smits [..] ...> 2009-08-26 10:11:30 ---
svn ci -m"Fix Bug 699 - CMake python bindings problem: fixed the typo"
Sending CMakeLists.txt
Sending src/chainiksolvervel_pinv_givens.cpp
Transmitting file data ..
Committed revision 30450.

The other error is probably due to the fact that you do not have write
permissions for /usr/lib/python2.5/site-packages

If you want to install the python bindings in some other place you have to add
to add the -DPYTHON_SITE_PACKAGES_DIR=/some/other/path to the cmake command
line.

Ruben