error: unknown type name ‘grpc_credentials’

238 views
Skip to first unread message

Joris Peeters

unread,
Nov 29, 2015, 10:36:33 AM11/29/15
to grpc.io

I am trying to install the python package for gRPC. Doing "sudo pip install grpcio==0.11.0b1" leads to the following error ...


....

x86_64-linux-gnu-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’

   grpc_credentials *c_creds;

   ^

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I am on Ubuntu 14.04. Has anyone seen this? Not immediately getting any hits from google.

Cheers,
-J

Nathaniel Manista

unread,
Nov 30, 2015, 12:27:52 PM11/30/15
to Joris Peeters, grpc.io
Do you also have the gRPC Core (libgrpc-dev) installed on this system? What you're seeing strongly suggests to me that you don't yet have it.
-Nathaniel

Michael Lumish

unread,
Nov 30, 2015, 12:30:46 PM11/30/15
to Nathaniel Manista, Joris Peeters, grpc.io
It is also possible that you have installed a version of the gRPC Core that is too new. On master, grpc_credentials has been replaced with grpc_call_credentials and grpc_channel_credentials. To get the version of the gRPC core that is compatible with the python package, you should install libgrpc-dev using apt-get.

--
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/CAEOYnAS1YddnWT5X%3DVgUWNrzYkvW92ZZmE4oDvYfxt17YeKu%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Joris Peeters

unread,
Nov 30, 2015, 5:06:20 PM11/30/15
to Michael Lumish, Nathaniel Manista, grpc.io
Yep - that was it. I built grpc core from yesterday's master and that's what I was trying to get to work with the python package.

Thanks!
-J

darkhan.i...@gmail.com

unread,
Jan 5, 2016, 10:56:22 PM1/5/16
to grpc.io, nath...@google.com, joris.mg...@gmail.com
I have installed libgrpc-dev using apt-get, however I still get the same error

In file included from grpc/_adapter/_c.c:41:0:
./grpc/_adapter/_client_credentials.h:42:3: error: unknown type name ‘grpc_credentials’
   grpc_credentials *c_client_credentials;

   ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I'm running ubuntu 15.10. Appreciate your help

Thanks,
Darkhan

Jayant Kolhe

unread,
Jan 12, 2016, 7:01:18 PM1/12/16
to darkhan.i...@gmail.com, grpc.io, Nathaniel Manista, joris.mg...@gmail.com
It seems that your grpc core library is from master branch or release 0.12 where the API has changed.. Please see email from Varun on this group regarding the API change..


dajo...@gmail.com

unread,
Feb 3, 2016, 12:08:01 PM2/3/16
to grpc.io
when will grpcio get the update on pypi?

In the mean time... how can I manually build it? I found that the setup.py is no longer where it was on previous releases

Nathaniel Manista

unread,
Feb 3, 2016, 12:52:18 PM2/3/16
to dajo...@gmail.com, grpc.io, Masood Malekghassemi
On Wed, Feb 3, 2016 at 9:08 AM, <dajo...@gmail.com> wrote:
when will grpcio get the update on pypi?

We are currently working hard on release 0.13, which we anticipate will be wholly self-contained and not require separate installation of the gRPC Core. Unfortunately I don't have a concrete time frame to share, but let's guess at "longer than days and shorter than months"?

In the mean time... how can I manually build it? I found that the setup.py is no longer where it was on previous releases

The packaging work we're currently doing has interfered with our previous assumptions about building and running from source; the current best instructions are here but expect things to shift even further in the next few weeks. Please pardon our dust.
-N

kumarvik...@gmail.com

unread,
Aug 30, 2016, 1:49:11 AM8/30/16
to grpc.io

Hi,

Is this issue resolved ? I am seeing this issue.

Nathaniel Manista

unread,
Aug 30, 2016, 10:11:02 AM8/30/16
to kumarvik...@gmail.com, grpc.io
On Mon, Aug 29, 2016 at 10:49 PM, <kumarvik...@gmail.com> wrote:
Is this issue resolved ?

Yes, this has been resolved for several months.

I am seeing this issue.

Please tell us more about your platform (hardware, operating system, and operating system version), and how you're installing gRPC Python (pip version, whether or not you're working in a virtual environment, version of grpcio that is being downloaded from PyPI or version of source with which you're working, and whatever else you are able to share that seems relevant).
-Nathaniel

vikash kumar

