Compilation Qt 4.8.4 on Windows x64 without zlib

  • Hello!

    I have to compile Qt 4.8.4 on Windows x64 without qt-zlib, because of another library, that is also using zlib inside.
    I am using Visual Studio 2010, x64 command prompt

    I used following configuration:
    @configure.exe -opensource -platform win32-msvc2010 -no-qt3support -debug-and-release -system-zlib -nomake examples -nomake demos@

    Then, I compiled it using "this tutorial":, so I used this command:
    @..\jom\jom.exe -j 8@

    As system zlib, I had to compile "this source": - Source code for ZLib 1.2.7 with mods for Windows x86 and x86-64 support

    Unfortunately, compilation is stucked. It was compiling at least 7 hours, but last notable change was after 3,5 hours after starting, and now, for more than 3 hours is command prompt at one place, see image below

    I tried it twice, on the empty source 'qt-4.8.4-everywhere'. First time it was compiled with this configuration, and it was working well (Except link error because of zlib library inside Qt and another Library, that cannot be compiled)
    @configure.exe -opensource -platform win32-msvc2010 -no-qt3support -debug-and-release@

    Does anybody know what could fix this problem, or why it is happening?
    Thank you for your answer and help!

  • Moderators

    Try building with nmake. Jom can jam in some cases.

    With 8 threads, it should take about 30 minutes, not 7 hours.

    Quoting from Qt5 build guide:
    [quote]Multicore building: To speed up building when using nmake, the compiler can be instructed to use all available CPU cores in one of the following ways:

    Pass the option -MP to Qt’s configure
    Set the environment variable CL (specifying Visual Studio compiler options) to /MP (On the command line: set CL=/MP)
    Use the tool jom [] instead of nmake. Note however, that it has issues with module interdependencies, which can cause builds to fail.[/quote]

  • Thank you! I used -mp flag, but after few hourse it was also stuck, but now, at another process
    @ c:\Qt\4.8.4x64\bin\uic.exe mainwindow.ui -o ui_mainwindow.h@

    Therefore, i just reconfigure without flag -mp, and run it with nmake.

    After 5 hours, it was stucked at the same place. I just cancel the process, and simply re-run nmake.
    Unfortunately, following fatal-error comes:
    @c:\qt\4.8.4x64\tools\activeqt\testcon\ui_mainwindow.h(359) : fatal error C1070:
    mismatched #if/#endif pair in file 'c:\qt\4.8.4x64\tools\activeqt\testcon\ui_mai

    I tried delete this file (ui_mainwindow.h) and run nmake again, but it also stucked at this moment.
    My actual configuration for building is just
    @configure.exe -opensource -platform win32-msvc2010 -no-qt3support -debug-and-release -system-zlib@

    Before, I was building without flag '-system-zlib', that means, '-qt-zlib' was default value, and everything was successful.

    Is there something wrong with flag -system-zlib? Is this activeqt - testcon needed? How can I make it not to be build?
    Thank you for your help!

  • Now I found "the stuck problem". There is some unexplained (and I do not have time to debug it line-by-line), but "uic.exe" generated with configuration mentioned above (-system-zlib), is not working properly with file tools/activeqt/testcon/mainwindow.ui, while the 'original' (32bit Qt 4.8.4 official binary) uic.exe is working well. I was trying to recompile uic.exe (just distclean & nmake), but it is always stuck.

    After creating ui_mainwindow.h with 32bit uic.exe, compilation continues well, for now.

    I think, I will create bug report for this...

  • Moderators

    Yes, this is likely a bug. You can report it "here":

  • I already did it "here":
    I hope, it will be fixed, or a solution will be found

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.