flame
flame copied to clipboard
Cannot compile, issue on linking
I am on Gentoo system and had to manually copy eigen and sophus dirs into src, no make continues, but in the very end when linking executable I get:
cc1plus: warning: unrecognized command line option ‘-Wno-deprecated-register’
[100%] Linking CXX executable ../bin/flame_test
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o: in function `__static_initialization_and_destruction_0(int, int) [clone .constprop.340]':
epipolar_geometry_test.cc:(.text.startup+0x25e): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x307): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x3af): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x457): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: epipolar_geometry_test.cc:(.text.startup+0x4ff): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o:epipolar_geometry_test.cc:(.text.startup+0x5a7): more undefined references to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/flame_test.dir/build.make:183: bin/flame_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:146: test/CMakeFiles/flame_test.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Also note I have GCC 8, should I use lower version or its different kind of error?
Also note I have dev-cpp/gtest-1.8.*, I will try to downgrade to 1.7
Hi @archenroot,
Have you solved this issue? If so, could you please share what you have done? I might have encountered the same issue as you did, here are the errors I have,
[100%] Linking CXX executable ../bin/flame_test
CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o: In function __static_initialization_and_destruction_0(int, int) [clone .constprop.643]': epipolar_geometry_test.cc:(.text.startup+0x17d): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
epipolar_geometry_test.cc:(.text.startup+0x249): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' epipolar_geometry_test.cc:(.text.startup+0x314): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
epipolar_geometry_test.cc:(.text.startup+0x3df): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' epipolar_geometry_test.cc:(.text.startup+0x4aa): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)'
CMakeFiles/flame_test.dir/stereo/epipolar_geometry_test.cc.o:epipolar_geometry_test.cc:(.text.startup+0x575): more undefined references to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void ()(), void ()(), testing::internal::TestFactoryBase*)' follow
collect2: error: ld returned 1 exit status
test/CMakeFiles/flame_test.dir/build.make:260: recipe for target 'bin/flame_test' failed
make[2]: *** [bin/flame_test] Error 1
CMakeFiles/Makefile2:140: recipe for target 'test/CMakeFiles/flame_test.dir/all' failed
make[1]: *** [test/CMakeFiles/flame_test.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2