Bug #89776 | Sun RPC Interfaces Removed From glibc; FTBFS: rpc/rpc.h not found | ||
---|---|---|---|
Submitted: | 22 Feb 2018 18:59 | Modified: | 10 Mar 2018 23:10 |
Reporter: | Michal Schorm | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.4 | OS: | Fedora (>=28) |
Assigned to: | CPU Architecture: | Any | |
Tags: | libtirpc, rpc, rpcgen |
[22 Feb 2018 18:59]
Michal Schorm
[26 Feb 2018 9:58]
Terje Røsten
This is dup of https://bugs.mysql.com/bug.php?id=89168 and is fixed upstream. Try this patch on top of 8.0.4: diff --git a/rapid/plugin/group_replication/CMakeLists.txt b/rapid/plugin/group_replication/CMakeLists.txt index 5bcaa8b0edd..bce9de48c25 100644 --- a/rapid/plugin/group_replication/CMakeLists.txt +++ b/rapid/plugin/group_replication/CMakeLists.txt @@ -218,6 +218,7 @@ MYSQL_ADD_PLUGIN(group_replication LINK_LIBRARIES ${LZ4_LIBRARY} ${SSL_LIBRARIES} + ${TIRPC_LIBRARY} MODULE_ONLY MODULE_OUTPUT_NAME "group_replication") ### INSTALLATION ### diff --git a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c b/rapid/plugin/group_replication/libmysqlgcs/src/b$ index 245dda0b9b2..210e12497d9 100644 --- a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c +++ b/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c @@ -417,7 +417,11 @@ x_putbytes (XDR *xdrs, const char *bp MY_ATTRIBUTE((unused)), u_int len) static u_int +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(HAVE_TIRPC) +x_getpostn(XDR *xdrs) +#else x_getpostn (const XDR *xdrs) +#endif { #ifdef OLD_XDR return (u_int)(xdrs->x_handy); diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake index f4569cd6214..cccb1c381f8 100644 --- a/rapid/plugin/group_replication/rpcgen.cmake +++ b/rapid/plugin/group_replication/rpcgen.cmake @@ -93,6 +93,24 @@ FOREACH(X xcom_vp) MESSAGE(FATAL_ERROR "Could not find rpcgen") ENDIF() + # First look for tirpc, then the old Sun RPC + FIND_PATH(RPC_INCLUDE_DIR + NAMES rpc/rpc.h + HINTS /usr/include/tirpc + NO_DEFAULT_PATH + ) + FIND_PATH(RPC_INCLUDE_DIR NAMES rpc/rpc.h) + IF(NOT RPC_INCLUDE_DIR) + MESSAGE(FATAL_ERROR + "Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc") + ENDIF() + MESSAGE(STATUS "RPC_INCLUDE_DIR ${RPC_INCLUDE_DIR}") + IF(RPC_INCLUDE_DIR STREQUAL "/usr/include/tirpc") + INCLUDE_DIRECTORIES(SYSTEM /usr/include/tirpc) + ADD_DEFINITIONS(-DHAVE_TIRPC) + SET(TIRPC_LIBRARY tirpc) + ENDIF() + # on unix systems try to generate them if needed ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h} COMMAND ${CMAKE_COMMAND} -E copy_if_different
[5 Mar 2018 18:11]
Terje Røsten
MySQL 8.0.4 TIRPC patch
Attachment: mysql-8.0.4-tirpc.patch (text/x-patch), 4.66 KiB.
[10 Mar 2018 23:10]
Michal Schorm
Thanks for the patch! Works well. First successful build against Fedora 28 and Rawhide done. -- Can be closed from my POV. Thanks for the help.