[Bioc-devel] Compiling a cpp source code while installing package

Martin Morgan mtmorg@n@b|oc @end|ng |rom gm@||@com
Sun Nov 8 14:33:29 CET 2020


At the link 

  https://ctg.cncr.nl/software/magma

it says " The MAGMA source code can also be downloaded below, which can be used to compile the program on the target system if this is not supported by the provided binaries (note that standard copyright applies; the MAGMA binaries and source code may not be distributed or modified)."

So it sounds like you are not able to do what you want anyway?

Generally, I do not think bundling large software projects that are not specifically designed as libraries is a good strategy for R / Bioconductor. And while you might ask us to install the software on our build systems so that your package can use the program, I'd offer up the cost of doing that, both for us and for your potential users --  perhaps a better strategy is simply to offer your package to the MAGMA maintainers as an improvement to the R scripts they already provide and distribute from the link above?

Martin

On 11/8/20, 7:40 AM, "Bioc-devel on behalf of Alexandru Voda" <bioc-devel-bounces using r-project.org on behalf of alexandru.voda using seh.ox.ac.uk> wrote:

    Thanks for the reply, Martin!

    Unfortunately, the C++ software is large (https://ctg.cncr.nl/software/magma), not just some feature that can be used from R base, CRAN or Bioconductor.

    Also, I wouldn't make a separate library for the C++ software because the *main* purpose of my package is to wrap them up for R. Other functions are just a secondary aim of the package.

    Thank you for the recommended packages! I was wondering if there's any standard guidance/vignette for how Rhtslib & Rhdf5lib approached this? There are numerous Rcpp vignettes that I could find, but couldn't find for pure C compiled by R?
    ________________________________
    From: Martin Morgan <mtmorgan.bioc using gmail.com>
    Sent: Saturday, November 7, 2020 3:30 PM
    To: Alexandru Voda <alexandru.voda using seh.ox.ac.uk>; bioc-devel using r-project.org <bioc-devel using r-project.org>
    Subject: Re: [Bioc-devel] Compiling a cpp source code while installing package

    It would probably help to provide additional detail here; there are several examples of packages that build C / C++ libraries from source, a common pattern is to have a package dedicated to providing the library, e.g., Rhtslib or Rhdf5lib, or of building the library as part of the software package itself.

    It's worth assessing whether the functionality is worth it (e.g., why use a random number generator from another package, when one can use the R random number generator) or already implemented (e.g., linear algebra in RcppArmadillo).

    Martin

    On 11/7/20, 10:25 AM, "Bioc-devel on behalf of Alexandru Voda" <bioc-devel-bounces using r-project.org on behalf of alexandru.voda using seh.ox.ac.uk> wrote:

        Hi! I tried to look this up in the FAQ & best practices but couldn't find it.

        My in-the-works package needs to call a legacy C++ software from time to time.

        Since that C++ software is open-source, is there a way to make my package compile the source (during R package installation) I'm going to include? That'd make my package's dependency localized and well-controlled, but any other alternative is welcome (except Rcpp, which would take too many months to rewrite into the legacy C++ software).

        Best wishes,
        Alexandru

             [[alternative HTML version deleted]]

        _______________________________________________
        Bioc-devel using r-project.org mailing list
        https://stat.ethz.ch/mailman/listinfo/bioc-devel

    	[[alternative HTML version deleted]]

    _______________________________________________
    Bioc-devel using r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/bioc-devel


More information about the Bioc-devel mailing list