Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to build static Qt
Forum Updated to NodeBB v4.3 + New Features

Unable to build static Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 769 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    psyfl
    wrote on last edited by psyfl
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • P psyfl

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        psyfl
        wrote on last edited by psyfl
        #3

        @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.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          psyfl
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved