SOLVED Unable to install grpc via PECL

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
Having problems installing the grpc module. Gettting the following errors...

/root/tmp/pear/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc:279:49: error: no matching function for call to 'StrFormat(const char [30], const string&, grpc_core::GrpcLbClientStats*)'
/root/tmp/pear/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc:279:49: note: mismatched types 'absl::lts_2020_09_23::FormatSpec<Args ...>' and 'const char [30]'
/root/tmp/pear/grpc/third_party/abseil-cpp/absl/strings/str_format.h:338:34: note: template argument deduction/substitution failed:
/root/tmp/pear/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc:527:72: note: mismatched types 'absl::lts_2020_09_23::FormatSpec<Args ...>' and 'const char [20]'
make: *** [src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.lo] Error 1
I've had a dig around and can't find anything obvious. I was hoping someone else may have had this same issue and has resolved it. Many thanks.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,810
893
313
cPanel Access Level
Root Administrator
Hey there! I have run into this one before, and it's an issue with the version of GRPC having a conflict with the GCC libraries on the system. If we check the version of GRPC that will be installed, we'll see this:

Code:
# /opt/cpanel/ea-php72/root/usr/bin/pecl search grpc
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
gRPC    1.35.0 (stable)       A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.
If we check the installation requirements here:


we'll see you need GCC 4.9, which is not available in CentOS 7 at this time:

Code:
[[email protected] ~]# rpm -qa | grep gcc
gcc-c++-4.8.5-44.el7.x86_64
libgcc-4.8.5-44.el7.x86_64
gcc-4.8.5-44.el7.x86_64
I did check a CentOS 8 machine and that would meet the requirements, but you'd need to manually install an earlier version of grpc tools in order to get that working as it is not recommended to try and update the GCC package outside of what CentOS/CloudLinux provides.
 
  • Like
Reactions: 4u123