[Rcpp-devel] RInside error running examples after installing from source on Ubuntu 12.04

Dirk Eddelbuettel edd at debian.org
Sun Dec 30 23:16:26 CET 2012


Hi Nicholas,

On 30 December 2012 at 16:48, Nicholas Pezolano wrote:
| Hi I've installed R from source and all required packages on Ubuntu 12.04

Okay, but may I ask why R from source?  

Except when you know what you're doing and have good reason to believe that
you know more about this than the people packaging R (in this case yours
truly for the packaging, and Michael for the builds on Ubuntu) for you (as
may be the case if you're on a special cluster, or use non-standard
compilers) then you're essentially just wasting time and, worse still, risk
making your life harder.

The "tl;dr" work version:  it. all. works. for. me.  With the shipped packages.
 
| R version 2.15.2
| 
| 
| Rcpp, RInside all installed with no problems in R
| 
| I compiled R with the following command 
| 
| ./configure --enable-R-shlib --enable-BLAS-shlib --prefix=/home/npezolano/libs
| 
| When I use the make file supplied from the examples,I changed R_HOME to the
| prefix above and  all the examples compile without error but theres a run time
| error 
| 
| 
| Reigen example01 
| npezolano at Manatee2:~/RInside/examples$ ./reigen 
| Error in paste0("(^|[^%])(%%)*%", spec) : not a BUILTIN function
| Error in paste0("^", pkg, "$") : not a BUILTIN function
| Execution halted
| 
| RInside example01
| npezolano at Manatee2:~/RInside/examples$ ./rinside 
| Error in paste0("(^|[^%])(%%)*%", spec) : not a BUILTIN function
| Error in paste0("^", pkg, "$") : not a BUILTIN function
| Execution halted
| 
| Any ideas on what went wrong?

It breaks, you get to keep the pieces. I can't reproduce the error _from your
non-standard setup_ on my otherwise identical Ubuntu 12.10 with everything as
shipped and received from CRAN.  My R is the binary Michael's scripts create
based on my Debian package; Rcpp and RInside are straight from CRAN (though I
may at times have SVN releases).

edd at max:~$ cd svn/rinside/pkg/inst/examples/eigen/
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ ls
cmake  Makefile  rinside_eigen0.cpp  rinside_eigen1.cpp
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ make
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RcppEigen/include        -I/usr/local/lib/R/site-library/RInside/include -O2 -pipe -g -Wall    rinside_eigen0.cpp  -L/usr/lib/R/lib -lR  -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib  -o rinside_eigen0
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RcppEigen/include        -I/usr/local/lib/R/site-library/RInside/include -O2 -pipe -g -Wall    rinside_eigen1.cpp  -L/usr/lib/R/lib -lR  -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/local/lib/R/site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib  -o rinside_eigen1
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ ls
cmake  Makefile  rinside_eigen0  rinside_eigen0.cpp  rinside_eigen1  rinside_eigen1.cpp
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ ./rinside_eigen0
1 0 0
0 1 0
0 0 1
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ ./rinside_eigen1
Initial Matrix m
  1.37096  0.632863   1.51152
-0.564698  0.404268 -0.094659
 0.363128 -0.106125   2.01842
Product n = m' * m
 2.33027 0.600802  2.85863
0.600802  0.57521 0.704114
 2.85863 0.704114  6.36769
n.sum() 17.6003
nrq.rank() 3
edd at max:~/svn/rinside/pkg/inst/examples/eigen$ 

I'd love to help, but so far I have no idea where you may have shot yourself
in the foot.

Or am I misunderstanding and you simple show your own examples failing
without telling us what those examples do?  How we should be able to help in
that case is not entirely clear either...

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list