Skip to content
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

[WIP] [R-package] R-package installation with CRAN toolchain #15

Closed
wants to merge 49 commits into from

Conversation

@jameslamb jameslamb force-pushed the feat/portable-install branch from 211826a to 3561eb0 Compare April 6, 2020 02:34
@jameslamb
Copy link
Owner Author

From RcppArmadillo docs (http://dirk.eddelbuettel.com/blog/2017/06/04/):

Here, we once again rely on the build infrastructure automagically provided by R itself: if and when OpenMP is available, R will use it via $(SHLIB_OPENMP_CXXFLAGS) etc

@jameslamb
Copy link
Owner Author

jameslamb commented Apr 7, 2020

@jameslamb jameslamb force-pushed the feat/portable-install branch from c2fea96 to 0fe0b1d Compare April 11, 2020 04:33
@jameslamb
Copy link
Owner Author

found the use of Biarch field in DESCRIPTION, that one was new to me.

https://github.com/kthohr/BMR/pull/43/files

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file

@jameslamb
Copy link
Owner Author

dealing with this issue:

* checking top-level files ... WARNING
  Output from running autoreconf:
  Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
  autoreconf: failed to run aclocal: No such file or directory

buffer/pylibemu#24

@jameslamb
Copy link
Owner Author

nice example of a configure.win finding Rscript in the right place: https://github.com/stewid/SimInf/blob/master/configure.win

Per "Writing R Extensions"

provide a configure.win script to be used on that platform. (Optionally, there can be a cleanup.win script. Both should be shell scripts to be executed by ash, which is a minimal version of Bourne-style sh.) When configure.win is run the environment variables R_HOME (which uses ‘/’ as the file separator), R_ARCH and Use R_ARCH_BIN will be set. Use R_ARCH to decide if this is a 64-bit build (its value there is ‘/x64’) and to install DLLs to the correct place (${R_HOME}/libs${R_ARCH}). Use R_ARCH_BIN to find the correct place under the bin directory, e.g. ${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe.

@jameslamb
Copy link
Owner Author

After banging my head against it for a while, I found that it is not possible to pass --configure-args to configure.win for Windows packages. This means we cannot pass --enable-gpu.

https://community.rstudio.com/t/configure-args-option-on-windows/20320/4

That isn't documented anywhere that I have found, but Jim Hester is an expert and also you can see it in the R source code: https://github.com/wch/r-source/blob/8bc3a6f4b0c2fca3195cac427e9ad8b4448eaa73/src/library/tools/R/install.R#L670-L697

I think the only way we can get around it might be with environment variables. I'm testing that now.

@jameslamb
Copy link
Owner Author

Notes on non-portable flags:

  • -O3 is not portable
  • -funroll-loops is not portable
  • -Wno-unknown-pragmas is not portable and is not allowed because it suppresses warnings

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant