[CMake] BundleUtilities with MinGW under Windows

NoRulez norulez at me.com
Fri May 20 18:04:18 EDT 2011


So, I've a temporary solution/fix, but I don't know why this problem occurs.

I commented the following lines, see the diff:
BundleUtilities.cmake:
714,718c714,718
<       if(external_prereqs)
<         # Found non-system/somehow-unacceptable prerequisites:
<         set(result 0)
<         set(info ${info} "external prerequisites found:\nf='${f}'\nexternal_prereqs='${external_prereqs}'\n")
<       endif(external_prereqs)
---
>       #if(external_prereqs)
>       #  # Found non-system/somehow-unacceptable prerequisites:
>       #  set(result 0)
>       #  set(info ${info} "external prerequisites found:\nf='${f}'\nexternal_prereqs='${external_prereqs}'\n")
>       #endif(external_prereqs)

After this it works as expected, all files are packed:

QtCore4.dll
QtGui4.dll
QtTest.exe
libgcc_s_dw2-1.dll
mingwm10.dll
Uninstall.exe

The only messages I get, which won't work if the lines aren't commented out are such as the followings:

warning: target 'COMDLG32.DLL' is not absolute...
warning: target 'COMDLG32.DLL' does not exist...
warning: target 'GDI32.dll' is not absolute...
warning: target 'GDI32.dll' does not exist...
warning: target 'IMM32.DLL' is not absolute...
warning: target 'IMM32.DLL' does not exist...
warning: target 'OLEAUT32.DLL' is not absolute...
warning: target 'OLEAUT32.DLL' does not exist...
warning: target 'SHELL32.DLL' is not absolute...
warning: target 'SHELL32.DLL' does not exist...
warning: target 'WINMM.DLL' is not absolute...
warning: target 'WINMM.DLL' does not exist...
warning: target 'KERNEL32.dll' is not absolute...
warning: target 'KERNEL32.dll' does not exist...
CPack Verbose:
warning: cannot resolve item 'KERNEL32.dll'

  possible problems:
    need more directories?
    need to use InstallRequiredSystemLibraries?
    run in install tree instead of build tree?

CPack Verbose: warning: gp_resolved_file_type non-absolute file 'KERNEL32.dll' returning type 'other' -- possibly incorrect
CPack Verbose:
warning: cannot resolve item 'msvcrt.dll'

  possible problems:
    need more directories?
    need to use InstallRequiredSystemLibraries?
    run in install tree instead of build tree?

CPack Verbose: info: non-absolute msvc file 'msvcrt.dll' returning type 'system'
CPack Verbose:
warning: cannot resolve item 'ADVAPI32.DLL'

  possible problems:
    need more directories?
    need to use InstallRequiredSystemLibraries?
    run in install tree instead of build tree?

CPack Verbose: warning: gp_resolved_file_type non-absolute file 'ADVAPI32.DLL' returning type 'other' -- possibly incorrect
CPack Verbose:
warning: cannot resolve item 'COMDLG32.DLL'

  possible problems:
    need more directories?
    need to use InstallRequiredSystemLibraries?
    run in install tree instead of build tree?

CPack Verbose: warning: gp_resolved_file_type non-absolute file 'COMDLG32.DLL' returning type 'other' -- possibly incorrect
CPack Verbose:
warning: cannot resolve item 'GDI32.dll'

  possible problems:
    need more directories?
    need to use InstallRequiredSystemLibraries?
    run in install tree instead of build tree?

CPack Verbose: warning: gp_resolved_file_type non-absolute file 'GDI32.dll' returning type 'other' -- possibly incorrect
.
.
.
.



-----Ursprüngliche Nachricht-----
Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag von NoRulez
Gesendet: Freitag, 20. Mai 2011 22:57
An: 'Clinton Stimpson'; cmake at cmake.org
Betreff: Re: [CMake] BundleUtilities with MinGW under Windows

When I run the command I get the following message, but mingwm10.dll is missing. Instead of mingwm10.dll the file msvcrt.dll is listed:

C:\Repository\Git\TestProject\build>dumpbin /dependents QtTest.exe

C:\Repository\Git\TestProject\build>Microsoft (R) COFF Binary File Dumper Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


Dump of file QtTest.exe

File Type: EXECUTABLE IMAGE

  Image has the following dependencies:

    QtCore4.dll
    QtGui4.dll
    KERNEL32.dll
    msvcrt.dll
    msvcrt.dll
    libgcc_s_dw2-1.dll

  Summary

        1000 .bss
        7000 .data
       18000 .debug_abbrev
        5000 .debug_aranges
       11000 .debug_frame
      1B3000 .debug_info
       28000 .debug_line
       52000 .debug_loc
       23000 .debug_pubnames
       26000 .debug_ranges
       10000 .debug_str
        2000 .idata
       13000 .rdata
       5E000 .text


-----Ursprüngliche Nachricht-----
Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag von Clinton Stimpson
Gesendet: Freitag, 20. Mai 2011 22:49
An: cmake at cmake.org
Betreff: Re: [CMake] BundleUtilities with MinGW under Windows


Hmm... and if you run from a console:
dumpbin /dependents QtTest.exe
what does it give?

Clint

