[Rprotobuf-yada] Compiling on RHEL 64 bit Linux

Dirk Eddelbuettel edd at debian.org
Thu Dec 24 18:18:51 CET 2009


Hi Saptarshi,

On 24 December 2009 at 11:53, Saptarshi Guha wrote:
| Hello,
| 
| I tried installing rprotobuf on Linux(64 bit) but ran into the following   error
|
| svn checkout svn://svn.r-forge.r-project.org/svnroot/rprotobuf
| cd rprotobuf
| R CMD INSTALL pkg
| 
| g++ -I/ln/meraki/custom/lib64/R/include
| -I/ln/meraki/custom/lib64/R/library/Rcpp/lib -pthread
| -I/ln/meraki/custom/include   -I/usr/local/include    -fpic  -g -O2 -c
| as.cpp -o as.o
| /ln/meraki/custom/lib64/R/library/Rcpp/lib/Rcpp.h: In member function
| ‘void RcppDatetime::parseTime()’:
| /ln/meraki/custom/lib64/R/library/Rcpp/lib/Rcpp.h:98: warning:
| converting to ‘time_t’ from ‘double’
| /ln/meraki/custom/lib64/R/library/Rcpp/lib/Rcpp.h:99: warning:
| converting to ‘int’ from ‘double’
| as.cpp: At global scope:
| as.cpp:4: error: ‘external_pointer’ is not a template
| as.cpp:4: error: explicit instantiation of non-template type
| ‘rcpp::external_pointer’
| make: *** [as.o] Error 1
| chmod: cannot access
| `/ln/meraki/custom/lib64/R/library/RProtoBuf/libs/*': No such file or
| directory
| ERROR: compilation failed for package 'RProtoBuf'
| ** Removing '/ln/meraki/custom/lib64/R/library/RProtoBuf'
| 
| 
| Have I missed something?

I just verified that it also breaks for me :-/   

g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/lib -pthread -fpic  -g -O3 -Wall -pipe -c as.cpp -o as.o
as.cpp:4: error: ‘external_pointer’ is not a template
as.cpp:4: error: explicit instantiation of non-template type ‘rcpp::external_pointer’
make: *** [as.o] Error 1
ERROR: compilation failed for package ‘RProtoBuf’
* removing ‘/usr/local/lib/R/site-library/RProtoBuf’
* restoring previous ‘/usr/local/lib/R/site-library/RProtoBuf’

So looks like Romain broke that...  

At my end: 'g++ --version' gives 'g++ (Ubuntu 4.3.4-5ubuntu1) 4.3.4' (at work
and using amd64; R is 2.10.1).

Now the fun bit:  It builds on a very similar Debian box (g++ 4.3.6, R
2.10.1) so I will take a peek at the R headers and see if I can discern what
goes wrong with the external pointer template.

| On another note, since Google's protobuf actually uses pthreads, I think it is a
| good idea to set R_CStackLimit (I don't see it in rprotobuf source, but since it
| links with RCpp, is this already set?). I have set this to -1 in my library,
| which fixed some very hard to decipher bugs.

Hm. Interesting. I only ever touch that in littler and RInside, ie when I
actually embed R but not in normal client code.  But you make a good point
with R and these potentially multithreaded libraries.

| Also, I can load my libraries /and/ debug using GDB.

Noted.

Will you send an abstract for R / Hadoop / ... to our upcoming R / Finance
conference?  [ Romain: That is of course also open for you if can spin a
finance topic ;-)  Don't think we can fly you over, unfortunately ... ]

Dirk

-- 
Three out of two people have difficulties with fractions.


More information about the Rprotobuf-yada mailing list