--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CO2PR0501MB918617A1DF2CA13F8C32BB1B6E50%40CO2PR0501MB918.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Michael. After installing higher version of sphinx library I am not seeing this error anymore. However, I am hitting other error:
In file included from grpc/_adapter/_c/module.c:40:0:
./grpc/_adapter/_c/types.h:49:3: error: unknown type name ‘grpc_credentials’
I looked into the file and it is declared as below:
#ifndef GRPC__ADAPTER__C_TYPES_H_
#define GRPC__ADAPTER__C_TYPES_H_
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
/*=========================*/
/* Client-side credentials */
/*=========================*/
typedef struct ClientCredentials {
PyObject_HEAD
grpc_credentials *c_creds;
} ClientCredentials;
But I don’t see grpc_credentials is defined either in grpc.h or grpc_security.h. Do you know how to solve this issue ?
$ sudo pip install grpcio
Downloading/unpacking grpcio
Running setup.py egg_info for package grpcio
Downloading/unpacking enum34>=1.0.4 (from grpcio)
Running setup.py egg_info for package enum34
Downloading/unpacking futures>=2.2.0 (from grpcio)
Running setup.py egg_info for package futures
Installing collected packages: grpcio, enum34, futures
Running setup.py install for grpcio
building 'grpc._adapter._c' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/include/python2.7 -c grpc/_adapter/_c/module.c -o build/temp.linux-x86_64-2.7/grpc/_adapter/_c/module.o
In file included from grpc/_adapter/_c/module.c:40:0:
./grpc/_adapter/_c/types.h:49:3: error: unknown type name \u2018grpc_credentials\u2019
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/b/kmajumdar/grpc/grpc/build/grpcio/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kraQP9-record/install-record.txt:
running install
running build
running build_py
running build_project_metadata
copying ./grpc/_grpcio_metadata.py -> build/lib.linux-x86_64-2.7/grpc
running build_ext
building 'grpc._adapter._c' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/include/python2.7 -c grpc/_adapter/_c/module.c -o build/temp.linux-x86_64-2.7/grpc/_adapter/_c/module.o
In file included from grpc/_adapter/_c/module.c:40:0:
./grpc/_adapter/_c/types.h:49:3: error: unknown type name ‘grpc_credentials’
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/b/kmajumdar/grpc/grpc/build/grpcio/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kraQP9-record/install-record.txt failed with error code 1
Storing complete log in /homes/kmajumdar/.pip/pip.log
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.0', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 116, in main
return command.main(initial_args, args[1:], options)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 147, in main
log_fp = open_logfile(log_fn, 'w')
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 176, in open_logfile
log_fp = open(filename, mode)
Your installation of the grpc C core may be too new. Try following the instructions in the repository to install the Debian package.
I was able to install successfully after applying the below patch.
diff -ru grpcio-0.11.0b1_pristine/grpc/_adapter/_c/types/client_credentials.c grpcio-0.11.0b1
/grpc/_adapter/_c/types/client_credentials.c
--- grpcio-0.11.0b1_pristine/grpc/_adapter/_c/types/client_credentials.c 2015-09-24 23
:28:43.000000000 +0530
+++ grpcio-0.11.0b1/grpc/_adapter/_c/types/client_credentials.c 2015-12-23 05:01:48.560000000
+0530
@@ -100,7 +100,9 @@
};
void pygrpc_ClientCredentials_dealloc(ClientCredentials *self) {
+#ifdef GRPCIO_SECURE_CHANNEL
grpc_credentials_release(self->c_creds);
+#endif
self->ob_type->tp_free((PyObject *)self);
}
@@ -158,8 +160,10 @@
return NULL;
}
self = (ClientCredentials *)type->tp_alloc(type, 0);
+#ifdef GRPCIO_SECURE_CHANNEL
self->c_creds =
grpc_composite_credentials_create(creds1->c_creds, creds2->c_creds, NULL);
+#endif
if (!self->c_creds) {
Py_DECREF(self);
PyErr_SetString(PyExc_RuntimeError, "couldn't create composite credentials");
diff -ru grpcio-0.11.0b1_pristine/grpc/_adapter/_c/types.h grpcio-0.11.0b1/grpc/_adapter/_c/t
ypes.h
--- grpcio-0.11.0b1_pristine/grpc/_adapter/_c/types.h 2015-09-24 23:28:43.000000000 +0530
+++ grpcio-0.11.0b1/grpc/_adapter/_c/types.h 2015-12-23 04:27:33.728000000 +0530
@@ -46,7 +46,11 @@
typedef struct ClientCredentials {
PyObject_HEAD
+#ifdef GRPCIO_SECURE_CHANNEL
grpc_credentials *c_creds;
+#else
+ void *c_creds;
+#endif
} ClientCredentials;
void pygrpc_ClientCredentials_dealloc(ClientCredentials *self);
ClientCredentials *pygrpc_ClientCredentials_google_default(
</o: