Bug #93341 Check for tirpc needs improvement
Submitted: 26 Nov 2018 10:13 Modified: 17 Dec 2018 4:05
Reporter: Terje Røsten Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[26 Nov 2018 10:13] Terje Røsten
cmake code in plugin/group_replication/libmysqlgcs/rpcgen.cmake
does something like:

IF(RPC_INCLUDE_DIR STREQUAL "/usr/include/tirpc")

However, on platform openSUSE Tumbleweed 20181118 and newer tirpc headers are installed as under /usr/include/rpc/ for example:


How to repeat:
Build MySQL in debug type on  openSUSE Tumbleweed 20181118:

$ mkdir debug && cd debug
$ cmake .. -DWITH_DEBUG=1
$ cd plugin/group_replication/libmysqlgcs
$ make -j$(nproc) VERBOSE=1

stop in:

/w/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c: In function 'xdr_proto_sizeof':
/w/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:504:18: error: assignment to 'u_int (*)(struct __rpc_xdr *)' {aka 'unsigned int (*)(struct __rpc_xdr *)'} from incompatible pointer type 'u_int (*)(const XDR *)' {aka 'unsigned int (*)(const struct __rpc_xdr *)'} [-Werror=incompatible-pointer-types]
   ops.x_getpostn = x_getpostn;
cc1: all warnings being treated as errors

Suggested fix:
Look for #define _TIRPC_RPC_H in /usr/include/rpc/rpc.h?
[17 Dec 2018 4:05] Paul DuBois
Posted by developer:
Fixed in 5.7.26, 8.0.15.

The CMake check for tirpc headers now falls back to using pkgconfig,
to enable finding the headers on more Linux platforms. This requires
that pkgconfig be installed.