[ros-users] Cross-compilation and library locations

Daniel Maier maierd at informatik.uni-freiburg.de
Thu Apr 1 14:44:17 UTC 2010


On Thu, Apr 01, 2010 at 10:03:38AM -0400, Tom Panzarella wrote:
> >
> > I loosely followed the gumros tutorial to built log4cxx and apr and  
> > from there used a manufacturer supplied cmake toolchain file for  
> > cross-compiling ros.
> > It seemd to have worked so far, however after I copied the ros
> > directories to the Nao robot, the binaries refuse to work as they  
> > cannot
> > find the necessary libraries.
> > E.g., rospack cannot find librospack.so.
> > I assume this is because ros is linked with the rpath option  
> > pointing to
> > an absolute path. The path to the ros libraries on my desktop used to
> > cross-compile is different from the path where the libraries are  
> > located on the Nao.
> > The easiest workaround would probably be to just make the paths
> > identical. However, I was wondering if there was a nicer solution,  
> > which
> > would allow the ros folders to be moved without the need to rebuilt  
> > all
> > of ros just to set the library paths.
> 
> Dan,
> 
> Nothing specific to ROS, but did you set your LD_LIBRARY_PATH  
> environment variable to include the directory to where the ROS shared  
> object files live?
> 
> Thanks,
> Tom.
> 
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users

Tom,

thanks for the hint. However, this is actually what I try to avoid. 
Because the ros libraries are always located in the lib subfolder of a module. So even in case of just ROS core, LD_LIBRARY_PATH would have to point to
/3rdparty/gtest/gtest/lib/
/tools/rospack/lib/
/tools/rxtools/lib/
/core/roscpp/lib/
/core/message_filters/lib/
/core/rosconsole/lib/ 
etc. In case of a full ROS install this can easily be 20-30 paths. I
think that is not a nice solution, even if I wrote a script to automatically
find the libaries and append them to the LD_LIBRARY_PATH.

Best,
Dan




More information about the ros-users mailing list