--- ./plugin/group_replication/libmysqlgcs/rpcgen.cmake.ORIGIN	2019-06-25 11:57:56 -0500
+++ ./plugin/group_replication/libmysqlgcs/rpcgen.cmake	2019-06-25 12:00:03 -0500
@@ -94,7 +94,11 @@
         ${XCOM_BASEDIR}/xcom_proto_enum.h
         ${XCOM_BASEDIR}/xcom_limits.h)
   ELSE()
-    FIND_PROGRAM(RPCGEN_EXECUTABLE rpcgen DOC "path to the rpcgen executable")
+    IF(AIX)
+      SET(RPCGEN_EXECUTABLE /opt/freeware/bin/rpcgen)
+    ELSE()
+      FIND_PROGRAM(RPCGEN_EXECUTABLE rpcgen DOC "path to the rpcgen executable")
+    ENDIF()
     MARK_AS_ADVANCED(RPCGEN_EXECUTABLE)
     IF(NOT RPCGEN_EXECUTABLE)
       MESSAGE(FATAL_ERROR "Could not find rpcgen")
@@ -120,10 +124,10 @@
 
        # generate the sources
        COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_h}
-       COMMAND ${RPCGEN_EXECUTABLE}  -C -h -o
+       COMMAND ${RPCGEN_EXECUTABLE} -Y /opt/freeware/bin/ -C -h -o
                     ${x_gen_h} ${x_tmp_x_canonical_name}
        COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_c}
-                COMMAND ${RPCGEN_EXECUTABLE}  -C -c -o
+                COMMAND ${RPCGEN_EXECUTABLE} -Y /opt/freeware/bin/ -C -c -o
                 ${x_gen_c} ${x_tmp_x_canonical_name}
        WORKING_DIRECTORY ${gen_xdr_dir}
        DEPENDS
