Bug 1952139

Summary: Fails to build with grpc version 1.37.0, coming soon in Fedora 35
Product: [Fedora] Fedora Reporter: Ben Beasley <code>
Component: perl-grpc-xsAssignee: Petr Pisar <ppisar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: perl-maint, ppisar, renault
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-grpc-xs-0.34-3.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-22 11:27:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1794566    

Description Ben Beasley 2021-04-21 15:16:52 UTC
Description of problem:

I am working on an update to grpc 1.37.0 in https://src.fedoraproject.org/fork/music/rpms/grpc and https://copr.fedorainfracloud.org/coprs/music/grpc-1.37. I found that perl-grpc-xs fails to build with this version of grpc.

Version-Release number of selected component (if applicable): 0.34-2

How reproducible:

Build using the COPR.

Actual results:

> ./ext/call_credentials.xs: In function 'XS_Grpc__XS__CallCredentials_createFromPlugin':
> ./ext/call_credentials.xs:23:73: error: incompatible type for argument 2 of 'grpc_metadata_credentials_create_from_plugin'
>    23 |     ctx->wrapped = grpc_metadata_credentials_create_from_plugin(plugin, NULL);
>       |                                                                         ^~~~
>       |                                                                         |
>       |                                                                         void *
> In file included from util.h:10,
>                  from Grpc.xs:7:
> /usr/include/grpc/grpc_security.h:479:25: note: expected 'grpc_security_level' but argument is of type 'void *'
>   479 |     grpc_security_level min_security_level, void* reserved);
>       |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
> ./ext/call_credentials.xs:23:20: error: too few arguments to function 'grpc_metadata_credentials_create_from_plugin'
>    23 |     ctx->wrapped = grpc_metadata_credentials_create_from_plugin(plugin, NULL);
>       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from util.h:10,
>                  from Grpc.xs:7:
> /usr/include/grpc/grpc_security.h:477:32: note: declared here
>   477 | GRPCAPI grpc_call_credentials* grpc_metadata_credentials_create_from_plugin(
>       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected results:

Successful build.

Additional info:

I reported this upstream at https://rt.cpan.org/Ticket/Display.html?id=135258.

I’m not suggesting a patch because it’s not obvious to me that any particular hard-coded security level would be correct. I am happy to help test proposed patches.

I am willing to delay the grpc update a few weeks while awaiting a resolution to this issue.

I will, however, need to update grpc in the next couple of months or so. If for no other reason, the update is required for Python 3.10 compatibility. If there is no resolution by then, perl-grpc-xs will become FTBFS and FTI.

Comment 1 Petr Pisar 2021-04-22 09:57:39 UTC
Thanks for the report. I will look at it.

Comment 2 Petr Pisar 2021-04-22 11:27:52 UTC
I applied a straightforward patch to use a reasonable default value for the new arguments. This should enable you to upgrade grpc.

Comment 3 Ben Beasley 2021-04-22 12:33:47 UTC
Thanks; that was fast! I verified it works in COPR, so I will start the grpc 1.37 side tag soon.