[MXS-2366] Wrong tarball RPATH Created: 2019-03-06  Updated: 2020-08-25  Resolved: 2019-05-03

Status: Closed
Project: MariaDB MaxScale
Component/s: Packaging
Affects Version/s: 2.2.19, 2.3.4
Fix Version/s: 2.2.21, 2.3.7

Type: Bug Priority: Major
Reporter: markus makela Assignee: Timofey Turenko
Resolution: Fixed Votes: 1
Labels: None

Sprint: MXS-SPRINT-81

 Description   

The RPATH in the tarballs should have a relative path to the libmaxscale-common.so library but instead it has the default RPATH.



 Comments   
Comment by markus makela [ 2019-03-06 ]

This seems to at least partially fix it in 2.2:

diff --git a/cmake/package_tgz.cmake b/cmake/package_tgz.cmake
index cd30b7ce2..c18e40321 100644
--- a/cmake/package_tgz.cmake
+++ b/cmake/package_tgz.cmake
@@ -1,6 +1,6 @@
 # Tarball package configuration
 message(STATUS "Generating tar.gz packages")
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 set(MAXSCALE_BINDIR /bin CACHE PATH "" FORCE)
 set(MAXSCALE_LIBDIR /lib/maxscale CACHE PATH "" FORCE)
 set(MAXSCALE_SHAREDIR /share CACHE PATH "" FORCE)

With this change the RPATH looks like this:

  RPATH                $ORIGIN/../lib/maxscale:///lib/maxscale

Comment by Timofey Turenko [ 2019-04-29 ]

package_tgz.cmake is called after generation of binaries. So, all RPATH settings do not have any effect. Fix is prepared.

Comment by markus makela [ 2019-04-30 ]

Fix looks OK to ship, only a few minor details to change.

Comment by Timofey Turenko [ 2019-05-03 ]

pushed to 2.2, merged to 2.3 and develop

Generated at Thu Feb 08 04:13:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.