Skip to content

Commit

Permalink
Bug#28730189 wrong rpath for router on solaris
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weigon authored and bjornmu committed Oct 7, 2018
1 parent 0431fef commit e4924f3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions router/cmake/set_rpath.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ENDIF()

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

ELSE()
IF(INSTALL_LAYOUT STREQUAL "SVR4")
SET(_dest_dir "/opt/mysql/mysql-router/")
ELSE()
SET(_dest_dir "${CMAKE_INSTALL_PREFIX}")
ENDIF()
SET(_dest_dir "${CMAKE_INSTALL_PREFIX}")
# rpath for lib/mysqlrouter/ plugins that want to find lib/
SET(RPATH_PLUGIN_TO_LIB "${_dest_dir}/${ROUTER_INSTALL_LIBDIR}")
SET(RPATH_PLUGIN_TO_PLUGIN "${_dest_dir}/${ROUTER_INSTALL_PLUGINDIR}")
Expand Down

0 comments on commit e4924f3

Please sign in to comment.