-
Notifications
You must be signed in to change notification settings - Fork 58
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
Symlinking instead of copying tbb libs #161
Comments
That seems like a good idea to me. I need to resubmit for Solaris anyhow so I'll see if we can slipstream that into the next submission. |
I now have the following on master:
Does that look okay? |
LGTM! |
@kevinushey I remember that we copy the libs to keep the version linked, avoiding breaking |
That won't happen with system builds, where the .rpm, .deb is always linked to the correct tbb version, but in general it's a good idea. In this way, you can ensure integrity in user installations too. |
RcppParallel 5.1.2 is now on CRAN, which uses symlinks by default. Let me know if you're still having trouble after that release propagates on CRAN. |
@hsbadr: would you be willing to file a separate issue for us to track the MD5 hashes of the TBB libraries, so we can detect if they have changed? |
I don't run into those issues b/c I always reinstall the development version of
Sure. We may also add a function to store the TBB version info (e.g., An example for this is |
@kevinushey #164 is not applicable to bundled dependencies, as @Enchufa2 mentioned. It's important to ensure integrity of the shared objects, before loading them, though. This will also inform the users if the package loading failed due to this issue. |
It was successfully auto-updated a few hours ago and looks ok. There's a difference with the macOS installation above though, as you can see: $ ll /usr/local/lib/R/library/RcppParallel/libs/
total 20
-rwxr-xr-x. 1 root root 19816 abr 16 02:41 RcppParallel.so
$ ll /usr/local/lib/R/library/RcppParallel/lib/
total 0
lrwxrwxrwx. 1 root root 34 abr 16 02:41 libtbbmalloc_proxy.so.2 -> /usr/lib64/libtbbmalloc_proxy.so.2
lrwxrwxrwx. 1 root root 28 abr 16 02:41 libtbbmalloc.so.2 -> /usr/lib64/libtbbmalloc.so.2
lrwxrwxrwx. 1 root root 22 abr 16 02:41 libtbb.so.2 -> /usr/lib64/libtbb.so.2 The links are in |
That is intentional. I wanted to move the library paths, but unfortunately some packages (rstan / StanHeaders) hard-code the path to the bundled version of TBB in RcppParallel and so trying to move it breaks those packages. 😞 |
I could update that in the development version of |
Just to be consistent with the way R normally installs libraries; e.g. R packages normally install their libraries into the |
I see. I had the impression that rhdf5filters/lib
├── libH5Zblosc.so
├── libH5Zbz2.so
└── libH5Zlzf.so
rhdf5filters/libs
└── rhdf5filters.so |
I think you're right actually. R-exts has something similar described in 5.8.1:
This is for a static library, but the same logic holds for shared libraries I would think. |
That makes sense to me. R automatically builds the |
@hsbadr can you check, or did you check, whether Also note that WRE 5.8 "Linking to other packages" says
|
@eddelbuettel It relies on setting the
Does this answer your question? |
I think so. Because it points to another plugin mechanism used "with hdf5" roughly similar to what R itself uses (i.e. my a) above). I still think the generic ability to mix and match shared library from a shared library package is still out of reach. Many of have looked for this and at this issue and I think the best approach we know is to feed static libraries to the shared per-package library when it is being built. But I could of course be overly pessimistic... |
The automatic build of v5.1.3 from 19 hours ago again has the tbb libs copied into the package, instead of symlinked. :-\ |
Ugh. Caused by 53bb834. Which was intended to work around r-lib/devtools#2343. |
@Enchufa2, are you able to use the patch from 2f71e52#diff-6c04d3704e1e2e4b906b5d456931358fc0128147d57b0cdfe8a56614c590d5faR20-R22 as a stop-gap fix? I'd prefer to avoid re-submitting RcppParallel to CRAN yet again ... |
Is there something very important in releases 5.1.3 or 5.1.4? I'd say it's not, but just to confirm. I removed the automatic builds for 5.1.3 and 5.1.4 and left 5.1.2 in the repo, because it's easier for me. But otherwise, I can make an ad-hoc 5.1.4 build with this patch, yes. |
If it's easier to just use 5.1.2 then I'd recommend doing that -- 5.1.3 and 5.1.4 just work around various bugs with Solaris / older Windows R. |
The new
TBB_INC
andTBB_LIB
variables are great, but I noticed that RcppParallel copies tbb's.so
files into the package directory. Is this really required? This is a problem for system packaging, because RPM generates a unique ID for each binary (see this), and thus copying a shared library makes these IDs collide, and the package cannot be installed. Would it be possible to symlinkTBB_LIB
instead?The text was updated successfully, but these errors were encountered: