Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'make check' fails with undefined references. #50

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 3 comments
Closed

'make check' fails with undefined references. #50

GoogleCodeExporter opened this issue Mar 21, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. ./configure
2. make
3. make check


What is the expected output? What do you see instead?

When running 'make check', I expect to see a successful build, followed by all 
tests passing.  
Instead, I see this:
make  samples/sample1_unittest samples/sample2_unittest 
samples/sample3_unittest 
samples/sample4_unittest samples/sample5_unittest samples/sample6_unittest 
test/gtest_unittest test/gtest-death-test_test test/gtest-filepath_test 
test/gtest-message_test 
test/gtest-options_test test/gtest_pred_impl_unittest 
test/gtest_environment_test 
test/gtest_no_test_unittest test/gtest_main_unittest test/gtest_prod_test 
test/gtest_repeat_test 
test/gtest_stress_test test/gtest-typed-test_test  
make[1]: Entering directory `/home/pberry/gtest/gtest-1.1.0'
depbase=`echo samples/sample1_unittest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I./config_aux  -I. -I./include   -g -O2 -MT 
samples/sample1_unittest.o -MD -MP -MF "$depbase.Tpo" -c -o 
samples/sample1_unittest.o 
samples/sample1_unittest.cc; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
/bin/sh ./libtool --tag=CXX --mode=link g++  -g -O2   -o 
samples/sample1_unittest  
samples/sample1_unittest.o lib/libgtest_main.la samples/libsamples.la 
g++ -g -O2 -o samples/.libs/sample1_unittest samples/sample1_unittest.o  
lib/.libs/libgtest_main.so samples/.libs/libsamples.a -Wl,--rpath 
-Wl,/usr/local/lib
samples/sample1_unittest.o(.text+0x1303): In function `global constructors 
keyed to 
_ZN27FactorialTest_Negative_Test10test_info_E':
./include/gtest/internal/gtest-internal.h:484: undefined reference to 
`testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char 
const*, char const*, 
void*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
samples/sample1_unittest.o(.text+0x134d):./include/gtest/internal/gtest-internal
.h:484: 
undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, 
char const*, 
char const*, char const*, void*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)'
samples/sample1_unittest.o(.text+0x1397):./include/gtest/internal/gtest-internal
.h:484: 
undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, 
char const*, 
char const*, char const*, void*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)'
samples/sample1_unittest.o(.text+0x13e1):./include/gtest/internal/gtest-internal
.h:484: 
undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, 
char const*, 
char const*, char const*, void*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)'
samples/sample1_unittest.o(.text+0x142b):./include/gtest/internal/gtest-internal
.h:484: 
undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, 
char const*, 
char const*, char const*, void*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)'
samples/sample1_unittest.o(.text+0x1475):./include/gtest/internal/gtest-internal
.h:484: more 
undefined references to `testing::internal::MakeAndRegisterTestInfo(char 
const*, char const*, 
char const*, char const*, void*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)' follow
collect2: ld returned 1 exit status
make[1]: *** [samples/sample1_unittest] Error 1
make[1]: Leaving directory `/home/pberry/gtest/gtest-1.1.0'
make: *** [check-am] Error 2


What version of the product are you using? On what operating system?

I am using version 1.1.0 on an AMD Opteron 285.  The OS is RedHat 4 update 1.  
Here is the 
result of 'uname -a':
Linux sim12 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:13:42 EST 2007 x86_64 
x86_64 x86_64 
GNU/Linux

And here is the result of gcc --version:
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Please provide any additional information below.



Original issue reported on code.google.com by stereoty...@gmail.com on 14 Oct 2008 at 4:09

@GoogleCodeExporter
Copy link
Author

We couldn't repro it on our machines.

This looks like you are linking with an old version of gtest.  Perhaps you 
didn't 
clean up the build after you upgraded to 1.1.0.  Please try 'make clean' first. 

Better yet, try a fresh copy of gtest 1.2.0.

Original comment by shiq...@gmail.com on 2 Dec 2008 at 4:57

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Original comment by shiq...@gmail.com on 2 Dec 2008 at 5:01

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

No response from the reporter.

Original comment by zhanyong...@gmail.com on 22 Feb 2009 at 5:24

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant