Skip to content

Windows: use gsl 2.7 from rwinlib #16

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

Merged
merged 1 commit into from
Jul 12, 2021
Merged

Windows: use gsl 2.7 from rwinlib #16

merged 1 commit into from
Jul 12, 2021

Conversation

Image for: Conversation
Copy link
Contributor

jeroen commented Jun 23, 2021

Uses same libgsl as RcppGSL.

@@ -1,3 +1,10 @@
PKG_CPPFLAGS = -I. -I../inst/include
## Use the R_HOME indirection to support installations of multiple R version
PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppGSL:::LdFlags()")
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't using this programmatically and dynamically better?

If we test for "is it the same" should that not happen at configure time?

If it works it works ... but seems off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think you're really using this dynamically? RcppGSL:::LdFlags() just yields a string with "-lgsl -lgslcblas" but does not provide the library in any way.

Given that you're linking against libgsl (and not R functions exported by RcppGSL) I think this PR is much easier.

Copy link
Owner

Choose a reason for hiding this comment

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

Maybe. The code is old. It should also supply and and all -L flags but might not know about them. So yes, the fixed setup (for Windows where things are fixed) is better.

Ditto for RDieHarder. I can look into that in a day or two unless you get there sooner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I tested that this works both with the stable and ucrt toolchains.

Copy link
Owner

eddelbuettel left a comment

Choose a reason for hiding this comment

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

Looks good, and I'll just make some minor whitespace edits as I did for RcppGSL. So thanks for the PR!

eddelbuettel merged commit 536121b into eddelbuettel:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants