-
Notifications
You must be signed in to change notification settings - Fork 59
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
Undefined symbol on MacOS with strict linking #206
Comments
Can you put a PR together, and better yet, test it in the appropriate setting (i.e. with such cross-compilation) ? |
The problem here, I suspect, is that we don't explicitly link to libtbb; instead, we just try to dynamically load it when RcppParallel is loaded. This happens here: Lines 13 to 42 in 6f81716
We could probably set Lines 14 to 17 in 6f81716
The complication here is that we don't move the library to its final install location until
|
Also for what it is worth, when I am building 'water tight' packages for r2u I have to add libtbb-dev (or libtbb2-dev on 22.04) to the build-dependencies so that the shared linker-derived actual dependencies can be computed. So we do kinda sorta have a dependency on libtbb. |
@kevinushey setting PKG_LIBS to link to the bundled libtbb would probably solve the build for RcppParallel itself. If I look at the build log on Windows, it does seem to do this already (
In order to also fix packages that use Alternatively, we could probably provide a static libtbb for MacOS via CRAN, so that you don't need the bundled one... |
Compiling on MacOS without the
-undefined dynamic_lookup
linker flag reveals an undefined symbol. You can test this like so:And then installing from source will fail:
This is important when cross compiling (for example on p3m), otherwise the resulting binary cannot be loaded.
The text was updated successfully, but these errors were encountered: