[cmake-developers] fix-OSX-bundle-rpaths-and-Qt5 topic

Brad King brad.king at kitware.com
Thu Oct 9 09:24:10 EDT 2014


Adam,

On 10/08/2014 12:17 PM, Clinton Stimpson wrote:
> Yeah.  I'm curious if changes to BundleUtilities.cmake in fix-OSX-bundle-
> rpaths-and-Qt5 will gracefully handle the BundleUtilities test case with 
> @rpath on OS X 10.5.  Perhaps it'll recognize there is no need to change 
> rpaths.

The BundleUtilities test still fails on OS X 10.5:

 http://open.cdash.org/testDetails.php?test=285651145&build=3522021
 -- 6/10: fixing up '/.../Tests/BundleUtilities/testdir1/testbundleutils1.app/Contents/MacOS/testbundleutils1'
 install_name_tool: more than one input file specified (/.../Tests/BundleUtilities/testdir1 and -delete_rpath)
 Usage: install_name_tool [-change old new] ... [-id name] input

Clinton's changes in his rpath-osx-10_6 extension topic to yours teach
other uses of -delete_rpath to warn on OS X 10.5 and skip deletion.
I think something similar will be needed here.  Please investigate.

Meanwhile, on my local OS X 10.9 machine I added this patch:

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index eedab44..80e5d3b 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -755,6 +755,7 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
   #
   if(changes)
     execute_process(COMMAND install_name_tool ${changes} "${resolved_embedded_item}")
+    message(STATUS "CHANGE install_name_tool ${changes} \"${resolved_embedded_item}\"")
   endif()
 endfunction()

>From the test output I can see that it is trying to delete several
rpath entries that do not exist and therefore do not need deletion.
How is the list chosen for each binary?

-Brad




More information about the cmake-developers mailing list