[cmake-developers] [CMake 0015047]: BundleUtilities' fixup_bundle does not check to see if two libs are the same up to symlinks
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jul 30 13:30:38 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15047
======================================================================
Reported By: Jordi Gutiérrez Hermoso
Assigned To:
======================================================================
Project: CMake
Issue ID: 15047
Category: Modules
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-07-30 13:30 EDT
Last Modified: 2014-07-30 13:30 EDT
======================================================================
Summary: BundleUtilities' fixup_bundle does not check to see
if two libs are the same up to symlinks
Description:
I'm using cmake's BundleUtilities to create an app bundle. I am using
homebrew's wxmac package to create an application of my own.
With wxmac, my binary links (amongst other things) to
/usr/local/lib/libwx_baseu-3.0.dylib
/usr/local/lib/libwx_osx_cocoau_core-3.0.dylib
But /usr/local/lib/libwx_osx_cocoau_core-3.0.dylib itself also links
to libwx_baseu-3.0.dylib, but not to the symlink in /usr/local/lib but
to the original in /usr/local/Cellar which actually has a longer but
compatible version name: libwx_baseu-3.0.0.1.0.dylib (note the extra
dots in the version number). Of course, the 3.0.0.1.0 library is the
same as the 3.0 library, as the latter is jus a symlink to the former.
Thus BundleUtilities thinks that there is a dependency of a dependency
and copies the libwx_baseu library twice, once for 3.0 and again for
3.0.0.1.0 and sets the path twice in my binary.
This creates a segfaulty executable. :-(
Steps to Reproduce:
It's a bit complicated to easily reproduce this. Basically, use fixup_bundle,
create a library that links both to foo.dylib and bar.dylib, and make sure that
bar.dylib is a symlink to baz.dylib and that foo.dylib itself links to baz.
In ASCII art:
binary
| \
| \
foo bar ..... baz
| |
\_________________/
where the dots indicate a filesystem symlink and the solid lines indicate
dynamic library linking.
Additional Information:
(aside: homebrew sets up symlinks in /usr/local/lib that point to the
actual wxmac libraries in /usr/local/Cellar/wxmac/3.0.1, similar to
how most GNU/Linux systems handle /usr/lib and /usr/local/lib )
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-30 13:30 Jordi Gutiérrez HermosoNew Issue
======================================================================
More information about the cmake-developers
mailing list