[ros-users] (groovy) absolute paths in pkg-config .pc files

Dirk Thomas dthomas at willowgarage.com
Sat Jan 19 00:11:00 UTC 2013


First, the right way to pass it to g++ would be as a plain absolute path without any prefix.

But when we put that in a .pc file pkg-config screws up when you ask it for "--libs" because it reorders the libraries putting all absolute libraries without a "-l" prefix to the front.

Second, we don't want to split absolute paths into "-L" and "-l" because this might lead to wrong libraries being linked (since libraries in previous path specified with "-L" will overlay later ones).

Therefore the current version of catkin generates absolute paths with "-l:" which prevents the pkg-config reordering and still works for g++.
These packages are current only available in shadow-fixed (public still contains the version from Dec 31th).

(The next sync from shadow-fixed to public will happen when non of the released packages are failing which have been released to public before.)

Besides: all catkin packages are not using these .pc files at all since all library and include path stuff is passed via find_package() and cmake-config files.

- Dirk


On 18.01.2013 15:54, Brian Wightman wrote:
> Is it standard practice to put the full path to a *.so in a "-l" flag?
>
> For example in groovy:
>
> $ pkg-config --libs rospack
> -L/opt/ros/groovy/lib
> -lrospack
> -ltinyxml
> -l/usr/lib/libpython2.7.so
> -l/usr/lib/libboost_filesystem-mt.so
> -l/usr/lib/libboost_program_options-mt.so
> -l/usr/lib/libboost_system-mt.so
>
> Absolute paths can be seen in a good number of standard packages' *.pc files.
>
> Why can't we simply put [python2.7, boost_filesystem-mt, boost_program_options-mt, boost_system-mt]?
>
> g++ won't take this format, is cmake magically converting these?
>
> - Brian
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users




More information about the ros-users mailing list