hi Rene, On Sat, Sep 18, 2010 at 4:00 PM, Rene Ladan wrote: > I have written a port for ROS (http://www.ros.org/) on FreeBSD [1]. > When installing the port, several issues arise: > (a) some executables (e.g. rospack) and libraries hard-code the path to > some libraries they use, resulting in "cannot find library X" errors. > This can be seen when running ldd on these files. This seems to make it > harder to install these files in a different location (PREFIX, e.g. > /usr/local) than where they were built. How is this handled in the > Ubuntu packages? > > (b) The file layout of ROS and FreeBSD (packages) differ for various > reasons. The file layout for FreeBSD is described in [2]. The file > layout of ROS is shown in the pkg-plist file in [1], with the exception > that I intend to move the files in ros/bin to PREFIX/bin (does not work > without symbolic links) and the *.so files which are not in 3rdparty > into PREFIX/lib (but see (a) ). I was also thinking about moving the > header files to PREFIX/include, but that will not work because the > compiler does not look into /usr/local/include by default and nothing in > ROS nor FreeBSD tells it to look there. The above seems a reasonable > compromise to me. Comments / objections / ideas are welcome. You're running up against a long-standing issue with ROS, which is the lack of an install step: https://code.ros.org/trac/ros/ticket/946 . As it happens, I've worked on this a bit over the last few days. I'm prototyping an installation system in a branch: https://code.ros.org/svn/ros/stacks/ros/branches/install_target . It's not ready for use yet, but you can type 'make install' in ROS_ROOT and watch some stuff happen. After some more work, I intend to circulate it for comments on ros-developers sometime next week. To the specific issues that you're seeing: (a) For the Ubuntu packages, we do something that I think on alternate days to be clever and embarrassing, which is to use chrpath to rewrite the rpath entries in the executables (including shared libs). The installation system I'm working on will handle the issue properly by putting the libraries into a common lib directory and stripping all rpath entries. Either that lib directory is already in your /etc/ld.so.conf (e.g., it's /usr/lib) or you can add it to your LD_LIBRARY_PATH. (b) I'm still working on the installation layout. We can discuss that more concretely after my prototype is a little further along. brian.