taskManeage - Tasks: task #15772, R (r-cran) packages in Maneage


You are not allowed to post comments on this tracker with your current authentication level.

task #15772: R (r-cran) packages in Maneage

Submitted by:  Boud Roukema <boud>
Submitted on:  Fri 11 Sep 2020 12:56:07 AM UTC  
Should Start On:  Thu 10 Sep 2020 12:00:00 AM UTC Should be Finished on:  Thu 10 Sep 2020 12:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Open/Closed:  Open Effort:  0.00

Tue 12 Oct 2021 09:22:05 PM UTC, comment #4: 

I've added the text 'r-cran' in the title of this task to make it easier to find using searches on strings.

There are now 2 commits 1ea9 and f6e2 (feel free to squash them together) for the R-cran branch:


The second one parallelises the icu compile, which otherwise is very slow.

1ea9: https://codeberg.org/boud/maneage_dev/commit/1ea9d6db9fab5fd2d88fb51d149777a8090b038f

f6e2: https://codeberg.org/boud/maneage_dev/commit/f6e284f149241194b1962e52850ce5343ca36c3f

Boud Roukema <boud>
Project Member
Fri 01 Oct 2021 02:25:24 PM UTC, comment #3: 

Please ignore https://gitlab.com/maneage/project-dev/-/merge_requests/5 and instead use this updated commit:


that branches directly off commit 3a1b96766c. Commit 1ea9d6d includes a dependence on the 'icu' libraries, to avoid becoming system-dependent or failing when the icu libaries are absent.

As before, offline testing and Darwin/xnu testing would be good.

Boud Roukema <boud>
Project Member
Mon 21 Jun 2021 11:47:10 PM UTC, comment #2: 

I more or less followed the 11 Sep 2020 guideline.


Hopefully this will work fine :). Here are some TODOs in case someone wants to reduce the number of future bug reports (or annoyed users who fail to submit bug reports).


  • Testing is needed to see if this really works offline. I didn't check this.
  • Tests on Darwin/xnu (macos) systems are needed.
  • The dependencies might not yet be quite right, since some packages have common dependencies which may have been accidentally satisfied without fully testing the tree. Installs done with different numbers of cpus may detect these errors. It seems that R dependencies/prerequisites are called 'imports', e.g. see https://cran.r-project.org/web/packages/lifecycle/index.html or https://cran.r-project.org/web/packages/pillar/index.html, so in principle this should be straightforward to check for the "current" version of any R library package.
Boud Roukema <boud>
Project Member
Fri 11 Sep 2020 06:30:15 PM UTC, comment #1: 

When you added the 'R CMD INSTALL ...' command, did it download all the dependencies as binary from the internet? The "make line" is a little ambiguous, did you add a full new Make rule (with a separate target for this package), or just added in the same rule that R is built.

I have never needed R, but I know a lot of people/projects use it. So have always been looking for someone who needs it (and is thus motivated!), to help in adding R packages in Maneage similar to Python. Many projects use R and if we have the infra-structure to add R packages easily (like in Python or X.org), it would be great.

Following the Python/X.org model, we can define a 'reproduce/software/make/r.mk' Makefile file which will be only in charge of building R and its packages. I also have a similar model in mind for TeXLive packages in the development branch (with a 'reproduce/software/make/tex.mk'). We can then "include" these language-specific packages into 'high-level.mk' the same way that we add Python and X.org's packages.

Having a look at the ggplot2 page you sent, it seems the dependencies are under the "Imports" title (in this case "digest, glue, grDevices, grid, gtable, isoband, MASS, mgcv, rlang, scales, stats, tibble, withr"). The page also has the link to the "package source" tarball. So effectively it has all the components we need!

If you can find the relevant command to disable internet connection when building from the tarball, here is an "easy" way to climb down the dependency tree! This is what we did in the first days of adding Python packages:

You simply add the rule to install your high-level package, 'ggplot2' in this case, but without any internet. Once it doesn't find its dependencies, it's build should fail, saying that you need to have XXXX (if it lists many depenendencies, just take the first one).

You then add another Make rule for XXXX, and set it as a prerequisite of 'ggplot2'. In the build of XXXX, it will probably complain about not having YYYY (as a dependency of XXXX), so you add a rule for YYYY and set it as a dependency for XXXX. You follow this loop until the first package (lowest-level package!) successfully builds!

Make will then automatically come up the dependency tree you have already setup, and will complain on the first package that needs another dependency (a different branch in the dependency tree!). So again you continue and soon you'll have all the low-level infrastructure built :-).

Like Python (and any high-level language), the core dependencies should be the same for most packages, so once we build them for one package, it is much more easier to do it for other packages.

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Fri 11 Sep 2020 12:56:07 AM UTC, original submission:  

Does anyone currently have a maneage subsystem for installing R (R-project) extension packages?

Installing a "high" level extension package such as ggplot2


seems like it may need several dozen or who knows, maybe a hundred or so other R packages that it depends on.

The R install using the shell command line

R CMD INSTALL --library=$(ildir)/R/library $(word 1,$(filter $(tdir)/%,$^))

in a 'make' line in high-level.mk works fine for me for individual packages, but we really should have a system equivalent to that of the python system.

Boud Roukema <boud>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-12 boud SummaryR packages in Maneage => R (r-cran) packages in Maneage
    2021-06-22 boud Should be Finished on2021-12-31 => 2020-09-10
    2021-06-22 boud Should be Finished on2020-09-10 => 2021-12-31
    2020-09-11 makhlaghi SummaryR-project / R-base => R packages in Maneage

    Back to the top

    Powered by Savane 3.7