So I think that with the change of gtest packaging to not distribute the libraries we have updated our macros to build gtest on demand into every project so that gtest gets the correct flags for the project.  (This was the reason for not distributing gtest as a library.  )  It is my understanding that gtest should be being automatically built locally and automatically linked, not from /usr/ but from the build directory when you use the gtest macros.   As such I think that all these workarounds are not necessarily what we want, this should be handled by the macro itself.  Dirk worked on this most recently.  He'll be back from vacation shortly.  <div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Nov 26, 2012 at 1:02 PM, Peter Soetens <span dir="ltr"><<a href="mailto:peter@thesourceworks.com" target="_blank">peter@thesourceworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Nov 26, 2012 at 8:06 PM, Wim Meeussen <<a href="mailto:wim@hidof.com">wim@hidof.com</a>> wrote:<br>
> I had done the exact same thing and added the workaround to the Jenkins<br>
> setup preamble. This is the verbose output of what actually gets called:<br>
><br>
><br>
><br>
><br>
> /usr/bin/c++    -pthread -O2 -g<br>
> -L/tmp/install_dir/stack_overlay/unique_identifier/unique_id/lib<br>
> CMakeFiles/test_unique_id.dir/tests/test_unique_id.cpp.o  -o<br>
> ../bin/test_unique_id -rdynamic -L/opt/ros/groovy/lib -lroscpp<br>
> -lboost_signals-mt -lboost_filesystem-mt -lrosconsole -lroscpp_serialization<br>
> -lxmlrpcpp -lrostime -lboost_date_time-mt -lboost_system-mt<br>
> -lboost_thread-mt -lpthread -lcpp_common -l/usr/lib/libgtest.a<br>
> -Wl,-rpath,/opt/ros/groovy/lib<br>
><br>
> /usr/bin/ld: cannot find -l/usr/lib/libgtest.a<br>
<br>
</div>I think it would work with dropping the '-l' part, although my<br>
interpretation of the ld man page would say that<br>
-l:/usr/lib/libgtest.a would also work. So if you can hard-code that<br>
colon somewhere, you're done too.<br>
<div class="im"><br>
><br>
><br>
><br>
><br>
> So somewhere rosmake is using "-l/usr/lib/libgtest.a" instead of "-L<br>
> /usr/lib -lgtest". Any suggestions from a rosmake guru?<br>
<br>
</div>You're of course waiting for Brian to take the bait :-) The latter<br>
form is considered bad practice. One should always use the absolute<br>
path and no search paths.<br>
<span class="HOEnZb"><font color="#888888"><br>
Peter<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Ros-release mailing list<br>
<a href="mailto:Ros-release@code.ros.org">Ros-release@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-release" target="_blank">https://code.ros.org/mailman/listinfo/ros-release</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Tully Foote<br><a href="mailto:tfoote@willowgarage.com" target="_blank">tfoote@willowgarage.com</a><br>(650) 475-2827<br>
</div>