Thiago-

This is the exact issue I was having a few days ago, where rebuilding
GTest was the solution. ?GetBoolAssertionFailureMessage is inside the
libgtest. ?The linking options LOOKED right to me when I debugged, it
was properly finding the correct libgtest.a (Confirmed by deleting the
one I expected it to pick up, and seeing that the link error was
different), but this symbol wasn't in it correctly.

Could some versions of our gtest have incompletely built .a files? ?I
rebuilt gtest (deleted the .a files, then did a 'make' in the gtest
directory) to fix mine, but no idea if that would fix Joey's.

On Wed, 2016-04-27 at 23:00 -0700, Thiago Macieira wrote:
> On quarta-feira, 13 de abril de 2016 16:04:17 PDT Morrow, Joseph L
> wrote:
> > Sorry, I forgot the attachment. Here it is!
> 
> caprotocolmessagetest.o: In function `(anonymous?
> namespace)::verifyParsedOptions((anonymous namespace)::CoAPOptionCase
> const*,?
> unsigned long, coap_linkedlistnode*)':
> 
> caprotocolmessagetest.cpp:(.text+0x8b): undefined reference to?
> `testing::internal::GetBoolAssertionFailureMessage(testing::Assertion
> Result?
> const&, char const*, char const*, char const*)'
> 
> There's no GetBoolAssertionFailureMessage in our code. But the?
> verifyParsedOptions function has macros:
> 
> ????????EXPECT_TRUE(option != NULL);
> 
> That must be coming from GTest (indeed, I can find that function in
> GTest's?
> headers).
> 
> Conclusion: the test isn't linking to the GTest library.
> 
> Unfortunately, Scons only printed this about the linking:
> 
> Linking
> out/linux/x86_64/release/resource/csdk/connectivity/test/catests
> 
> Can you get the actual command-line it passed to the linker?
> 
> The SConscript file has this:
> catest_env.AppendUnique(LIBPATH = [src_dir + '/extlibs/gtest/gtest-
> 1.7.0/
> lib/.libs'])
> catest_env.PrependUnique(LIBS = ['m',
> ????????????????????????????????????'octbstack',
> ????????????????????????????????????'connectivity_abstraction',
> ????????????????????????????????????'coap',
> ????????????????????????????????????'gtest',
> ????????????????????????????????????'gtest_main'])
> 
> 1) do you have GTest installed system-wide?
> 2) do you have anything in that extlibs build dir?
> 3) if so on #2, can you confirm the symbol in question is present in?
> libgtest.so?
> ? nm -DC path/to/libgtest.so | grep GetBoolAssertionFailureMessage

Reply via email to