Comments (15)
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
the msg came after install.packages("RcppZiggurat")
, but it got truncated in the console, and I don't know how to retrieve the rest
I did install GSL using sudo apt-get install libgsl-dev
from rcppziggurat.
"A Linux machine" is adorably non-descriptive. Does it have a know distro? Can you name it?
The posted error message makes no sense. What exactly did you invoke?
Also, know that you need GSL as some of the examples / illustrations use the GSL RNG for comparison. We could lift that. The actual RNG ... is just a header file. So share some more details and I can probably help you.
from rcppziggurat.
Let's bacl off for a second. I wrote RcppZiggurat on Ubuntu and still use it there.
The error message g++: error: R: No such file or directory
makes no sense whatsoever as g++
should not be calling R.
edd@rob:~$ Rscript -e 'install.packages("RcppZiggurat", repos="https://cran.us.r-project.org")'
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.us.r-project.org/src/contrib/RcppZiggurat_0.1.5.tar.gz'
Content type 'application/x-gzip' length 405259 bytes (395 KB)
==================================================
downloaded 395 KB
* installing *source* package ‘RcppZiggurat’ ...
** package ‘RcppZiggurat’ successfully unpacked and MD5 sums checked
** libs
ccache g++ -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppGSL/include" -fpic -g -O3 -Wall -pipe -DBOOST_NO_AUTO_PTR -march=native -c RcppExports.cpp -o RcppExports.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppGSL/include" -fpic -g -O3 -Wall -pipe -DBOOST_NO_AUTO_PTR -std=gnu99 -march=native -c init.c -o init.o
ccache g++ -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppGSL/include" -fpic -g -O3 -Wall -pipe -DBOOST_NO_AUTO_PTR -march=native -c ziggurat.cpp -o ziggurat.o
ccache g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppZiggurat.so RcppExports.o init.o ziggurat.o -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/RcppZiggurat/libs
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RcppZiggurat)
The downloaded source packages are in
‘/tmp/RtmpIdHk0t/downloaded_packages’
edd@rob:~$
I use ccache g++
because of local settings, ditto for some of the compiler flags. But the big picture message is that I invoked the standard command and it just worked.
(For reference, I also keep r-cran-littler
install hand have its install.r
as a softlink in my my path and usually just call install.r RcppZigurrat
, say, but preferred to have a self-contained demo here.)
from rcppziggurat.
looks different for me: still that g++ business - any guesses?
Rscript -e 'install.packages("RcppZiggurat", repos="https://cran.us.r-project.org")'
R version 3.5.1 (2018-07-02)
Feather Spray
Installing package into ‘/home/moritz/R/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.us.r-project.org/src/contrib/RcppZiggurat_0.1.5.tar.gz'
Content type 'application/x-gzip' length 405259 bytes (395 KB)
==================================================
downloaded 395 KB
R version 3.5.1 (2018-07-02)
Feather Spray
* installing *source* package ‘RcppZiggurat’ ...
** package ‘RcppZiggurat’ successfully unpacked and MD5 sums checked
** libs
g++ -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/home/moritz/R/library/Rcpp/include" -I"/home/moritz/R/library/RcppGSL/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/home/moritz/R/library/Rcpp/include" -I"/home/moritz/R/library/RcppGSL/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
g++ -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include -I"/home/moritz/R/library/Rcpp/include" -I"/home/moritz/R/library/RcppGSL/include" -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ziggurat.cpp -o ziggurat.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppZiggurat.so RcppExports.o init.o ziggurat.o
R version 3.5.1 (2018-07-02) Feather Spray -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -L/usr/lib/R/lib -lR
g++: error:
: No such file or directory
g++: error: R: No such file or directory
g++: error: version: No such file or directory
g++: error: 3.5.1: No such file or directory
g++: error: (2018-07-02): No such file or directory
g++: error: Feather: No such file or directory
g++: error: Spray: No such file or directory
/usr/share/R/share/make/shlib.mk:6: recipe for target 'RcppZiggurat.so' failed
make: *** [RcppZiggurat.so] Error 1
ERROR: compilation failed for package ‘RcppZiggurat’
* removing ‘/home/moritz/R/library/RcppZiggurat’
The downloaded source packages are in
‘/tmp/RtmpWOt2bE/downloaded_packages’
Warning message:
In install.packages("RcppZiggurat", repos = "https://cran.us.r-project.org") :
installation of package ‘RcppZiggurat’ had non-zero exit status
from rcppziggurat.
What does which g++
say? Something looks effed-up on your machine. Do you have package r-base-dev
installed?
from rcppziggurat.
Based on this line the package init (needed for the GSL linking) went sour:
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppZiggurat.so RcppExports.o init.o ziggurat.o
R version 3.5.1 (2018-07-02) Feather Spray -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -L/usr/lib/R/lib -lR
g++: error:
Do you have a non-standard ~/.Rprofile
? Something that prints messages? Unusal shell?
In any event, it's "all you": package has a perfect record at CRAN.
from rcppziggurat.
In particular, the file src/Makevars
has this one-liner to get the link instruction:
## Use the R_HOME indirection to support installations of multiple R version
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "RcppGSL:::LdFlags()"`
For some reason this does not work for you. Maybe you can work out why and fix it.
from rcppziggurat.
/usr/bin/g++
I'm sure Rprofile is harmless
r-base-dev is installed. now that g++ keeps coming up, I feel like have experienced this before - guess I'll reinstall all R related stuff.
thanks for your suggestions, I'll do some more research!
from rcppziggurat.
It's that one line about calling RcppGSL:::LdFlags()
. Do you have RcppGSL installed? Do it work? What comes back when you call RcppGSL:::LdFlags()
in your R session?
I get -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm
.
from rcppziggurat.
me too: -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm
from rcppziggurat.
Beats me. At this point unpack the source tarball, replace that line in src/Makevars
with the above as the value of PKG_LIBS
and install. You will get to fix your box another time...
from rcppziggurat.
Any luck?
Any objection to closing this as it does not seem to be a reproducible issue?
from rcppziggurat.
I didn't have time yet, but I'll try as soon as I can. Thanks again!
from rcppziggurat.
I had the same issue, and my Rprofile does load some print()
messages. The solution was to use the vanilla option when starting R. So in my case $ sudo R --vanilla
allowed me to install the package without the error message. Hope it helps...
from rcppziggurat.
I had the same error, the vanilla solution worked for me. Thank you!
from rcppziggurat.
Related Issues (11)
- Not an issue but a request HOT 6
- Setting a seed to value of getSeed() doesn't produce expected draws HOT 11
- 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
- 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
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.