[Rprotobuf-yada] workaround for serializing to arbitrary binary connections

Dirk Eddelbuettel edd at debian.org
Sun Nov 8 15:17:48 CET 2009


On 8 November 2009 at 13:28, Romain François wrote:
| Hi,
| 
| I've commited a workaround for serializing messages to arbitrary binary 
| connections. Basically instead of going through a file as before, I am 
| now grabbing the payload of the message as a raw vector and write the 
| payload using writeBin.
| 
| It is less efficient than if I had access to connections at the C level, 
| maybe one day.

I can't build it:

[...]
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/lib -I/usr/include     -fpic  -g -O3 -Wall -pipe -c read.cpp -o read.o
In file included from read.cpp:1:
rprotobuf.h:13:59: error: google/protobuf/io/zero_copy_stream_impl_lite.h: No such file or directory
make: *** [read.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’

edd at ron:~/svn/rprotobuf$ ls /usr/include/google/protobuf/io/
coded_stream.h  gzip_stream.h  printer.h  tokenizer.h  zero_copy_stream.h  zero_copy_stream_impl.h
edd at ron:~/svn/rprotobuf$

Version prior to 2.2 do not have the *_lite.h variants, I suppose.

We could require 2.2, but then we'd need to test for it too in configure.  

Dirk

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


More information about the Rprotobuf-yada mailing list