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
Suggested small fix to account for main architecture being a sub architecture #116
Comments
Hi Berwin I saw #117 first and replied there. I am a little puzzled as to what is going on -- are you in fact on windows? An existence proof for it building would be very welcome and I would love to extend it for the official build if that now works automagicallly. But I do not think I want to support the 32 and 64 bit switch that R used to support but no longer does. (I am happy to accomodate you on your self-selected two-build-sizes-on-Windows journey but I think the priority should first be all windows users and not just "you", no?) |
Hi Dirk, thank you for looking at this. |
I see. So you are using the opportunity Linux offers you to create both 32 bit and 64 bit binaries. That is admirable. I also appreciate that in the 3rd message on this issue you are clarifying where and how you buid this. This may have been helpful at the start, so if could please consider somewhat augmented messaging next time. The build is also fairly non-standard. Linux allows a large number of different cross-compilations and we do attempt to accomodate all of those. But as the suggested modication is non-intrusive and 100% cosmetic so we can probably work with it. I just checked and injecting the (in a large majority of use cases empty and hence pointless) > .Platform$r_arch
[1] ""
> message("You could link to the 'r' binary installed in '", system.file("bin", .Platform$r_arch, "r", package="littler"), "' from '/usr/local/bin' in order to use 'r' for scripting.", "See the 'vignette(\"littler-faq\")' for more details.")
You could link to the 'r' binary installed in '/usr/local/lib/R/site-library/littler/bin//r' from '/usr/local/bin' in order to use 'r' for scripting.See the 'vignette("littler-faq")' for more details.
> It just looks silly with the added /. So maybe I'll branch the message into a prior path printing with/without the added entry. |
Hi Dirk, Not sure what an existence proof is, but here is what happens if I install littler from CRAN:
Then, when attaching the library I see:
Note how the string that should give the location of the binary is empty.
Cheers, |
Please see my additional commit in your 'smallfix' branch. Your second comment it a reflection of the issue. You do set on R_arch on a platform where it is not commonly set. Please try to added commit. It should help. |
Hi Dirk, Yes, your solution would work. Installing the littler version with your commit shows:
But I am wondering whether it would not be easier, and cleaner, to get rid of the second / by wrapping Cheers, |
Lovely suggestion on |
Sent another commit. The macOS issue is a non-issue; |
I was initially trying to modify the code similarly to your first suggestion, but then remembered Your last commit looks fine and works on my machine once The reason my machine installed
If I call |
Thanls. That may have been absent-mindedness on my part.
Could you share more details? Are you running a standard R from a distribution such as Fedora or is this a configuration choice you made locally? |
I am compiling from source. My bash script essentially does:
The files |
Right. And as R supports it, And I thought I was stubborn hanging on to 32 bit on Linux for too long. I do recall that for my very very first Docker uses on my laptop at the time I had to patch Docker to create a 32 bit binary. I saw the light when that laptop died and it has been x86_64 only ever since for maybe eight years. It's not my role to tell you what to do but .... 32 bit is gone. Anyway, I will fold this in. Have been working on another package the last few hours. |
Taken care of now in the merged #117 |
G'day Dirk,
from a johnny-come-lately to littler, and probably really late as sub-architectures for R seem to be on the way out[^1].
I compile R on my machines myself on Linux, installing a 32 bit and a 64 bit version, both as sub architectures[^2]. So when I installed littler and attached the package, I was greeted with an empty string as the location of the 'r' binary.
The fix seems to be simple, one just has to include .Platform$r_arch in the call to system.file() in R/init.R.
I have submitted a pull request for this change.
Cheers,
Berwin
[^1] It seems that Windows and MacOSX have only 64 bit versions, no multi architectures. I wonder whether they will soon disappear on Linux too?
[^2] I know, a very unique set-up. :-)
The text was updated successfully, but these errors were encountered: