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 So somewhere rosmake is using "-l/usr/lib/libgtest.a" instead of "-L /usr/lib -lgtest". Any suggestions from a rosmake guru? Wim On Sat, Nov 24, 2012 at 10:02 AM, Brian Gerkey wrote: > On Fri, Nov 23, 2012 at 7:53 PM, Wim Meeussen wrote: > > I tried one of the (ugly) workarounds from the comments above: > > > > cd /usr/src/gtest > > sudo cmake CMakeLists.txt > > sudo make > > sudo cp *.a /usr/lib > > > > This creates a static library /usr/lib/libgtest.a, but linking fails: > > > > Linking CXX executable ../bin/test_unique_id > > /usr/bin/ld: cannot find -l/usr/lib/libgtest.a > > FWIW, I've added that workaround to the setup preamble of Jenkins > builds and it worked fine. I'm surprised that the linker can't find > the lib in your case. I would turn on verbose linker output to figure > out what's going on there. > > brian. > -- Wim Meeussen CTO, hiDOF Inc. 650-529-4522 http://hidof.com