arac icon indicating copy to clipboard operation
arac copied to clipboard

Build Error when running scons

Open saatvikshah opened this issue 10 years ago • 2 comments

Im getting the following error log after installing all dependencies and running scons to build.

scons: done reading SConscript files. scons: Building targets ... swig -o src/swig/cppbridge_wrap.cc -python -c++ -outdir src/python/arac src/swig/cppbridge.i g++ -o test-arac src/cpp/tests/test_datasets.o src/cpp/tests/test_main.o src/cpp/tests/test_optimzation.o src/cpp/tests/test_structure.o src/cpp/tests/test_utilities.o -L/usr/lib -L. -L/usr/local/lib -L/sw/lib -larac -lgtest /usr/bin/ld: /usr/lib/libgtest.a(gtest-all.cc.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status scons: *** [test-arac] Error 1 scons: building terminated because of errors.

saatvikshah avatar Nov 08 '14 23:11 saatvikshah

Build Error when running scons

test_structure.cpp:(.text.ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0[testing::AssertionResult testing::internal::CmpHelperEQ<int, unsigned long>(char const_, char const_, int const&, unsigned long const&)]+0x94): undefined reference to testing::internal::EqFailure(char const*, char const*, testing::internal::String const&, testing::internal::String const&, bool)' src/cpp/tests/test_structure.o:test_structure.cpp:(.text._ZN7testing8internal11CmpHelperEQIPN4arac9structure11connections14FullConnectionEPNS3_12ParametrizedEEENS_15AssertionResultEPKcSB_RKT_RKT0_[testing::AssertionResult testing::internal::CmpHelperEQ<arac::structure::connections::FullConnection*, arac::structure::Parametrized*>(char const*, char const*, arac::structure::connections::FullConnection* const&, arac::structure::Parametrized* const&)]+0xa9): more undefined references totesting::internal::EqFailure(char const_, char const_, testing::internal::String const&, testing::internal::String const&, bool)' follow collect2: ld returned 1 exit status scons: *** [test-arac] Error 1 scons: building terminated because of errors.

icemansina avatar Nov 15 '14 03:11 icemansina

@saatvikshah1994: I had the same problem. To overcome it I modifiied line 44 in SConstruct, from:

"testenv = Environment(LIBS=['arac', 'gtest'], CPPPATH=CPPPATH, LIBPATH=LIBPATH)"

to

testenv = Environment(LIBS=['arac', 'gtest', 'pthread'], CPPPATH=CPPPATH, LIBPATH=LIBPATH).

Then it worked.

PaulHuygen avatar Apr 29 '15 12:04 PaulHuygen