Skip to content

Commit e4924f3

Browse files
weigonbjornmu
authored andcommitted
Bug#28730189 wrong rpath for router on solaris
On solaris absolute, hardcoded rpaths were used. As the location of the libraries changed from /opt/mysql/mysql-router to /opt/mysql/mysql libraries weren't found at startup. Instead of using absolute paths, relative rpaths are used by using $ORIGIN on Solaris too.
1 parent 0431fef commit e4924f3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

router/cmake/set_rpath.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ENDIF()
8282

8383
SET(CMAKE_INSTALL_RPATH)
8484
IF(INSTALL_LAYOUT STREQUAL "STANDALONE" OR INSTALL_LAYOUT STREQUAL "DEFAULT" OR
85-
INSTALL_LAYOUT STREQUAL "WIN")
85+
INSTALL_LAYOUT STREQUAL "WIN" OR INSTALL_LAYOUT STREQUAL "SVR4")
8686
# rpath for lib/mysqlrouter/ plugins that want to find lib/
8787
SET(RPATH_PLUGIN_TO_LIB "${RPATH_ORIGIN}/../")
8888
SET(RPATH_PLUGIN_TO_PLUGIN "${RPATH_ORIGIN}/")
@@ -92,11 +92,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE" OR INSTALL_LAYOUT STREQUAL "DEFAULT" OR
9292
SET(RPATH_BINARY_TO_LIB "${RPATH_ORIGIN}/../${ROUTER_INSTALL_LIBDIR}/")
9393

9494
ELSE()
95-
IF(INSTALL_LAYOUT STREQUAL "SVR4")
96-
SET(_dest_dir "/opt/mysql/mysql-router/")
97-
ELSE()
98-
SET(_dest_dir "${CMAKE_INSTALL_PREFIX}")
99-
ENDIF()
95+
SET(_dest_dir "${CMAKE_INSTALL_PREFIX}")
10096
# rpath for lib/mysqlrouter/ plugins that want to find lib/
10197
SET(RPATH_PLUGIN_TO_LIB "${_dest_dir}/${ROUTER_INSTALL_LIBDIR}")
10298
SET(RPATH_PLUGIN_TO_PLUGIN "${_dest_dir}/${ROUTER_INSTALL_PLUGINDIR}")

0 commit comments

Comments
 (0)