Unable to build static Qt



  • Hi. Around a month ago, I was able to build a static version of Qt on my Windows 10 64-bit machine. Since then, I wiped my drive and reinstalled my operating system, so I lost my previous Qt installations. Therefore, earlier today, I attempted to build a static version of Qt again (5.12.2), but now I am encountering issues during the build process that did not occur beforehand. As far as I can tell, nothing has changed about my PC since the last time, besides reinstalling my OS.

    I open the x64 native commands tools for VS2017 and configure Qt with "configure -release -static -prefix "c:/qt/static" -nomake tools -nomake tests -nomake examples -skip webengine". This is the exact same configuration as I used the previous time when I was able to successfully build. Then, during the build process with jom, I receive the following errors:

    Generating Code...
    lib /NOLOGO /OUT:c:\qt\static\lib\Qt5Bootstrap.lib @C:\Users\Sam\AppData\Local\Temp\Qt5Bootstrap.lib.5000.107750.jom
    jom: C:\Qt\Static\qtbase\Makefile [sub-src-make_first] Error 2
    jom: C:\Qt\Static\Makefile [module-qtbase-make_first] Error 2

    I have also tried building with nmake instead of jom, but it also fails with a similar error.

    Any help on fixing this issue would be appreciated.


  • Qt Champions 2018

    @psyfl This doesn't look like actual error. There should be something above these lines in the build log.



  • @jsulm said in Unable to build static Qt:

    @psyfl This doesn't look like actual error. There should be something above these lines in the build log.

    No, these are the only errors in the build log. When I try to build with nmake instead of jom, then these are the errors I get:

    Generating Code...
    lib /NOLOGO /OUT:c:\qt\static\lib\Qt5Bootstrap.lib @C:\Users\Sam\AppData\Local\Temp\nm4E9D.tmp
    cd tools\moc\ && ( if not exist Makefile c:\Qt\Static\qtbase\bin\qmake.exe -o Makefile C:\Qt\Static\qtbase\src\tools\moc\moc.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe" -f Makefile
    Project ERROR: Unknown module(s) in QT: bootstrap-private
    NMAKE : fatal error U1077: 'cd' : return code '0x3'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.



  • I've found that I'm able to build correctly if I omit the -prefix option and install to the default path instead.


Log in to reply