flashlight: Build errors for CPU backend

While trying to build for CPU backend, I get a list of build error starting with these:-

[ 61%] Linking CXX executable MemoryFrameworkTest CMakeFiles/MemoryFrameworkTest.dir/memory/MemoryFrameworkTest.cpp.o: In function (anonymous namespace)::MockTestMemoryManager::alloc(bool, unsigned int, long long*, unsigned int)': MemoryFrameworkTest.cpp:(.text+0x5ca): undefined reference to testing::internal::UntypedFunctionMockerBase::SetOwnerAndName(void const*, char const*)’ MemoryFrameworkTest.cpp:(.text+0x5eb): undefined reference to testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void*)' CMakeFiles/MemoryFrameworkTest.dir/memory/MemoryFrameworkTest.cpp.o: In function (anonymous namespace)::MockTestMemoryManager::allocated(void*)‘: MemoryFrameworkTest.cpp:(.text+0x6dc): undefined reference to testing::internal::UntypedFunctionMockerBase::SetOwnerAndName(void const*, char const*)' MemoryFrameworkTest.cpp:(.text+0x6ee): undefined reference to testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void*)’ CMakeFiles/MemoryFrameworkTest.dir/memory/MemoryFrameworkTest.cpp.o: In function (anonymous namespace)::MockTestMemoryManager::jitTreeExceedsMemoryPressure(unsigned long)': MemoryFrameworkTest.cpp:(.text+0x7dc): undefined reference to testing::internal::UntypedFunctionMockerBase::SetOwnerAndName(void const*, char const*)’ MemoryFrameworkTest.cpp:(.text+0x7ee): undefined reference to testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void*)' CMakeFiles/MemoryFrameworkTest.dir/memory/MemoryFrameworkTest.cpp.o: In function (anonymous namespace)::MockTestMemoryManager::getMemoryPressure()‘: MemoryFrameworkTest.cpp:(.text+0x8d8): undefined reference to testing::internal::UntypedFunctionMockerBase::SetOwnerAndName(void const*, char const*)' MemoryFrameworkTest.cpp:(.text+0x8e5): undefined reference to testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void*)’

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 58 (27 by maintainers)

Commits related to this issue

Most upvoted comments

@jacobkahn Yes it now finished building successfully … Thanks! I will get back if any more issues 😃

Rebase/pull the latest master: I ve added recently some missing cmake DL link directives to link with the ‘dl’ lib (dynamic loading). For instance: target_link_libraries(Train flashlight-app-asr ${CMAKE_DL_LIBS}) perhaps the same has to be made for most/other Test exec.