Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail to compile: undefined reference to tbb::internal::task_scheduler_observer_v3::observe(bool) #2571

Closed
yurivict opened this issue Aug 28, 2021 · 3 comments

Comments

@yurivict
Copy link

c++ -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer   -std=c++1y -D_REENTRANT -Wno-ignored-attributes      -I lib/tbb_2020.3/include   -O3  -I . -I lib/eigen_3.3.9 -I lib/boost_1.75.0 -I lib/sundials_5.7.0/include -I lib/benchmark_1.5.1/googletest/googletest/include -I lib/benchmark_1.5.1/googletest/googletest  -fno-omit-frame-pointer    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -fstack-protector-strong         -Wl,-L,"/usr/local/lib" -Wl,-rpath,"/usr/local/lib" -ltbb    test/unit/multiple_translation_units_test.o lib/benchmark_1.5.1/googletest/googletest/src/gtest_main.cc lib/benchmark_1.5.1/googletest/googletest/src/gtest-all.o test/unit/libmultiple.so        -Wl,-L,"/usr/local/lib" -Wl,-rpath,"/usr/local/lib" -ltbb -o test/unit/multiple_translation_units_test
ld: error: test/unit/libmultiple.so: undefined reference to tbb::internal::task_scheduler_observer_v3::observe(bool) [--no-allow-shlib-undefined]
c++: error: linker command failed with exit code 1 (use -v to see invocation)

Version: 4.1.0
onetbb-2021.3.0
OS: FreeBSD 13

@rok-cesnovar
Copy link
Member

See the section on using oneTBB with Stan Math: https://github.com/stan-dev/math#intel-tbb

@yurivict
Copy link
Author

yurivict commented Jul 3, 2022

The above section explains how to install oneTBB. I have it installed.
But tests still fail with version 4.4.0

@andrjohns
Copy link
Collaborator

Can you try cleaning and rebuilding the math library dependencies/objects and posting any errors you encounter?

cd path/to/stan-math
make -f make/standalone math-clean
make -j4 -f make/standalone math-libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants