Hi Moritz, On Thu, 16 Jan 2020 at 01:35, Moritz Lell <[email protected]> wrote:
> While you're right that a manifest of R and all packages is the best > way, I will still need R to compile something from time to time, for > example C++ code from within my project. What do you mean by "still need R to compile something from time to time"? I am a Bioconductor user and my workflow is: 1. "guix search <r-pkg>" and if <r-pkg> is there, go to 5. 2. Else, try to package. If the package is on the CRAN or the Bioconductor archive, then I use "guix import cran -r". If not, e.g., on GitHub, then I write down the package definition reading the doc and the requirements. 3. Build the package "guix build -L /path/to/my/definition <r-pkg>". Ask here or on IRC if I am not able to fix it. 4. If the package fits the GNU compliance, send the patch. Else push the package definition to my repo/channel. 5. Create a profile using a manifest (storing the Guix commit and the channel). And time to time, I build Docker images to release the package to my colleagues. For example, give a look to the package 'r-umap' with "guix edit r-umap". Then try: guix build r-umap --no-grafts --check -K You will see that C++ code is compiled. If the package is correctly done by the R packagers, then the Guix 'r-build-system' does the correct thing. :-) With this discipline, you keep your project reproducible. However, sometimes I need to do quick and dirty hack by compiling stuff with R (often directly in RStudio). But I am not targeting reproducibility but experimentations that will go to trash at the end of the day. And I never had issues, if I remember well. > I have already found out some knobs in the R installation but I'm not > done yet. I need someone with more experience with C++ linking and > including flags to help me for this to work. Some years back, I was tweaking flags etc. and it was often a mess and spending some time to fix stuff that broke, etc. Now, I prefer to write a clean R package, then use it to have a Guix package. Everything stays clean. :-) > I tried to translate this into R with a patch versus the guix git repo, > commit 40b1cee620a55bf1fc5d8d897ed1ec147b2535c8 that I have attached to > this mail. However, I think I got some include paths wrong because I get > errors when starting R: Hum? I am not convinced that it comes from the R package definition. And there you are modifying the version 3.6.2. Which version do you want to use? 3.6.2 or 3.4.3? I am lost. > Are the paths that I set in the attached commit correct? I do not know, I am a bit lost on what you want to achieve. I thought you want to use [email protected] with [email protected]. Because the current default R which is [email protected] works nicely with [email protected]. The '-l/usr/local/lib' is not an issue, AKAICT. All the best, simon
