[Ros-release] Dry stack prereleases for groovy

Brian Gerkey gerkey at osrfoundation.org
Tue Nov 27 19:02:36 UTC 2012


On Mon, Nov 26, 2012 at 1:02 PM, Peter Soetens <peter at thesourceworks.com> wrote:
> On Mon, Nov 26, 2012 at 8:06 PM, Wim Meeussen <wim at hidof.com> wrote:
>> I had done the exact same thing and added the workaround to the Jenkins
>> setup preamble. This is the verbose output of what actually gets called:
>>
>> /usr/bin/c++    -pthread -O2 -g
>> -L/tmp/install_dir/stack_overlay/unique_identifier/unique_id/lib
>> CMakeFiles/test_unique_id.dir/tests/test_unique_id.cpp.o  -o
>> ../bin/test_unique_id -rdynamic -L/opt/ros/groovy/lib -lroscpp
>> -lboost_signals-mt -lboost_filesystem-mt -lrosconsole -lroscpp_serialization
>> -lxmlrpcpp -lrostime -lboost_date_time-mt -lboost_system-mt
>> -lboost_thread-mt -lpthread -lcpp_common -l/usr/lib/libgtest.a
>> -Wl,-rpath,/opt/ros/groovy/lib
>>
>> /usr/bin/ld: cannot find -l/usr/lib/libgtest.a
>
> I think it would work with dropping the '-l' part, although my
> interpretation of the ld man page would say that
> -l:/usr/lib/libgtest.a would also work. So if you can hard-code that
> colon somewhere, you're done too.

It should also work if you drop the path (i.e., just provide -lgtest),
as any sane system will have /usr/lib in the default linker search
path.

>> So somewhere rosmake is using "-l/usr/lib/libgtest.a" instead of "-L
>> /usr/lib -lgtest". Any suggestions from a rosmake guru?
>
> You're of course waiting for Brian to take the bait :-) The latter
> form is considered bad practice. One should always use the absolute
> path and no search paths.

I was a rosmake guru only back when it was written in bash :)

Looking at rosbuild, there's some code to try to build gtest from
/usr/src directly into the project; that's probably what Tully is
referring to.  I would start debugging in there:
/opt/ros/groovy/share/ros/core/rosbuild/public.cmake:
rosbuild_add_gtest_build_flags().

In the same file (in rosbuild_init()), there's some old logic to try
to find gtest via `gtest-config`, which in the case where you manually
built and copied the libs into /usr/lib, should be doing the right
thing.  I.e., it'll fail to run `gtest-config` and will fall back on
setting the gtest libs as being '-lgtest'.  But I'm not sure how
that's interacting with the other code to build it for each project.

    brian.



More information about the Ros-release mailing list