Link failure if HAVE_TBB not defined

Having trouble installing or compiling FreeCAD? Get help here.
Post Reply
FreddyFreddy
Posts: 174
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Link failure if HAVE_TBB not defined

Post by FreddyFreddy »

macOS 12.4

Build is successful after adding -DHAVE_TBB=ON in cmake.
Not having HAVE_TBB defined was not an issue until very recently.
Commit git commit 93525ff7, perhaps? Only because it plays in this area.

Code: Select all

[ 64%] Linking CXX shared library ../../../../Mod/Import/Import.so
Undefined symbols for architecture x86_64:
  "tbb::detail::r1::initialize(tbb::detail::d1::task_group_context&)", referenced from:
      Import::ImportOCAF::loadShapes(TDF_Label const&, TopLoc_Location const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, std::__1::vector<App::DocumentObject*, std::__1::allocator<App::DocumentObject*> >&) in ImportOCAF.cpp.o
      Import::ImportOCAF::createShape(TDF_Label const&, TopLoc_Location const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<App::DocumentObject*, std::__1::allocator<App::DocumentObject*> >&, bool) in ImportOCAF.cpp.o
  "tbb::detail::r1::throw_exception(tbb::detail::d0::exception_id)", referenced from:
      tbb::detail::d1::task_group_base::~task_group_base() in ImportOCAF.cpp.o
  "tbb::detail::r1::cancel_group_execution(tbb::detail::d1::task_group_context&)", referenced from:
      tbb::detail::d1::task_group_base::~task_group_base() in ImportOCAF.cpp.o
  "tbb::detail::r1::is_group_execution_cancelled(tbb::detail::d1::task_group_context&)", referenced from:
      tbb::detail::d1::task_group_base::~task_group_base() in ImportOCAF.cpp.o
  "tbb::detail::r1::wait(tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&)", referenced from:
      tbb::detail::d1::task_group_base::~task_group_base() in ImportOCAF.cpp.o
  "tbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)", referenced from:
      tbb::detail::d1::task_group_base::~task_group_base() in ImportOCAF.cpp.o
ld: symbol(s) not found for architecture x86_64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
wmayer
Founder
Posts: 18785
Joined: Thu Feb 19, 2009 10:32 am

Re: Link failure if HAVE_TBB not defined

Post by wmayer »

Not having HAVE_TBB defined was not an issue until very recently.
Then check your OCC headers (or CMake files) if HAVE_TBB is defined anywhere. Maybe a header that has it defined is not included any more.
FreddyFreddy
Posts: 174
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: Link failure if HAVE_TBB not defined

Post by FreddyFreddy »

wmayer wrote: Wed Jun 29, 2022 10:11 am
Not having HAVE_TBB defined was not an issue until very recently.
Then check your OCC headers (or CMake files) if HAVE_TBB is defined anywhere. Maybe a header that has it defined is not included any more.
Thank you, sir. Only three #ifdef's and a mention in build_osx(old). I still have hair. Just.
Post Reply