oracle / fastr

A high-performance implementation of the R programming language, built on GraalVM.
Other
623 stars 64 forks source link

fail while trying to install package ("devtools") #213

Open jobdiogenes opened 1 year ago

jobdiogenes commented 1 year ago

Can you reproduce with the latest development build?

yes, I try in the latest "stable" and in the develop version:

When I try install.package("devtools") fail in 3 packages: gert, usethis, testthat:

Then
I try: install.package("gert") get: "undefined symbol: Rf_warningcall_immediate ERROR: loading failed"

I try: install.package("usethis") depend of "gert"

I try: install.packages("testthat") get: /usr/lib/jvm/graalvm/lib/llvm/bin/../include/c++/v1/random/uniform_int_distribution.h:234:5: __error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Catch::RandomNumberGenerator, void>::value': static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");

Include the following info

Matrix products: default BLAS: /usr/lib/jvm/graalvm/languages/R/lib/libRblas.so LAPACK: /usr/lib/jvm/graalvm/languages/R/lib/libRlapack.so

locale: [1] UTF-8/UTF-8/UTF-8/C/UTF-8/UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base
`

Optionally: try to reduce the error

Package installation consists of several steps. Run the installation with the following options to turn all those steps off and then try removing the --no-{XYZ} options one by one to determine, which step causes the issue.

I try using the following example with one by one option, to gert, testthat and compile, but still not working to install "devtools" ! with gert need to build with option -no-test-load with testthat need to build with all options

install.packages('Rcpp', INSTALL_opts='--no-R --no-libs --no-help --no-data --no-demo --no-exec --no-test-load')
steve-s commented 1 year ago

Hello,

thank you for a detailed report. This error:

/usr/lib/jvm/graalvm/lib/llvm/bin/../include/c++/v1/__random/uniform_int_distribution.h:234:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Catch::RandomNumberGenerator, void>::value':
static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");

looks like that there may be something wrong going on with the interactions of the GraalVM LLVM Toolchain. You can try switching to your system toolchain by executing:

/path/to/graalvm/bin/R -e 'fastr.setToolchain("native")'

and then trying to install the packages.

That being said:

the devtools package is known to be too complex (many dependencies) and (through its dependencies) reliant on GNU-R specifics to be successfully installable and usable on FastR.

We use testthat to drive tests of other packages on FastR, so basic functionality of testthat should work fine on FastR. However, not all testthat own tests pass on FastR.

jobdiogenes commented 1 year ago

Hi,

Well, I try native to testthat and works, but gert still same problem.