[ros-users] [freebsd] Installing ROS on FreeBSD

Rene Ladan rene at freebsd.org
Sun Sep 19 13:10:27 UTC 2010


On 19-09-2010 02:11, Brian Gerkey wrote:
> hi Rene,
> 
> On Sat, Sep 18, 2010 at 4:00 PM, Rene Ladan <rene at freebsd.org> 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.
>
I have checked out the branch, I will see how it behaves.

> 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.
On the short run, do you advice using this branch or the chrpath method
above? I could add the chrpath method to the custom install target of
the FreeBSD port.

> 
> (b) I'm still working on the installation layout.  We can discuss that
> more concretely after my prototype is a little further along.
>
Fine with me. The idea of the hier(7) manual page is to keep the file
layout consistent, but not all software ported to FreeBSD fully complies
with it. OpenOffice.org seems to be a big offender.

Rene
-- 
http://www.rene-ladan.nl/

GPG fingerprint = ADBC ECCD EB5F A6B4 549F  600D 8C9E 647A E564 2BFC
(subkeys.pgp.net)



More information about the ros-users mailing list