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

R package: Supporting non-standard libomp locations during installation from source #7759

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

cmarquardt
Copy link
Contributor

This pull request adds CPPFLAGS and LDFLAGS to the testing for OpenMP during the R installation from a source package and should fix #7757.

The real change is in R-package/configure.ac; most changes in R-package/configure are because I have a more recent version of autoconf than the one used for the previous version of the file.

These changes work when applied against the xgboost package on CRAN. I haven't fully understood how to generate the source package for R in the full xgboost source code tree, though; there's a top-level Makefile with a target Rpack copying files into a subdirectory xgboost. The contents of that directory look like an R package, but no tar.gz or similar is generated.

When trying to do an R CMD INSTALL . from inside the directory created with make Rpack, the compilation fails with C++ build errors for amalgamation/xgboost-all0.cc. However, the compilation also fails without my changes in master. Thus, I believe it's unrelated to the modification proposed in this pull request - but I have no working knowledge of C++, unfortunately. And maybe it's not the right way to get the R source package anyway. The cmake build of the R package appears to work fine, but as far as I understand that won't be affected by the changes in this PR anyway.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix!

@trivialfis trivialfis merged commit 39c5616 into dmlc:master Mar 28, 2022
@cmarquardt cmarquardt deleted the bugfix/R-installation branch March 28, 2022 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

R package does not install when the OpenMP library is in a non-standard place
2 participants