Giter Site home page Giter Site logo

Comments (6)

eddelbuettel avatar eddelbuettel commented on June 2, 2024

Please provide a reproducible example, the status at CRAN is clearly a counter-example:

image

Also note that the DESCRIPTION clearly states you need to supply the RcppGSL package which brings in the GSL (because R cannot as it cannot portable ensure system dependencies across OSs):

LinkingTo: Rcpp, RcppGSL

and

https://github.com/eddelbuettel/rcppgsl/blob/cf6fb4781d62433c47303096e1f4f672bb059228/DESCRIPTION#L24

bringing this back to needing GSL.

So I think this on you.

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 2, 2024

Mimimally viable example showing RcppZiggurat works:

  1. Fire up rocker/r2u to get a self-sufficient and complete system that actually fully knows and resolves dependencies
  2. Install RcppZigguarat either from shell via install.r RcppZiggurat or via install.packages("RcppZiggurat") (and see how r2u takes care of install the Ubuntu package libgsl27)
  3. In R, run library(RcppZiggurat) followed by RcppZiggurat::zrnormGSL(3) and enjoy your three N(0,1) draws provided by the GSL via RcppZiggurat.

No issue here. I think we can close this. Feel free to reopen if you can demonstrate a defiency in RcppZiggurat.

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 2, 2024

Thanks for trying RcppZiggurat. System dependencies are hard, I have been at this via Debian for decades. R cannot fully do this itself as (outside of specialised solutions like r2u cannot generally talk to the system.

That said, SystemRequirements are the best we have as a portable requirement, and they are used here.

from rcppziggurat.

trevorcampbell avatar trevorcampbell commented on June 2, 2024

@eddelbuettel thanks for the very prompt response. I did manage to reproduce your example using rocker/r2u, and indeed saw that the Ubuntu package manager handled dependencies. In contrast, doing the same on rocker/verse:4.3.1 fails.

So, here's a question: is there any way that RcppZiggurat can check for a functioning GSL upon installation, and fail to install otherwise? At least that way users of downstream libraries that depend on RcppZiggurat will know they need GSL (whether that downstream library knows it or not).

Or even just an error message from RcppZiggurat that clearly states something like "Please install GSL" if an error occurs at runtime would be handy.

Thoughts?

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 2, 2024

Hi @trevorcampbell and thanks so much for circling back and even trying r2u.

The long and the short of it is that R cannot ensure system dependencies because R lives in user space. That is true in Windows, macOS and Linux -- and doubly so because Windows and macOS do not even have a consistent system management systems! All this makes it very hard for R to ensure requirements are met, and writing them out in SystemRequirements: is the best we can do -- but is weak way that cannot ensure the requirement is satisfied.

I suspect that really is all that there is to it. RcppZiggurart and RcppGSL do what they can: declare a SystemRequirements. If that is met or not can only be ensured by the local user. Unless you are in the special case of r2u which can and does circle back to the system management system. But that is a (rather useful) exception and not the rule.

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 2, 2024

I just looked at this again (with fresher eyes) and you basically nailed a PPM/RSPM weakness that the rocker/r-verse container has as it is based on PPM/RSPM which cannot guarantee SystemRequirements.

rocker/r2u, and other containers (or full systems) has the full backing apt so it can.

from rcppziggurat.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.