On Friday, May 20, 2011 02:37:51 pm NoRulez wrote:
> OK, after reading the verbose message I found a path „error“
> („QtTest-0.1.1-win32/./QtTest.exe” should be
> “QtTest-0.1.1-win32/bin/QtTest.exe”) after change this path in
> “INSTALL(TARGETS QtTest...” it seems to work, but in the package there are
> only the following files:
> 
> 
> 
> .) QtTest.exe
> 
> .) Uninstall.exe
> 
> 
> 
> After enabling the verbose mode once more, here is the current message but
> I couldn’t figure out why it doesn’t add the required *.dll’s to the
> package:
> 
> 
> 
> CPack: Enable Verbose
> 
> CPack Verbose: Read CPack config file:
> 
> CPack Verbose: Read CPack configuration file:
> C:/Repository/Git/TestProject/build/CPackConfig.cmake
> 
> CPack Verbose: Specified generator: NSIS
> 
> CPack Verbose: Test NSIS version: "C:/Program Files
> (x86)/NSIS/makensis.exe" /VERSION
> 
> CPack Verbose: Use generator: cmCPackNSISGenerator
> 
> CPack Verbose: For project: QtTest
> 
> CPack: Create package using NSIS
> 
> CPack Verbose: Read description file: C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Templates/CPack.GenericDescription.txt
> 
> CPack Verbose: Remove toplevel directory:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS
> 
> CPack: Install projects
> 
> CPack: - Run preinstall target for: QtTest
> 
> CPack: - Install project: QtTest
> 
> CPack Verbose: Install configuration: ""
> 
> CPack Verbose: Installing:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1.
> 1-win32/bin/QtTest.exe
> 
> CPack Verbose: fixup_bundle
> 
> CPack Verbose:  
> app='C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest
> -0.1.1-win32/bin/QtTest.exe'
> 
> CPack Verbose:   libs=''
> 
> CPack Verbose:   dirs='C:/Qt/2010.05/qt/lib'
> 
> CPack Verbose: fixup_bundle: preparing...
> 
> CPack Verbose: fixup_bundle: copying...
> 
> CPack Verbose: 1/2: *NOT* copying
> 'C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1
> .1-win32/bin/QtTest.exe'
> 
> CPack Verbose: fixup_bundle: fixing...
> 
> CPack Verbose: 2/2: fix-up not required on this platform
> 'C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1
> .1-win32/bin/QtTest
> 
> .exe'
> 
> CPack Verbose: fixup_bundle: cleaning up...
> 
> CPack Verbose: fixup_bundle: verifying...
> 
> CPack Verbose:
> ==========================================================================
> =
> 
> CPack Verbose: Analyzing
> app='C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest
> -0.1.1-win32/bin/QtTest.exe'
> 
> CPack Verbose:
> bundle='C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtT
> est-0.1.1-win32/bin'
> 
> CPack Verbose:
> executable='C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS
> /QtTest-0.1.1-win32/bin/QtTest.exe'
> 
> CPack Verbose: valid='1'
> 
> CPack Verbose: executable file 1:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1.
> 1-win32/bin/QtTest.exe
> 
> CPack Verbose: verified='1'
> 
> CPack Verbose: info='Verified 1 executable files in
> 'C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1
> .1-win32/bin''
> 
> CPack Verbose:
> 
> CPack Verbose: verified='1'
> 
> CPack Verbose: info=''
> 
> CPack Verbose:
> 
> CPack Verbose: fixup_bundle: done
> 
> CPack: Create package
> 
> CPack Verbose: Package files to:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1.
> 1-win32.exe
> 
> CPack Verbose: Configure file: C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/NSIS.template.in to
> C:/Repository/Git/TestProject/build/_CPack
> 
> _Packages/win32/NSIS/project.nsi
> 
> CPack Verbose: Execute: "C:/Program Files (x86)/NSIS/makensis.exe"
> "C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/project.ns
> i"
> 
> CPack Verbose: Copying final package(s) [1]:
> 
> CPack: - package:
> C:/Repository/Git/TestProject/build/QtTest-0.1.1-win32.exe generated.
> 
> 
> 
> Best Regards
> 
> 
> 
> 
> 
> Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag
> von NoRulez Gesendet: Freitag, 20. Mai 2011 21:52
> An: clinton at elemtech.com; cmake at cmake.org
> Betreff: Re: [CMake] BundleUtilities with MinGW under Windows
> 
> 
> 
> OK thanks, here is the verbose output:
> 
> 
> 
> C:\Repository\Git\TestProject\build>cpack -V -G NSIS
> 
> CPack: Enable Verbose
> 
> CPack Verbose: Read CPack config file:
> 
> CPack Verbose: Read CPack configuration file:
> C:/Repository/Git/TestProject/build/CPackConfig.cmake
> 
> CPack Verbose: Specified generator: NSIS
> 
> CPack Verbose: Test NSIS version: "C:/Program Files
> (x86)/NSIS/makensis.exe" /VERSION
> 
> CPack Verbose: Use generator: cmCPackNSISGenerator
> 
> CPack Verbose: For project: QtTest
> 
> CPack: Create package using NSIS
> 
> CPack Verbose: Read description file: C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Templates/CPack.GenericDescription.txt
> 
> CPack Verbose: Remove toplevel directory:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS
> 
> CPack: Install projects
> 
> CPack: - Run preinstall target for: QtTest
> 
> CPack: - Install project: QtTest
> 
> CPack Verbose: Install configuration: ""
> 
> CPack Verbose: Installing:
> C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest-0.1.
> 1-win32/./QtTest.exe
> 
> CPack Verbose: fixup_bundle
> 
> CPack Verbose:  
> app='C:/Repository/Git/TestProject/build/_CPack_Packages/win32/NSIS/QtTest
> -0.1.1-win32/bin/QtTest.exe'
> 
> CPack Verbose:   libs=''
> 
> CPack Verbose:   dirs='C:/Qt/2010.05/qt/lib'
> 
> CPack Verbose: warning: *NOT* handled - directory/file does not exist...
> 
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/BundleUtilities.cmake:657 (message):
> 
>   error: fixup_bundle: not a valid bundle
> 
> Call Stack (most recent call first):
> 
>   C:/Repository/Git/TestProject/build/cmake_install.cmake:45 (fixup_bundle)
> 
> 
> 
> 
> 
> CPack Verbose: fixup_bundle: done
> 
> CPack Error: Error when generating package: QtTest
> 
> 
> 
> 
> 
> Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag
> von clinton at elemtech.com Gesendet: Freitag, 20. Mai 2011 21:46
> An: cmake at cmake.org
> Betreff: Re: [CMake] BundleUtilities with MinGW under Windows
> 
> 
> 
> Ah,  ok.  You can see related warnings if you run cpack with -V option to
> make it verbose.
> 
> Clint
> 
> ----- Reply message -----
> From: "NoRulez" <norulez at me.com>
> Date: Fri, May 20, 2011 1:40 pm
> Subject: AW: [CMake] BundleUtilities with MinGW under Windows
> To: "'Clinton Stimpson'" <clinton at elemtech.com>
> Cc: "'CMake MailingList'" <cmake at cmake.org>
> 
> 
> For the QtTest example I get the following error:
> 
> CPack: Create package using NSIS
> CPack: Install projects
> CPack: - Run preinstall target for: QtTest
> CPack: - Install project: QtTest
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/BundleUtilities.cmake:657 (message): error:
> fixup_bundle: not a valid bundle
> Call Stack (most recent call first):
>  C:/Repository/Git/TestProject/build/cmake_install.cmake:45 (fixup_bundle)
> 
> 
> CPack Error: Error when generating package: QtTest
> 
> -----Ursprüngliche Nachricht-----
> Von: Clinton Stimpson [mailto:clinton at elemtech.com]
> Gesendet: Freitag, 20. Mai 2011 18:47
> An: NoRulez
> Cc: CMake MailingList
> Betreff: Re: [CMake] BundleUtilities with MinGW under Windows
> 
> 
> The term bundle is used loosely here.  The error message hopefully tell you
> why it isn't valid, or you could give us the complete error message you are
> getting.
> 
> Clint
> 
> On Friday, May 20, 2011 10:29:16 am NoRulez wrote:
> > I get the message that the generated file (e.g Project.exe on Windows)
> > isn't a valid Bundle, which is correct because bundle files exists only
> > on Mac.
> > 
> > Am 19.05.2011 um 16:39 schrieb <clinton at elemtech.com>:
> > > And what error messages are you getting?
> > > 
> > > Clint
> > > 
> > > ----- Original Message -----
> > > 
> > >> Sorry for the missing information.
> > >> I use CMake 2.8.4 and have also Visual Studio 2008 installed.
> > >> 
> > >> 
> > >> Best Regards
> > >> 
> > >> Am 19.05.2011 um 05:52 schrieb "Clinton Stimpson" <
> > >> clinton at elemtech.com >:
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> What version of cmake?  I don't think that QtTest example worked until
> > >> CMake 2.8.3.
> > >> 
> > >> 
> > >> And you have dumpbin available on Windows from a Visual Studio
> > >> installation?
> > >> It might be nice to add support for mingw's objdump tool to find
> > >> dependent dlls.
> > >> 
> > >> 
> > >> Clint
> > >> 
> > >> 
> > >> On May 14, 2011, at 7:48 AM, NoRulez wrote:
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> Hi @all,
> > >> 
> > >> does anyone get BundleUtilities working on Windows and could give me
> > >> help?
> > >> I tried BundleUtilities under Windows, but the Qt dll’s (such as
> > >> QtGui4.dll, …) and the MinGW dll’s (mingwm10.dll and
> > >> libgcc_s_dw2-1.dll) are not packaged.
> > >> 
> > >> I also tried the following, but same problem here:
> > >> http://www.vtk.org/Wiki/images/2/25/QtTest-Package-Example.zip
> > >> 
> > >> The following example does also not work on linux
> > >> 
> > >> Much thanks in advance
> > >> 
> > >> Best Regards
> > >> NoRulez
> > >> 
> > >>  _______________________________________________
> > >> 
> > >> 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://www.cmake.org/mailman/listinfo/cmake
> > >> 
> > >> 
> > >> 
> > >> _______________________________________________
> > >> 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://www.cmake.org/mailman/listinfo/cmake
> > > 
> > > _______________________________________________
> > > 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://www.cmake.org/mailman/listinfo/cmake

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list