-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
When I try to "make cpptest" I see the error message:
[ 93%] Linking CXX executable container_test
CMakeFiles/container_test.dir/tests/cpp/container_test.cc.o: In function InplaceArrayBase_BadExceptionSafety_Test::TestBody()': /hdd/_tvm/tvm/tests/cpp/container_test.cc:123: undefined reference to testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&>, char const*, int, testing::internal::DeathTest**)'
CMakeFiles/container_test.dir/tests/cpp/container_test.cc.o: In function InplaceArrayBase_ExceptionSafety_Test::TestBody()': /hdd/_tvm/tvm/tests/cpp/container_test.cc:143: undefined reference to testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&>, char const*, int, testing::internal::DeathTest**)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [CMakeFiles/container_test.dir/build.make:86: container_test] Error 1
make[2]: *** [CMakeFiles/Makefile2:631: CMakeFiles/container_test.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:933: CMakeFiles/cpptest.dir/rule] Error 2
make: *** [Makefile:541: cpptest] Error 2
How to fix this issue? All other tests are being compiled without any problems.
And there are other problems: I'm getting several compiled tests but when I try to run them I see "Program received signal SIGSEGV, Segmentation fault." like here:
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /hdd/_tvm/tvm/build/tir_analysis_side_effect
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SimplePasses
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff409a5c3 in testing::TestCase::RunSetUpTestCase() () from /usr/local/lib/libgtest.so
#2 0x00007ffff40b1c3e in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::TestCase, void>(testing::TestCase*, void (testing::TestCase::)(), char const) ()
from /usr/local/lib/libgtest.so
#3 0x00007ffff409a38b in void testing::internal::HandleExceptionsInMethodIfSupported<testing::TestCase, void>(testing::TestCase*, void (testing::TestCase::)(), char const) ()
from /usr/local/lib/libgtest.so
#4 0x00007ffff408141e in testing::TestCase::Run() () from /usr/local/lib/libgtest.so
#5 0x00007ffff4088c41 in testing::internal::UnitTestImpl::RunAllTests() () from /usr/local/lib/libgtest.so
#6 0x00007ffff40b390e in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const) () from /usr/local/lib/libgtest.so
#7 0x00007ffff409b9ab in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::)(), char const) () from /usr/local/lib/libgtest.so
#8 0x00007ffff4088913 in testing::UnitTest::Run() () from /usr/local/lib/libgtest.so
#9 0x0000000000409861 in RUN_ALL_TESTS () at /usr/local/include/gtest/gtest.h:2471
#10 0x0000000000408a62 in main (argc=1, argv=0x7fffffffe028) at /hdd/_tvm/tvm/tests/cpp/tir_analysis_side_effect.cc:40
Obviously there are some problems with google tests env but what are the problems?