Comments (6)
Please provide a reproducible example, the status at CRAN is clearly a counter-example:
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):
Line 22 in 02866ac
and
bringing this back to needing GSL.
So I think this on you.
from rcppziggurat.
Mimimally viable example showing RcppZiggurat
works:
- Fire up
rocker/r2u
to get a self-sufficient and complete system that actually fully knows and resolves dependencies - Install
RcppZigguarat
either from shell viainstall.r RcppZiggurat
or viainstall.packages("RcppZiggurat")
(and see howr2u
takes care of install the Ubuntu packagelibgsl27
) - In R, run
library(RcppZiggurat)
followed byRcppZiggurat::zrnormGSL(3)
and enjoy your three N(0,1) draws provided by the GSL viaRcppZiggurat
.
No issue here. I think we can close this. Feel free to reopen if you can demonstrate a defiency in RcppZiggurat
.
from rcppziggurat.
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.
@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.
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.
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)
- Not an issue but a request HOT 6
- Setting a seed only works when naming a preferred generator
- Use .Random.seed HOT 1
- demos throw errors Windows HOT 1
- R integration HOT 6
- Setting a seed to value of getSeed() doesn't produce expected draws HOT 11
- rcppziggurat installation fails on linux HOT 15
- sourceCpp seems to reset random state HOT 5
- Compilation failure HOT 1
- Unable to load dynamic library HOT 2
- Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/lib/R/library/RcppGSL/libs/RcppGSL.so': libgsl.so.23: cannot open shared object file: No such file or directory HOT 3
- libgsl.so.27 not found for GSL local installation HOT 14
- Is it supposed to link to GSL directly? Dependency is not declared, but it links to GSL HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcppziggurat.