The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=14707 ====================================================================== Reported By: Francis Chan Assigned To: ====================================================================== Project: CMake Issue ID: 14707 Category: CMake Reproducibility: always Severity: block Priority: normal Status: new ====================================================================== Date Submitted: 2014-01-17 15:40 EST Last Modified: 2014-01-17 15:40 EST ====================================================================== Summary: Install target command corrupts binary during RPATH modification Description: Binary is compiled with OSX Platform 2.7 CMakelist does not set MACOSX_RPATH property Cmakelist does not make use of the @RPATH (unless set by default in 2.8.12.1) Binary is installed using INSTALL( TARGET RUNTIME DESTINATION ... ). CMake 2.8.11 does not corrupt binary. If corruption occurs on a binary, the corruption will always happen for that given binary. May be related to how cmake determines what paths to strip and what are the dependencies of the binary. Some artifacts will install correctly.
Steps to Reproduce: Very hard to reproduce since we don't know what cmake does during install or what specifically in the dependencies or binary which causes the install to go awry. We tried to replicate the install_name_tool commands used but they do not corrupt the binary. We are assuming something else is being done during install but not sure how to get more information on what exactly the install command does (besides run the install_name_tool for RPATH strip). Additional Information: Logs during installation shows install_name_tool reporting corruption: [exec] -- Installing: <DELETED_APPLICATION_NAME> [exec] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: <DELETED_PATH> found in: <DELETED_APPLICATION_NAME> (for architecture i386), required for specified option "-delete_rpath <DELETED_PATH>" [exec] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: object: <DELETED_APPLICATION_NAME> malformed object (load command 52 cmdsize is zero) Binary that gets corrupted has the following dependency list: /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 395.11.0) /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.25.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) Binary that passes install has the following dependency list: /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 395.11.0) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-01-17 15:40 Francis Chan New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers