-
Notifications
You must be signed in to change notification settings - Fork 59
libtbb error during installation #199
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
Comments
Here's some code for reproducibility: docker pull r-base:4.2.3
docker run -ti --rm r-base:4.2.3 bash
apt-get update && apt-get install -y libtbb-dev # OPTIONAL
R -e "install.packages('RcppParallel')" |
Yikes. I can reproduce. Using the bundled TBB I get the warning too. root@0b4fd0fd8ee0:/# install.r RcppParallel
trying URL 'https://cloud.r-project.org/src/contrib/RcppParallel_5.1.7.tar.gz'
Content type 'application/x-gzip' length 1629119 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘RcppParallel’ ...
** package ‘RcppParallel’ successfully unpacked and MD5 sums checked
** using staged installation
** preparing to configure package 'RcppParallel' ...
*** configured file: 'R/tbb-autodetected.R.in' => 'R/tbb-autodetected.R'
*** configured file: 'src/install.libs.R.in' => 'src/install.libs.R'
*** configured file: 'src/Makevars.in' => 'src/Makevars'
** finished configure for package 'RcppParallel'
** libs
(tbb) Building TBB using bundled sources ...
make[1]: Entering directory '/tmp/RtmpbRA05g/R.INSTALL214c26f3d935/RcppParallel/src/tbb/src'
OS: linux
arch=intel64
compiler=gcc
runtime=cc12.2.0_libc2.36_kernel5.19.0
tbb_build_prefix=linux_intel64_gcc_cc12.2.0_libc2.36_kernel5.19.0
work_dir=/tmp/RtmpbRA05g/R.INSTALL214c26f3d935/RcppParallel/src/build/linux_intel64_gcc_cc12.2.0_libc2.36_kernel5.19.0_release
make[1]: Leaving directory '/tmp/RtmpbRA05g/R.INSTALL214c26f3d935/RcppParallel/src/tbb/src'
(tbb) TBB compilation finished successfully.
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -std=gnu++11 -DRCPP_PARALLEL_USE_TBB=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -fpic -g -O2 -ffile-prefix-map=/build/r-base-4.2.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c init.cpp -o init.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I../inst/include -std=gnu++11 -DRCPP_PARALLEL_USE_TBB=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -fpic -g -O2 -ffile-prefix-map=/build/r-base-4.2.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c options.cpp -o options.o
g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-z,relro -o RcppParallel.so init.o options.o -L/usr/lib/R/lib -lR
installing via 'install.libs.R' to /usr/local/lib/R/site-library/00LOCK-RcppParallel/00new/RcppParallel
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
readelf: Error: /usr/local/lib/R/site-library/00LOCK-RcppParallel/00new/RcppParallel/lib/libtbb.so: Failed to read file header
readelf: Error: /usr/local/lib/R/site-library/00LOCK-RcppParallel/00new/RcppParallel/lib/libtbbmalloc.so: Failed to read file header
readelf: Error: /usr/local/lib/R/site-library/00LOCK-RcppParallel/00new/RcppParallel/lib/libtbbmalloc_proxy.so: Failed to read file header
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (RcppParallel)
The downloaded source packages are in
‘/tmp/downloaded_packages’
root@0b4fd0fd8ee0:/#
Now, it does load and all seems fine. So I suspect this may just be a warning coming from (changed?) linker behaviour. Just a guess but maybe the LTO options influence it? Also unclear why we haven't seen it elsewhere. Maybe something the TBB configuration turns on? |
Hi @eddelbuettel, I'm not the person using the package, so I wouldn't know how to test it. But do you know whether multi-threading is working when using TBB here? I think I read somewhere that package would install but everything would run single-threaded. |
As stated by yourself and repeated by me, the package installs fine. It "merely" emits some new noise at the installation step. That is different from not finding TBB and building a fallback. Please do not spread misinformation or 'fear, uncertainty, doubt'. Maybe ask the person using the package to test it? |
Hi Dirk. I'm really sorry for the misunderstanding and that you felt that way from my comment. The least I want to do is to spread fear when I rely on the usage of this package. I'm in charge of creating a container to run a task that makes use of this package, and though the package gets installed, an error is being thrown. I asked the person running the task if they could check whether the package is working properly, but they told me that this package is just a dependency for some other packages so they don't know how to test this particular feature (the TBB one). Given the fact that you are one of the developers for this package, I was asking if you would be able to check that the functionality related to the error (anything with TBB) was working fine. That's all. I'm also a software developer and I know that installing and working are different things, and if there are no unit tests that check for a feature, then we wouldn't know if it works until somebody runs it. Now, following your advice, I ran the check on the package (see log below). However, I can't say from looking at it whether the package has been tested using TBB or not, nor whether a task has been tested both single-threaded and multi-threadedly with this feature. If you do know how to test this, would you be able to do it for me or at least send me a few lines of code to test it on my own? Alternatively, would you be able to give me some peace of mind that this error would not have any impact downstream on my jobs? Thank you very much in advance. I really appreciate the help and sorry again for the trouble. R CMD check LOG# R CMD check RcppParallel_5.1.7.tar.gz --no-manual
* using log directory ‘//RcppParallel.Rcheck’
* using R version 4.2.3 (2023-03-15)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-manual’
* checking for file ‘RcppParallel/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘RcppParallel’ version ‘5.1.7’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for .dll and .exe files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘RcppParallel’ can be installed ... OK
* checking installed package size ... NOTE
installed size is 5.9Mb
sub-directories of 1Mb or more:
include 2.1Mb
lib 3.4Mb
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in shell scripts ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... NOTE
GNU make is a SystemRequirements.
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking include directives in Makefiles ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘doRUnit.R’
OK
* DONE
Status: 2 NOTEs Commands for reproducibilitydocker pull r-base:4.2.3
docker run -ti --rm r-base:4.2.3 bash
apt-get update && apt-get install -y libtbb-dev # OPTIONAL
install.r Rcpp RUnit knitr rmarkdown
wget https://cloud.r-project.org/src/contrib/RcppParallel_5.1.7.tar.gz
R CMD check RcppParallel_5.1.7.tar.gz --no-manual |
As I understand it, this is an issue either in R or
R uses If the package does install and work without issue, then I would say you can ignore the warning. |
It looks like the issue arises because some of the
I'm assuming this "INPUT (libtbbmalloc_proxy.so.2)" is some sort of special thing that the dynamic linker understands, but readelf does not. |
I've filed a bug report for R here: https://bugs.r-project.org/show_bug.cgi?id=18496 |
Nevermind; the issue here is really that the Docker image does not have
the issue will go away. |
Thanks Kevin and Dirk! Error has gone now. Really appreciate the help. Cheers! |
Hi there.
I'm getting an error during the installation which doesn't stop the package to be built, but I imagine has an impact on it:
I included at the bottom the full install log. I'm running this on the docker container
r-base:4.2.3
, which is based on Debian bookworm (debian:testing, testing-20230227).I tried installing the package before and after installing the
libbtbb12 / libtbb-dev
packages version2021.8.0-1
(apt-get install libtbb-dev). The output produced by the RcppParallel was exactly the same. I wonder whether it is taking advantage of the pre-installed TBB version or if it always tries to install it on its own.I tried this using Docker v20.10.7 and v20.10.14, on an Ubuntu 20.04.2 and a MacOS 12.6.3 hosts, respectively.
Any help would be really appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered: