orocos / orocos_kinematics_dynamics

Orocos Kinematics and Dynamics C++ library
679 stars 407 forks source link

Set correct rpath for python module #411

Closed smorad closed 1 year ago

smorad commented 2 years ago

This package is currently breaking ROS2 builds on MacOS. Can this be merged into master so source builds succeed?

Since newer versions of OSX you cannot rely on the DYLD_LIBRARY_PATH anymore to find depending libraries, the rpath is the only way to get this working

Signed-off-by: Ruben Smits ruben@intermodalics.eu

MatthijsBurgh commented 2 years ago

Industrial CI is only run for PRs into the release branches. Normally that isn't a problem as only the features inside the library are changed. As this PR affects the build procedure. I will need to test this in combination with catkin in a docker. So be patient.

MatthijsBurgh commented 2 years ago
amigo@athome20 $ catkin build --this
------------------------------------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/noetic
Workspace:                   /home/amigo/ros/noetic/system
------------------------------------------------------------------------------------------
Build Space:        [exists] /home/amigo/ros/noetic/system/build
Devel Space:        [exists] /home/amigo/ros/noetic/system/devel
Docs Space:         [exists] /home/amigo/ros/noetic/system/docs
Install Space:      [unused] /home/amigo/ros/noetic/system/install
Log Space:          [exists] /home/amigo/ros/noetic/system/logs
Source Space:       [exists] /home/amigo/ros/noetic/system/src
DESTDIR:            [unused] None
------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
------------------------------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=OFF
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
------------------------------------------------------------------------------------------
Buildlisted Packages:        None
Skiplisted Packages:         None
------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
------------------------------------------------------------------------------------------
[build] Found 115 packages in 0.0 seconds.                                                          
[build] Package table is up to date.                                                                
Starting  >>> orocos_kdl                                                                            
Finished  <<< orocos_kdl                       [ 0.9 seconds ]                                      
Starting  >>> python_orocos_kdl                                                                     
____________________________________________________________________________________________________
Errors     << python_orocos_kdl:cmake /home/amigo/ros/noetic/system/logs/python_orocos_kdl/build.cmake.020.log
CMake Error at /home/amigo/ros/noetic/system/src/python_orocos_kdl/CMakeLists.txt:68 (FILE):
  FILE RELATIVE_PATH must be passed a full path to the directory:
  lib/python3/dist-packages

cd /home/amigo/ros/noetic/system/build/python_orocos_kdl; catkin build --get-env python_orocos_kdl | catkin env -si  /usr/bin/cmake /home/amigo/ros/noetic/system/src/python_orocos_kdl --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/amigo/ros/noetic/system/devel/.private/python_orocos_kdl -DCMAKE_INSTALL_PREFIX=/home/amigo/ros/noetic/system/install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=OFF; cd -

....................................................................................................
Failed     << python_orocos_kdl:cmake          [ Exited with code 1 ]                               
Failed    <<< python_orocos_kdl                [ 1.5 seconds ]                                      
[build] Summary: 1 of 2 packages succeeded.                                                         
[build]   Ignored:   113 packages were skipped or are skiplisted.                                   
[build]   Warnings:  None.                                                                          
[build]   Abandoned: None.                                                                          
[build]   Failed:    1 packages failed.                                                             
[build] Runtime: 2.7 seconds total.                                                                 
[build] Note: Workspace packages have changed, please re-source setup files to use them.

@smorad it fails to build with catkin.

MatthijsBurgh commented 2 years ago

@smorad, You are trying to fix Mac OS. So why does the if condition also include linux systems?

smorad commented 2 years ago

@MatthijsBurgh this is not my commit, it's just a branch in the repo. But I assume wrapping in an if(macos) block would fix this, no?

MatthijsBurgh commented 2 years ago

@smits to what extend did you test/use it?

MatthijsBurgh commented 1 year ago

Closing this PR because of inactivity.