Giter Site home page Giter Site logo

Comments (15)

mluerig avatar mluerig commented on June 3, 2024 2

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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

"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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

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.

mluerig avatar mluerig commented on June 3, 2024

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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

What does which g++ say? Something looks effed-up on your machine. Do you have package r-base-dev installed?

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

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.

mluerig avatar mluerig commented on June 3, 2024

/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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

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.

mluerig avatar mluerig commented on June 3, 2024

me too: -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm

from rcppziggurat.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

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.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

Any luck?

Any objection to closing this as it does not seem to be a reproducible issue?

from rcppziggurat.

mluerig avatar mluerig commented on June 3, 2024

I didn't have time yet, but I'll try as soon as I can. Thanks again!

from rcppziggurat.

sagebiej avatar sagebiej commented on June 3, 2024

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.

3Julia3 avatar 3Julia3 commented on June 3, 2024

I had the same error, the vanilla solution worked for me. Thank you!

from rcppziggurat.

Related Issues (11)

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.