Please remove LDLIBS_TB from stan/lib/stan_math/make/compiler_flags
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 238
- Forks
- 106
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 6
Description
Describe the bug
The two lines:
LDLIBS_TBB ?= -ltbb
in:
stan/lib/stan_math/make/compiler_flags
add:
-ltbb
in the Linking model command before:
stan/lib/stan_math/lib/tbb/libtbb.so.2
thus always selecting the system tbb and producing the error:
/u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `cmdstan::command(int, char const**)': main.cpp:(.text+0x28d3f): undefined reference to `tbb::interface7::internal::task_arena_base::internal_initialize()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: main.cpp:(.text+0x2a77e): undefined reference to `tbb::interface9::global_control::internal_create()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `tbb::interface7::task_arena::~task_arena()': main.cpp:(.text._ZN3tbb10interface710task_arenaD2Ev[_ZN3tbb10interface710task_arenaD5Ev]+0x15): undefined reference to `tbb::interface7::internal::task_arena_base::internal_terminate()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `tbb::interface9::global_control::~global_control()': main.cpp:(.text._ZN3tbb10interface914global_controlD2Ev[_ZN3tbb10interface914global_controlD5Ev]+0x5): undefined reference to `tbb::interface9::global_control::internal_destroy()' collect2: error: ld returned 1 exit status make: *** [examples/bernoulli/bernoulli] Error 1
To Reproduce
Try building the bernoulli example (on a CentOS 7 system)
Expected behavior
A description of what you expected to happen.
After removing the offending lines I can proceed to linking the model correctly.
Operating system
Your operating system (e.g. mac os x 10.15, windows 10, etc.)
CentOS 7.9
CmdStanR version number
Your CmdStanR version number (e.g. from packageVersion("cmdstanr")).
2.36.0
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open stan/lib/stan_math/make/compiler_flags and inspect the two LDLIBS_TBB lines that add -ltbb. Reproduce the issue by building the bernoulli example on CentOS 7. Done when removing those lines allows the model to link without the shown TBB undefined-reference errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100