unread,
Aug 30, 2016, 12:46:16 PM8/30/16
to Nathaniel Manista, grpc.io
Hi
I am running one script for building grpcio. This script is working fine with older version of grpc. With latest version of grpc it is giving error.

Here is the script.

<<

grpc_source_path=<path1>/grpc
grpc_install_path=<path1>/build/
venv_path=build/python2.7
virtualenv --python=python2.7 $venv_path
. $venv_path/bin/activate
CFLAGS="-I$grpc_install_path/include -std=c89 -Werror" LDFLAGS=-L$grpc_install_path/lib pip install grpcio==0.11.0b0

>>

I am using ubuntu 14.04. grpc 1.0 ,protobuf 3.0 and pip 1.5.4.

Let me know if you need some more info.







Nathaniel Manista

unread,
Aug 30, 2016, 12:55:08 PM8/30/16
to vikash kumar, grpc.io
On Tue, Aug 30, 2016 at 9:46 AM, vikash kumar <kumarvik...@gmail.com> wrote:
I am running one script for building grpcio. This script is working fine with older version of grpc. With latest version of grpc it is giving error.

Here is the script.

<<

grpc_source_path=<path1>/grpc
grpc_install_path=<path1>/build/
venv_path=build/python2.7
virtualenv --python=python2.7 $venv_path
. $venv_path/bin/activate
CFLAGS="-I$grpc_install_path/include -std=c89 -Werror" LDFLAGS=-L$grpc_install_path/lib pip install grpcio==0.11.0b0

grpcio 0.11.0b0??? Released nearly one year ago? Please upgrade to grpcio 1.0.0.

In the last year we've made grpcio entirely self-contained, so you shouldn't have to have the gRPC Core installed on your system or built locally or anything like that. You should just be able to "pip install grpcio" and move forward.

I am using ubuntu 14.04. grpc 1.0 ,protobuf 3.0 and pip 1.5.4.

Please upgrade pip to at least 8.0 - there shouldn't be any issue with that since you're working with a virtual environment, right?

Let me know if you need some more info.

After using grpcio 1.0.0 and pip 8.0-or-later, what's the next obstacle you encounter?
-Nathaniel

vikash kumar

unread,
Aug 30, 2016, 1:46:22 PM8/30/16
to grpc.io, Nathaniel Manista

As you mentioned i am using grpcio 1.0.0. and using following command.

CFLAGS="-I$grpc_install_path/include -std=c89 -Werror" LDFLAGS=-L$grpc_install_path/lib pip install grpcio

Facing Following issue.

<<
build//include/grpc/impl/codegen/alloc.h:68:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

 GPRAPI gpr_allocation_functions gpr_get_allocation_functions();

 ^

src/python/grpcio/grpc/_cython/cygrpc.c:2076:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

 static PyObject *__pyx_pf_4grpc_7_cython_6cygrpc_8Timespec_4infinite_future(); /* proto */


>>


Nathaniel Manista

unread,
Aug 30, 2016, 1:52:38 PM8/30/16
to vikash kumar, grpc.io
On Tue, Aug 30, 2016 at 10:46 AM, vikash kumar <kumarvik...@gmail.com> wrote:
As you mentioned i am using grpcio 1.0.0. and using following command.

CFLAGS="-I$grpc_install_path/include -std=c89 -Werror" LDFLAGS=-L$grpc_install_path/lib pip install grpcio

I think the way forward is even simpler than that. I don't think you need a command line nearly that long.

Facing Following issue.

<<
build//include/grpc/impl/codegen/alloc.h:68:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

I don't think you need a "build" directory.

 GPRAPI gpr_allocation_functions gpr_get_allocation_functions();

 ^

src/python/grpcio/grpc/_cython/cygrpc.c:2076:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]

I don't think you need a "src" directory.

 static PyObject *__pyx_pf_4grpc_7_cython_6cygrpc_8Timespec_4infinite_future(); /* proto */

>>

On Tue, Aug 30, 2016 at 10:24 PM, Nathaniel Manista <nath...@google.com> wrote:
On Tue, Aug 30, 2016 at 9:46 AM, vikash kumar <kumarvik...@gmail.com> wrote:
I am running one script for building grpcio. This script is working fine with older version of grpc. With latest version of grpc it is giving error.

Here is the script.

<<

grpc_source_path=<path1>/grpc
grpc_install_path=<path1>/build/
venv_path=build/python2.7
virtualenv --python=python2.7 $venv_path
. $venv_path/bin/activate
CFLAGS="-I$grpc_install_path/include -std=c89 -Werror" LDFLAGS=-L$grpc_install_path/lib pip install grpcio==0.11.0b0

grpcio 0.11.0b0??? Released nearly one year ago? Please upgrade to grpcio 1.0.0.

In the last year we've made grpcio entirely self-contained, so you shouldn't have to have the gRPC Core installed on your system or built locally or anything like that. You should just be able to "pip install grpcio" and move forward.

I am using ubuntu 14.04. grpc 1.0 ,protobuf 3.0 and pip 1.5.4.

Please upgrade pip to at least 8.0 - there shouldn't be any issue with that since you're working with a virtual environment, right?

Let me know if you need some more info.

After using grpcio 1.0.0 and pip 8.0-or-later, what's the next obstacle you encounter?

Unless you're wanting to try out changes of your own made to gRPC, you shouldn't need the git repository locally available or built or anything like that. What issues are you having with

$ virtualenv venv
$ ./venv/bin/pip install --upgrade pip
<confirm that pip 8.1.2 or later is installed>
$ ./venv/bin/pip install grpcio

?
-Nathaniel

vikash kumar

unread,
Aug 31, 2016, 7:49:58 AM8/31/16
to Nathaniel Manista, grpc.io
Hi,

Here is one query. When i install " grpcio 0.11.0b0" then after completion of installation i got the following pkgs on grpc directory.
Command used : in virtual Environment. < pip install grpcio==0.11.0b0>>


ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd
_adapter/      beta/          early_adopter/ framework/     _links/
ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd framework/
alpha/      base/       common/     core/       crust/      face/       foundation/ interfaces/


But when i install "grpcio 1.0.0"  some of the pkgs are not building. And i am not seeing any error msg as well.
Command used : in virtual environment. < pip install grpcio==0.11.0b0>>


ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd
beta/      _cython/   framework/

ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd framework/
common/     foundation/ interfaces/

Is it correct or something i am missing here ?

Nathaniel Manista

unread,
Aug 31, 2016, 9:03:07 AM8/31/16
to vikash kumar, grpc.io
On Wed, Aug 31, 2016 at 4:49 AM, vikash kumar <kumarvik...@gmail.com> wrote:
Here is one query. When i install " grpcio 0.11.0b0" then after completion of installation i got the following pkgs on grpc directory.
Command used : in virtual Environment. < pip install grpcio==0.11.0b0>>


ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd
_adapter/      beta/          early_adopter/ framework/     _links/
ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd framework/
alpha/      base/       common/     core/       crust/      face/       foundation/ interfaces/


But when i install "grpcio 1.0.0"  some of the pkgs are not building. And i am not seeing any error msg as well.
Command used : in virtual environment. < pip install grpcio==0.11.0b0>>

I'm skeptical that that's the command you used to install 1.0.0.

ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd
beta/      _cython/   framework/

ubuntu@dexter:~<path1>/build/python2.7/lib/python2.7/site-packages/grpc$ cd framework/
common/     foundation/ interfaces/

Is it correct or something i am missing here ?

That's the difference a year (between 0.11.0b0 and 1.0.0) makes - _adapter, early_adopter, and _links are gone, as well as other subpackages under grpc.framework. What was in them wound up not being used along the 1.0.0-and-later code paths.
-Nathaniel

vikash kumar

unread,
Aug 31, 2016, 9:35:02 AM8/31/16
to Nathaniel Manista, grpc.io
Don't be skeptical. i have used this command. "pip install grpcio==1.0.0"

The reason i asked this because with the older version of grpcio. We have used follwing import command.

from grpc.framework.alpha.exceptions import *

But now we are changing to

from grpc.framework.interfaces.face.face import *

But both have different type of error.

Nathaniel Manista

unread,
Aug 31, 2016, 10:23:25 AM8/31/16
to vikash kumar, grpc.io
On Wed, Aug 31, 2016 at 6:35 AM, vikash kumar <kumarvik...@gmail.com> wrote:
Don't be skeptical. i have used this command. "pip install grpcio==1.0.0"

The reason i asked this because with the older version of grpcio. We have used follwing import command.

from grpc.framework.alpha.exceptions import *

But now we are changing to

from grpc.framework.interfaces.face.face import *

Is there some documentation steering you toward using this import?

But both have different type of error.

As of grpc 0.15.0 and later, we recommend making use of the final API with its much shorter names - grpc.RpcError, grpc.insecure_channel, grpc.Server, and so forth.
-Nathaniel
Reply all
Reply to author
Forward
0 new messages