[CMake] BundleUtilities not working
Bill Somerville
bill at classdesign.com
Tue Jul 28 08:59:25 EDT 2015
Hi,
I am suffering issues with BundleUtilities fixup_bundle() when used on
Windows with MinGW. The issue is because the underlying GetPrerequisites
module uses the MS dumpbin.exe utility to find dependent libraries of
executables. This is a problem because it crashes on many libraries and
executables from later MinGW tools, for example the GNU Fortran library
libgfortran-3.dll. I believe the crash is due to the DLL having no symbols.
The problem is exacerbated by GetPrequisites having very little error
checking so it silently fails and doesn't install the dependent libraries.
GetPrerequisites can use objdump if dumpbin is not available but this
has another issue. The output from 'objdump -p <executable>' can be very
long, over 10000+ lines for a large Qt library for example, and this
causes GetPrerequsites to run exceedingly slowly as it uses
execute_process() to capture the output into a CMake variable then
parses it with string(REGEX REPLACE ...) and a loop doing an if(...
MATCHES <regexp>) on every line.
So I have a choice of broken or too slow for practical use :(
Is BundleUtilities.cmake and GetPrerequisites.cmake maintained, if so
who by? I can suggest a few improvements, the main one being to filter
the command output used to get prerequisites in a pipeline
(execute_command() with multiple commands using grep) and better error
checking. Also perhaps dumpbin should only be used if objdump is not
available.
Regards
Bill Somerville.
More information about the CMake
mailing list