-
Notifications
You must be signed in to change notification settings - Fork 56
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
append makevars vars instead of replacing #331
Conversation
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
==========================================
- Coverage 36.26% 32.09% -4.18%
==========================================
Files 67 63 -4
Lines 2418 2287 -131
==========================================
- Hits 877 734 -143
- Misses 1541 1553 +12
Continue to review full report at Codecov.
|
The R Installation and Administration guide recommends using |
Sorry, but where would System-wide settings in Having a number of repos here, I just did a casual @kevinushey The one package I see using |
That's my understanding as well -- the |
Even then, I think every discussion I had with the powers-that-be lead to "just mod your own |
Just a side note, but I think moving to Found the following file(s) containing GNU extensions:
src/Makevars
Portable Makefiles do not use GNU extensions such as +=, :=, $(shell),
$(wildcard), ifeq ... endif. See section ‘Writing portable packages’ in
the ‘Writing R Extensions’ manual.
https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Writing-portable-packages I think this will only show up on the Solaris check due to footnote 69
|
Agreed, hence my earlier comment
four comments ago. |
RcppParallel avoids this since we explicitly request GNU Make; given that restriction I agree that this PR is ultimately not a good fit. @siddharthab, I think the question underlying all this is -- do you really need to set |
Ah, so sorry for the confusion here. I was setting environment variables for these values to set I will change my build process to use LDFLAGS and CXXFLAGS instead, and make sure they work with my site-wide and personal Makevars files. I am withdrawing this PR. Thank you all for your prompt support and guidance. |
For posterity, here is what the resolution ended up being for me. It turns out that I can not use On looking at R source code:
So for this use case where I am specifying the libraries to link on the command line instead of editing package src/Makevars, I can use only For now, I have decided to edit the package src/Makevars and append my values for |
Thanks for the follow-up. I agree that it is not entirely satisfactory -- but it is also really outside the realm of RcppArmadillo as we are playing the hand we're dealt by the R tools. Maybe you could argue your case on the r-package-devel list to see if someone else working with packages had similar issues? Or, even on r-devel? I have the feeling that this must have been discussed before but I am with you that in the short term editing our sources is your best bet. Medium term I really want an ability to alter some of the |
Thank you @eddelbuettel. I just posted to r-package-devel. It turns out that editing the package src/Makevars was not working every time because the configure script can recreate it or modify it in arbitrary ways. But, appending |
Thanks, I saw it already. It's well written, so thank you. One (hackish yet feasible) approach you could take (and that I have taken in past for e.g.
in your process loop. Or maybe you come up with something better still---but the itch is coming from your end so there may not be a much better solution coming forward. But fingers crossed. It is likely not an entirely unique situation. |
The current Makevars skeleton file replaces PKG_CXXFLAGS and PKG_LIBS settings in any sitewide or personal Makevars file. The use of
+=
ensures that we pickup the settings in the user's environment but, in case of conflict, with preference to the settings in the skeleton file.