Open husafan opened 2 years ago
It looks like you didn't build and install the package?
there is no package called 'grpc'
Thank you you very much for replying. You were absolutely right. Please forgive my newness to R. I got further last night by installing the devtools package and then running install_local("/tmp/grpc")
. However, now I am seeing the following error:
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/Rcpp/include' `pkg-config --cfl
ags grpc` -fpic -g -O2 -ffile-prefix-map=/build/r-base-kbcSEe/r-base-4.1.1=. -flto=auto -ffat-lto-objects -fstack-pro
tector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.og++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/Rcpp/include' `pkg-config --cflags grpc` -fpic -g -O2 -ffile-prefix-map=/build/r-base-kbcSEe/r-base-4.1.1=. -flto=auto -ffat-lto-objects -fstack-pro
tector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c client.cpp -o client.o
client.cpp: In function 'Rcpp::RawVector fetch(Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::RawVector, Rcpp::Ch
aracterVector)': client.cpp:76:47: error: no match for 'operator=' (operand types are 'grpc_metadata' and '<brace-enclosed initializer list>') 76 | {{nullptr, nullptr, nullptr, nullptr}}};
| ^
In file included from /.grpc/include/grpc/impl/codegen/byte_buffer.h:26,
from /.grpc/include/grpc/byte_buffer.h:24, from /.grpc/include/grpc/grpc.h:26, from client.cpp:2: /.grpc/include/grpc/impl/codegen/grpc_types.h:533:16: note: candidate: 'grpc_metadata& grpc_metadata::operator=(const
grpc_metadata&)'
533 | typedef struct grpc_metadata {
| ^~~~~~~~~~~~~
/.grpc/include/grpc/impl/codegen/grpc_types.h:533:16: note: no known conversion for argument 1 from '<brace-enclosed
initializer list>' to 'const grpc_metadata&'
/.grpc/include/grpc/impl/codegen/grpc_types.h:533:16: note: candidate: 'grpc_metadata& grpc_metadata::operator=(grpc_m
etadata&&)'
/.grpc/include/grpc/impl/codegen/grpc_types.h:533:16: note: no known conversion for argument 1 from '<brace-enclosed
initializer list>' to 'grpc_metadata&&'
make: *** [/usr/lib/R/etc/Makeconf:177: client.o] Error 1
ERROR: compilation failed for package 'grpc'
* removing '/usr/local/lib/R/site-library/grpc'
Any idea what that's about? Thanks again for your time and help.
The error message you posted is at this line:
https://github.com/nfultz/grpc/blob/8306bf8158ace0e66d6c8a3b7132e313116ef573/src/client.cpp#L76
I suspect you are using a more recent version of GRPC from google, and maybe something in the header slightly changed. If you make the line match the version you installed, it ought to build, or it may reveal some other related issues. Please dosubmit a PR if you get it working.
I've set up a Docker container running Ubuntu 21. I've followed the instructions under installation to make sure the necessary package dependencies are installed and that grpc is available. I then clone the repository, CD into the base directory and run
R -e 'demo("helloserver", "grpc")'
. I see: