[Rprotobuf-yada] r31 fails on Debian
Dirk Eddelbuettel
edd at debian.org
Fri Oct 30 04:41:24 CET 2009
edd at ron:~/svn/rprotobuf$ svn up
A pkg/R/internals.R
A pkg/R/lookup.R
A pkg/R/00classes.R
U pkg/DESCRIPTION
A pkg/src/rprotobuf.cpp
A pkg/src/rprotobuf.h
A pkg/src/constructors.cpp
A pkg/src/lookup.cpp
U pkg/src/Makevars.in
U pkg/NAMESPACE
Updated to revision 31.
edd at ron:~/svn/rprotobuf$ svn log |less
edd at ron:~/svn/rprotobuf$ R CMD INSTALL pkg/
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘RProtoBuf’ ...
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for Rscript... yes
checking for protoc... yes
checking for ProtoBuf headers and library... yes
configure: creating ./config.status
config.status: creating src/Makevars
Completed configuration and ready to build.
** libs
protoc --cpp_out=. addressbook.proto
g++ -c addressbook.pb.cc -fpic -shared -I/usr/local/lib/R/site-library/Rcpp/lib -I/usr/include
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/lib -I/usr/include -fpic -g -O3 -Wall -pipe -c list_people_R.cpp -o list_people_R.o
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/lib -I/usr/include -fpic -g -O3 -Wall -pipe -c rprotobuf.cpp -o rprotobuf.o
In file included from rprotobuf.cpp:1:
rprotobuf.h:5:47: error: google/protobuf/compiler/importer.h: No such file or directory
In file included from /usr/include/c++/4.3/ostream:569,
from /usr/include/c++/4.3/iostream:45,
from /usr/local/lib/R/site-library/Rcpp/lib/Rcpp.h:25,
from rprotobuf.h:12,
from rprotobuf.cpp:1:
/usr/include/c++/4.3/bits/ostream.tcc: In function ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)’:
/usr/include/c++/4.3/bits/ostream.tcc:334: error: ‘Rf_length’ is not a member of ‘std::char_traits<char>’
In file included from rprotobuf.cpp:1:
rprotobuf.h: At global scope:
rprotobuf.h:32: error: ‘compiler’ is not a namespace-name
rprotobuf.h:32: error: expected namespace-name before ‘;’ token
rprotobuf.cpp:7: error: expected class-name before ‘{’ token
rprotobuf.cpp: In function ‘SEXPREC* org::rproject::rprotobuf::<unnamed>::readProtoFiles(SEXPREC*)’:
rprotobuf.cpp:46: error: ‘DiskSourceTree’ was not declared in this scope
rprotobuf.cpp:46: error: expected `;' before ‘source_tree’
rprotobuf.cpp:47: error: ‘source_tree’ was not declared in this scope
rprotobuf.cpp:48: error: ‘Importer’ was not declared in this scope
rprotobuf.cpp:48: error: expected `;' before ‘importer’
rprotobuf.cpp:54: error: ‘importer’ was not declared in this scope
rprotobuf.cpp:53: warning: unused variable ‘proto_file’
rprotobuf.cpp: In function ‘SEXPREC* org::rproject::rprotobuf::<unnamed>::newProtoMessage(SEXPREC*)’:
rprotobuf.cpp:144: warning: unused variable ‘type’
rprotobuf.cpp:147: warning: unused variable ‘desc_ptr’
/usr/include/c++/4.3/ostream: In function ‘std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*) [with _Traits = std::char_traits<char>]’:
/usr/local/lib/R/site-library/Rcpp/lib/Rcpp.h:143: instantiated from here
/usr/include/c++/4.3/ostream:514: error: ‘Rf_length’ is not a member of ‘std::char_traits<char>’
make: *** [rprotobuf.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’
I may have to bite the bullet and a local protobuf 2.2 package going, or
install it locally. And the
#define PrintValue Rf_PrintValue
#define install Rf_install
#define error Rf_error
strike as the wrong way. Can we not use
// include R headers, but set R_NO_REMAP and access everything via Rf_ prefixes
#define R_NO_REMAP
as I do in Rcp and call everything from as Rf_error, Rf_install, ... and let
the old install(), error(), ... stand for protobuf?
Dirk
--
Three out of two people have difficulties with fractions.
More information about the Rprotobuf-yada
mailing list