Comments (11)
"error: ‘map’ does not name a type" Do you have build essentials installed? Can you build https://github.com/protobuf-c/protobuf-c project and see if that goes through fine?
from grpc-c.
@ajhai protobuf-c is already installed and able to do the example snippet compilation. i.e, protoc --c_out=. example.proto
What I am trying to achieve is building a c based server stram application.
from grpc-c.
I took a look and that is a legitimate error. That header file includes and declares a variable "variables_" of type map...which it should be std::map. So it's a legitimate bug IMO. Its possible for the developer that header includes somewhere in the chain have a "using namespace std;" in which case the map without std:: prefix would work...but that would be bad form. Dont use "using namespace ..." in headers (impl files are fine). Reason being that it imports the entire std:: namespace into global namespace, can then cause naming conflicts, it's affect is viral to all code that includes that evil header, and negates the whole reason for using namespaces. My suggestion would be to fork that project and fix up those issues by adding std:: to the front of map. Then send the original developer a pull request after you have it working.
from grpc-c.
@guru-florida Thanks for looking into it. Like I said, the namespace issue keeps growing for other components like sets, queue and so on. So I thought I was missing something. So were you able to compile this in other environments?
from grpc-c.
I found these are already addressed in the parent protobuf-c so updated the submodule by pulling from the master for the submodule. Now I am having this issue. @ajhai Anything that I missed here ?
make all-recursive make[1]: Entering directory '/home/kumaran/grpc-c/build' Making all in compiler make[2]: Entering directory '/home/kumaran/grpc-c/build/compiler' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/kumaran/grpc-c/build/compiler' Making all in lib make[2]: Entering directory '/home/kumaran/grpc-c/build/lib' depbase=`echo client.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I../../lib -I../../lib/h -I../../lib/../third_party/protobuf-c -g -O2 -MT client.lo -MD -MP -MF $depbase.Tpo -c -o client.lo ../../lib/client.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I../../lib -I../../lib/h -I../../lib/../third_party/protobuf-c -g -O2 -MT client.lo -MD -MP -MF .deps/client.Tpo -c ../../lib/client.c -fPIC -DPIC -o .libs/client.o ../../lib/client.c: In function ‘gc_client_create_by_host’: ../../lib/client.c:82:43: error: too few arguments to function ‘grpc_completion_queue_create’ client->gcc_channel_connectivity_cq = grpc_completion_queue_create(NULL); ^ In file included from ../../lib/h/grpc-c/grpc-c.h:14:0, from ../../lib/client.c:6: /usr/local/include/grpc/grpc.h:98:32: note: declared here GRPCAPI grpc_completion_queue *grpc_completion_queue_create( ^ ../../lib/client.c: In function ‘gc_client_prepare_async_ops’: ../../lib/client.c:579:23: error: too few arguments to function ‘grpc_completion_queue_create’ context->gcc_cq = grpc_completion_queue_create(NULL); ^ In file included from ../../lib/h/grpc-c/grpc-c.h:14:0, from ../../lib/client.c:6: /usr/local/include/grpc/grpc.h:98:32: note: declared here GRPCAPI grpc_completion_queue *grpc_completion_queue_create( ^ ../../lib/client.c: In function ‘gc_client_prepare_sync_ops’: ../../lib/client.c:744:23: error: too few arguments to function ‘grpc_completion_queue_create’ context->gcc_cq = grpc_completion_queue_create(NULL); ^ In file included from ../../lib/h/grpc-c/grpc-c.h:14:0, from ../../lib/client.c:6: /usr/local/include/grpc/grpc.h:98:32: note: declared here GRPCAPI grpc_completion_queue *grpc_completion_queue_create( ^ ../../lib/client.c: In function ‘gc_client_prepare_unary_ops’: ../../lib/client.c:874:23: error: too few arguments to function ‘grpc_completion_queue_create’ context->gcc_cq = grpc_completion_queue_create(NULL); ^ In file included from ../../lib/h/grpc-c/grpc-c.h:14:0, from ../../lib/client.c:6: /usr/local/include/grpc/grpc.h:98:32: note: declared here GRPCAPI grpc_completion_queue *grpc_completion_queue_create( ^ Makefile:482: recipe for target 'client.lo' failed make[2]: *** [client.lo] Error 1 make[2]: Leaving directory '/home/kumaran/grpc-c/build/lib' Makefile:464: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/kumaran/grpc-c/build' Makefile:375: recipe for target 'all' failed make: *** [all] Error 2
from grpc-c.
@javapriyan Thanks for identifying protobuf-c updates. I will pull and update submodule. This all seems to be working fine in my vagrant which is Ubuntu 16.04. For the issues that you are seeing now, what is the version of gRPC you have installed? Latest master of grpc-c will work with gRPC v1.3.0
from grpc-c.
@ajhai It was 1.6 I guess. To be precise used this https://github.com/grpc/grpc/blob/v1.6.x/INSTALL.md Let me try downgrade this to 1.3 once.
from grpc-c.
After degrading, I have got this error. I know I am making some noice here but would really love to get this up and running.
In file included from /usr/include/string.h:630:0, from ../../lib/common/strextra.h:16, from ../../lib/stream_ops.c:6: ../../lib/common/strextra.h:88:7: error: expected identifier or ‘(’ before ‘__extension__’ char *strndup (const char *str, size_t count); ^ Makefile:482: recipe for target 'stream_ops.lo' failed make[2]: *** [stream_ops.lo] Error 1 make[2]: Leaving directory '/home/kumaran/grpc-c/build/lib' Makefile:464: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/kumaran/grpc-c/build' Makefile:375: recipe for target 'all' failed make: *** [all] Error 2
from grpc-c.
Looks like some issue with strndup definition. Other projects also seem to have hit similar issue. Can you check what is the generated value of HAVE_STRNDUP ? Can you paste your configure output? If you want to get it up and running quick, can you try this on a vagrant with 16.04? Use protobuf 3.0 and gRPCv1.3. I suspect the initial error could be because of running latest protobuf. What is the version of protobuf you have installed?
from grpc-c.
I fixed the error: expected identifier or ‘(’ before ‘__extension__’
error by #including "config.h" in lib/stream_ops.c.
--- a/lib/stream_ops.c
+++ b/lib/stream_ops.c
@@ -3,6 +3,7 @@
* All rights reserved.
*/
+#include "config.h"
#include "common/strextra.h"
#include "stream_ops.h"
from grpc-c.
@javapriyan Do you have solve the compile problem? How to solve?
from grpc-c.
Related Issues (20)
- incompatible with current gRPC head
- Unable to make under Debian 8.6 HOT 15
- ./buildgen.sh not found HOT 1
- SSL credential setting sample needed HOT 1
- extra "uint32_t flags" in generated client code HOT 2
- Support for latest gRPC
- grpc_c_init return failure? HOT 1
- grpc_c_server_add_insecure_http2_port should return 0 on failure HOT 1
- build failed on ubuntu 16.04 HOT 2
- Invoking client with positive timeout value always fails and causes server to core dump HOT 1
- gRPC-C server receives zero data from sync client.
- How to enable TCP socket? HOT 1
- How to make grpc-c for embedded Linux using buildroot HOT 1
- misprint in ./builddeps.sh
- Illegal header key error on trying to set authorization header using metadata HOT 3
- SSL credential failed
- ./builddeps.sh fails : HOT 1
- ../configure fails HOT 1
- is this still alive? and any plan? HOT 4
- example foo_server foo_client don't not work. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-c.