Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Peng Yu
I still have the errors. trying URL 'http://cran.r-project.org/src/contrib/Rcpp_0.11.6.tar.gz' Content type 'application/x-gzip' length 2352221 bytes (2.2 MB) == downloaded 2.2 MB * installing *source* package ‘Rcpp’ ... ** package ‘Rcpp’ successful

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Kevin Ushey
Finally, you could always try placing this in a file located at `~/.R/Makevars`: CC=clang CXX=clang++ This was an 'old' workaround that ensured packages were built with `clang` on Mavericks and above, when the transition first began... On Tue, May 5, 2015 at 9:01 PM, Kevin Ushey wrote: > Oh,

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Kevin Ushey
Oh, I wonder if you have the Snow Leopard version of R installed, when you should have the Mavericks version? What is the output of `sessionInfo()`? You might need to install the (Mavericks, non-Snow Leopard) version of R here: http://cran.r-project.org/bin/macosx/ On Tue, May 5, 2015 at 8:57 PM,

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Peng Yu
On Tue, May 5, 2015 at 10:52 PM, Kevin Ushey wrote: > Your error: > > Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared object > '/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so': > dlopen(/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so, 6): Symbol > not found: __ZN

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Peng Yu
On Tue, May 5, 2015 at 10:51 PM, Steve Lianoglou wrote: > Hi, > > On Tue, May 5, 2015 at 8:41 PM, Peng Yu wrote: >> On Tue, May 5, 2015 at 3:12 PM, Steve Lianoglou >> wrote: >>> Following the instructions here worked for me: >>> >>> http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadi

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Kevin Ushey
Your error: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so': dlopen(/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: __ZNSoD0Ev says some (mangled) symbol named `__ZNSoD0Ev` could not b

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Steve Lianoglou
Hi, On Tue, May 5, 2015 at 8:41 PM, Peng Yu wrote: > On Tue, May 5, 2015 at 3:12 PM, Steve Lianoglou > wrote: >> Following the instructions here worked for me: >> >> http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error >> >> Although

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Peng Yu
On Tue, May 5, 2015 at 3:12 PM, Steve Lianoglou wrote: > Following the instructions here worked for me: > > http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error > > Although the instructions have a slight typo in them, and probably sho

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Fabio Tordini
It works! I used the configure.ac script to re-generate proper Makevars. The tricky point is that I had to manually add directives to object files and hide the config script, otherwise the Makevars file gets rewritten when rebuilding. I feel like there must be some more elegant way to do it..

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Dirk Eddelbuettel
Fabio, The RcppGSL package ships its own example package: edd@max:~$ cd /tmp/ edd@max:/tmp$ cp -vax /usr/local/lib/R/site-library/RcppGSL/examples/RcppGSLExample/ . ‘/usr/local/lib/R/site-library/RcppGSL/examples/RcppGSLExample/’ -> ‘./RcppGSLExample’ ‘/usr/local/lib/R/site-library/RcppGSL/exa

Re: [Rcpp-devel] List of Lists to List of Vectors

2015-05-05 Thread Dirk Eddelbuettel
On 5 May 2015 at 15:18, Tim Keitt wrote: | On Tue, May 5, 2015 at 9:11 AM, Dirk Eddelbuettel wrote: | On 4 May 2015 at 14:42, Tim Keitt wrote: | | Copying is where all the costs accumulate for sure. I find it mostly | guesswork | | whether something copies or not with Rcpp data st

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Fabio Tordini
Done already, without success. The whole Makevars file is as follows (I didnt paste it before): OBJECTS.PnuChart = ngraph.o RcppExports.o OBJECTS.PnuChart = PnuChart/Finder.o OBJECTS = $(OBJECTS.PnuChart) PKG_CPPFLAGS = -DPRINTLOG -I"../inst/include" -I. -pthread PKG_LIBS = -lcurl -lpthread `$(

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Kevin Ushey
You need to link to GSL as well. RcppGSL provides the appropriate flags within `RcppGSL::LdFlags()`. See what RcppGSL does itself in its configure scripts: https://github.com/eddelbuettel/rcppgsl/blob/2849b8dd777c8057e524c2141dfeaa8e28840350/inst/skeleton/configure.win . Kevin On Tue, May 5, 201

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Fabio Tordini
Ok, I found the 'scrm' Rcpp package: here the file scrmr.cpp provides an interface for calling the scrm C++ application from R. following their solution, I modified my Makevars file, adding: OBJECTS.PnuChart = ngraph.o RcppExports.o OBJECTS.PnuChart = PnuChart/Finder.o OBJECTS = $(OBJECTS.PnuCh

Re: [Rcpp-devel] List of Lists to List of Vectors

2015-05-05 Thread Tim Keitt
On Tue, May 5, 2015 at 9:11 AM, Dirk Eddelbuettel wrote: > > On 4 May 2015 at 14:42, Tim Keitt wrote: > | Copying is where all the costs accumulate for sure. I find it mostly > guesswork > | whether something copies or not with Rcpp data structures. > > By now we have said about 1e4 times that Rc

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Dirk Eddelbuettel
On 5 May 2015 at 16:28, Fabio Tordini wrote: | Here is the actual (simple) code: | | Finder *f = new Finder(); | f->parseFiles(str_g, str_f, str_s); So where is Finder implemented? The computer tells you that you want to use it, but don't supply it. Dirk -- http://dirk.eddelbuett

Re: [Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

2015-05-05 Thread Steve Lianoglou
Following the instructions here worked for me: http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error Although the instructions have a slight typo in them, and probably should read: curl -O http://r.research.att.com/libs/gfortran-4.8

Re: [Rcpp-devel] List of Lists to List of Vectors

2015-05-05 Thread Tim Keitt
On Mon, May 4, 2015 at 2:37 PM, Dirk Eddelbuettel wrote: > Keep us posted. After all that, I ended up with lapply(lapply(1:length(x[[1]]), function(i) lapply(x, function(a) a[[i]])), unlist) Probably fast enough. Its just too painful to deal with the possible types

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Fabio Tordini
Hi Dirk, thanks for your reply! On 05/05/2015 04:14 PM, Dirk Eddelbuettel wrote: On 5 May 2015 at 14:30, Fabio Tordini wrote: | Everything compiles fine, but then it fails when loading the package: | | ** testing if installed package can be loaded | Error in dyn.load(file, DLLpath = DLLpath, ..

Re: [Rcpp-devel] loading failed

2015-05-05 Thread Dirk Eddelbuettel
On 5 May 2015 at 14:30, Fabio Tordini wrote: | Everything compiles fine, but then it fails when loading the package: | | ** testing if installed package can be loaded | Error in dyn.load(file, DLLpath = DLLpath, ...) : |unable to load shared object | '/home/fabio/R/x86_64-pc-linux-gnu-librar

Re: [Rcpp-devel] List of Lists to List of Vectors

2015-05-05 Thread Dirk Eddelbuettel
On 4 May 2015 at 14:42, Tim Keitt wrote: | Copying is where all the costs accumulate for sure. I find it mostly guesswork | whether something copies or not with Rcpp data structures. By now we have said about 1e4 times that Rcpp data structures are ("no copies") whereas other (ie Boost, STL, ...)

[Rcpp-devel] loading failed

2015-05-05 Thread Fabio Tordini
Hi all, I have a C++ application I developed, with its headers (.hpp) and related .cpp files. Within this project I use a templated header-only library for efficient parallel computing using pthreads, as well as the GSL library. My intent is to use this application within a R package, and I use