Opened 9 years ago
Closed 9 years ago
#1249 closed defect (fixed)
Compilation error on master
Reported by: | Dimitar Misev | Owned by: | Alex Toader |
---|---|---|---|
Priority: | minor | Milestone: | 9.2 |
Component: | rasnet | Version: | development |
Keywords: | Cc: | George Merticariu, Alex Dumitru, Vlad Merticariu | |
Complexity: | Medium |
Description
I'm not able to compile current master (g++ version 4.9.2):
[HOSTCXX] Compiling src/compiler/csharp_generator.cc src/compiler/csharp_generator.cc:47:43: error: ‘google::protobuf::compiler::csharp::GetReflectionClassName’ has not been declared using google::protobuf::compiler::csharp::GetReflectionClassName; ^ src/compiler/csharp_generator.cc: In function ‘void grpc_csharp_generator::{anonymous}::GenerateServiceDescriptorProperty(grpc::protobuf::io::Printer*, const ServiceDescriptor*)’: src/compiler/csharp_generator.cc:237:64: error: ‘GetReflectionClassName’ was not declared in this scope "umbrella", GetReflectionClassName(service->file()), "index", ^ Makefile:1945: recipe for target '/home/dimitar/projects/rasdaman/community/src/third_party/grpc/objs/opt/src/compiler/csharp_generator.o' failed
Here's the configure command:
./configure --prefix=/home/dimitar/projects/rasdaman/community/install --with-pic --with-netcdf --disable-java --with-debug-symbols --with-default-basedb=sqlite --with-filedatadir=/d/rasdata
The repo is a fresh clone.
Change History (6)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
You're right, I found some stuff in /usr/local/. After removing them now I have this problem. Btw do I need protoc from packages or not?
test -f version.h && cmp version.h.tmp version.h || mv version.h.tmp version.h rm -f version.h.tmp 2>/dev/null make all-recursive make[1]: Entering directory '/home/dimitar/projects/rasdaman/community/src' Making all in third_party make[2]: Entering directory '/home/dimitar/projects/rasdaman/community/src/third_party' cd .. && git submodule update --init --recursive cd grpc && \ make && \ /bin/mkdir -p /home/dimitar/projects/rasdaman/community/src/third_party/bin/grpc && \ make install prefix=/home/dimitar/projects/rasdaman/community/src/third_party/bin/grpc make[3]: Entering directory '/home/dimitar/projects/rasdaman/community/src/third_party/grpc' [MAKE] Generating cache.mk [CXX] Compiling src/cpp/proto/proto_utils.cc In file included from include/grpc++/impl/codegen/proto_utils.h:41:0, from include/grpc++/impl/proto_utils.h:37, from src/cpp/proto/proto_utils.cc:34: include/grpc++/impl/codegen/config_protobuf.h:38:42: fatal error: google/protobuf/stubs/common.h: No such file or directory #include <google/protobuf/stubs/common.h> ^ compilation terminated. Makefile:1950: recipe for target '/home/dimitar/projects/rasdaman/community/src/third_party/grpc/objs/opt/src/cpp/proto/proto_utils.o' failed
comment:3 by , 9 years ago
You shouldn't need anything global related to grpc or protobuf. GRPC comes bundled with protobuf and we build it statically so there shouldn't be any need for any linux library.
Not sure about this error, are you sure there's no header somewhere else in the include path?
I've been building it for OSGeo twice yesterday and today and it worked fine for me.
@atoader: Can we force grpc to use the protobuf it comes bundled with? It seems quite problematic for users that install from source, what if he installs some other package that puts protobuf in the global include paths?
comment:4 by , 9 years ago
Make sure to remove GRPC and Protobuf from your system or install the version we are using on your system.
I will present a more comprehensive solution to this problem at our next group meeting. But, if you have time, you can implement a check in third_party/Makefile.am which checks for Protobuf on the user's system and stops the build if it encounters a version older than 0.12.
comment:5 by , 9 years ago
Priority: | blocker → minor |
---|
Ok it worked after really removing anything in /usr I found related to '*protobuf*' and '*grpc*'.
We should put this in the wiki:FAQ or really make sure that the local ones are used as Alex suggested.
You might have a previous protobuf version installed on your computer. GRPC first tries to use the global one. It might help to uninstall the global one.