Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No member named ByteSizeLong #70

Closed
gbrsales opened this issue Mar 21, 2020 · 6 comments
Closed

No member named ByteSizeLong #70

gbrsales opened this issue Mar 21, 2020 · 6 comments

Comments

@gbrsales
Copy link

@gbrsales gbrsales commented Mar 21, 2020

I'm getting a build error on Ubuntu 18.04.

g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -pthread -g -O2 -fdebug-prefix-map=/build/MANUAL/r-base/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werro
r=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I"/usr/local/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/MANUAL/r-ba
se/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c wrapper_Message.cpp -o wrapper_Message.o
wrapper_Message.cpp: In function ‘Rcpp::RawVector rprotobuf::Message__get_payload__rcpp__wrapper__(Rcpp::XPtr<google::protobuf::Message>)’:
wrapper_Message.cpp:149:30: error: ‘class google::protobuf::Message’ has no member named ‘ByteSizeLong’; did you mean ‘ByteSize’?
     R_xlen_t size = message->ByteSizeLong();
                              ^~~~~~~~~~~~
                              ByteSize
In file included from wrapper_Message.cpp:4:0:
wrapper_Message.cpp: In function ‘SEXPREC* rprotobuf::Message__bytesize(SEXP)’:
wrapper_Message.cpp:253:49: error: ‘class google::protobuf::Message’ has no member named ‘ByteSizeLong’; did you mean ‘ByteSize’?
 RPB_XP_METHOD_0(METHOD(bytesize), GPB::Message, ByteSizeLong)
                                                 ^
RcppMacros.h:123:35: note: in definition of macro ‘RPB_XP_METHOD_0’
         return ::Rcpp::wrap( ptr->__METHOD__(  ) ) ;      \
                                   ^~~~~~~~~~
/usr/lib/R/etc/Makeconf:177: recipe for target 'wrapper_Message.o' failed
make: *** [wrapper_Message.o] Error 1
ERROR: compilation failed for package ‘RProtoBuf’

R is installed from Michael Rutter's PPA (http://ppa.launchpad.net/marutter/rrutter3.5/ubuntu).

$ R --version
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"

System dependencies:

libprotobuf-dev:amd64  3.0.0-9.1ubuntu1
libprotoc-dev:amd64    3.0.0-9.1ubuntu1
protobuf-compiler      3.0.0-9.1ubuntu1
@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Mar 21, 2020

Darn. I am on 3.6.1.3-2 with Ubuntu 19.10. I'll look into a test and #ifdef.

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Mar 21, 2020

@gbrsales
Copy link
Author

@gbrsales gbrsales commented Mar 21, 2020

Builds cleanly now. Thanks!

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Mar 21, 2020

Thanks for the confirmation (and of course the bug report). Not my proudest moment :-/

Also only now notice that I need to condition the new JSON tests by @siddharthab on actually having ProtoBuf 3 or newer. Adding that now...

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Mar 21, 2020

I put an interim version RProtoBuf 0.4.16.1 into the GHRR Drat from where it can be installed via

install.packages("RProtoBuf", repos="https://ghrr.github.io/drat")
@wlandau wlandau mentioned this issue Mar 22, 2020
2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.