MantisBT - CMake
View Issue Details
0013833CMakeCMakepublic2013-01-04 01:042016-06-10 14:31
Matt Arsenault 
Kitware Robot 
normalminoralways
closedmoved 
CMake 2.8.9 
 
0013833: fixup_bundle fails with libraries that aren't writable
I'm having the same problem described here with 2.8.9, so this looks like a regression: http://www.cmake.org/Bug/view.php?id=9284 [^]

-- 26/34: fixing up 'install_prefix/example.app/Contents/MacOS/libcrypto.1.0.0.dylib'
install_name_tool: can't open input file: install_prefix/example.app/Contents/MacOS/libcrypto.1.0.0.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 0 in file: install_prefix/example.app/Contents/MacOS/libcrypto.1.0.0.dylib for writing (Bad file descriptor)
install_name_tool: can't write new headers in file: install_prefix/example.app/Contents/MacOS/libcrypto.1.0.0.dylib (Bad file descriptor)
install_name_tool: can't close written on input file: install_prefix/example.app/Contents/MacOS/libcrypto.1.0.0.dylib (Bad file descriptor)


$ ls -l /opt/local/lib/libcrypto.1.0.0.dylib
-r-xr-xr-x 1 root admin 1.6M Jul 27 04:40 /opt/local/lib/libcrypto.1.0.0.dylib
1. Try to use fixup_bundle with a library dependency that isn't writable, e.g. libcrypto and libssl from macports.

2. It fails with a permission error
No tags attached.
log ctest-bundle-utilities.log (6,055) 2015-04-28 01:51
https://public.kitware.com/Bug/file/5441/ctest-bundle-utilities.log
Issue History
2013-01-04 01:04Matt ArsenaultNew Issue
2013-01-04 06:57David ColeNote Added: 0031972
2013-01-12 03:02Matt ArsenaultNote Added: 0032098
2015-04-28 01:51宋文武Note Added: 0038625
2015-04-28 01:51宋文武File Added: ctest-bundle-utilities.log
2015-04-28 01:53宋文武Note Edited: 0038625bug_revision_view_page.php?bugnote_id=38625#r1773
2016-06-10 14:28Kitware RobotNote Added: 0042192
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0031972)
David Cole   
2013-01-04 06:57   
The fix for 0009284 was to add *optionally* enabled chmod of copied libraries (but still no chmod by default)...

The fix noted in 0009284 was to add a BU_CHMOD_BUNDLE_ITEMS variable, which if set before including BundleUtilities, adds the chmod calls.

Do you set that variable before including BundleUtilities?

Something like this:

  set(BU_CHMOD_BUNDLE_ITEMS ON)
(0032098)
Matt Arsenault   
2013-01-12 03:02   
I didn't see that as part of the fix, so no
(0038625)
宋文武   
2015-04-28 01:51   
(edited on: 2015-04-28 01:53)
Hi, even with BU_CHMOD_BUNDLE_ITEMS=ON,
the fixup_bundle may still fail when 'RPATH_REMOVE' in copying' phase.

It's the reason for BundleUtilies test failure I met.

log attached as ctest-bundle-utilities.log

(0042192)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.