Skip to content

Cannot load: undefined symbol tbb::task::note_affinity #183

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

Closed
Enchufa2 opened this issue Sep 5, 2022 · 5 comments
Closed

Cannot load: undefined symbol tbb::task::note_affinity #183

Enchufa2 opened this issue Sep 5, 2022 · 5 comments

Comments

@Enchufa2
Copy link
Member

Enchufa2 commented Sep 5, 2022

Are we sure that nothing is required on Linux?

RcppParallel/R/tbb.R

Lines 92 to 93 in 0da9610

# nothing required on other platforms
""

I cannot load the markovchain package (cc @spedygiorgio), which links against RcppParallel, with the following error:

Error: package or namespace load failed for ‘markovchain’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/library/markovchain/libs/markovchain.so':
  /usr/local/lib/R/library/markovchain/libs/markovchain.so: undefined symbol: _ZN3tbb4task13note_affinityEt

So somehow this TBB symbol ends up in the markovchain library. Manually adding -ltbb to the linking phase solves the issue for me, but currently RcppParallel::RcppParallelLibs() returns nothing for Linux.

@eddelbuettel
Copy link
Member

We can compare notes, I can on the courtesy Linux VM I use for Rcpp testing which has a ton of packages in ~/tmp/lib:

R> .libPaths()
[1] "/home/dirk/tmp/lib"            "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"       "/usr/lib/R/library"           
R> library("markovchain")
Package:  markovchain
Version:  0.9.0
Date:     2022-07-01
BugReport: https://github.com/spedygiorgio/markovchain/issues

R> 

All CRAN, all current, on Debian testing (also current).

@Enchufa2
Copy link
Member Author

Enchufa2 commented Sep 5, 2022

With system or bundled tbb? I'm using the system tbb here via TBB_LIB and TBB_INC.

@eddelbuettel
Copy link
Member

Ah yes, I am likely using the bundled one.

@Enchufa2
Copy link
Member Author

Enchufa2 commented Sep 5, 2022

Then that's most probably the issue. It should be easy to fix the behavior of LdFlags() depending on whether the package was built using a user-provided TBB_LIB, or an auto-detected one as proposed in #178. I'll look into this when I find time.

@Enchufa2
Copy link
Member Author

Cannot reproduce this anymore.

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

2 participants