Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Can't cross-compile Qt5 on Linux for Win64 "must be built on a 64-bit machine"
Forum Updated to NodeBB v4.3 + New Features

Can't cross-compile Qt5 on Linux for Win64 "must be built on a 64-bit machine"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 720 Views 2 Watching
  • 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.
  • I Offline
    I Offline
    iforce2d_where_is_my_old_account
    wrote on last edited by
    #1

    I'm trying to build Qt5 on Fedora 35 using mingw64. I made a mkspec file by taking the old 'win32-g++-cross' one from Qt4 and replacing all occurrences of "i686-w32-" with "x86_64-w64-".

    At the start of the configuration it says:

    Checking for target architecture... x86_64
    Checking for host architecture... x86_64
    

    At the end of the configuration it says:

    WARNING: QtWebEngine must be built on a 64-bit machine.
    WARNING: QtPdf must be built on a 64-bit machine.
    WARNING: QtWebEngine will not be built.
    WARNING: QtPdf will not be built.
    

    After this instead of finishing normally, the configure script repeats two more times from the beginning, each time again asking for license agreement. That can't be right...

    Here is the full output of the first loop, including my configure call:
    https://pastebin.com/GgcQLK30

    If I run gmake after this, it basically does nothing ("No rule to make target... etc").

    I don't understand why it appears to have detected a 64 bit platform for both target and host, but then complains that it should be built on a 64 bit platform. What am I doing wrong?

    Here is the qmake.conf from my mkspec:
    https://pastebin.com/u1Nj8dUQ

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can simply drop webengine and the related modules.

      Chromium does not support MinGW as a build platform so there's no need to try to cross-compile it. AFAIR, it currently only support officially Visual Studio 64bit.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • I Offline
        I Offline
        iforce2d_where_is_my_old_account
        wrote on last edited by
        #3

        Thanks for the reply. I tried adding these options to 'configure' but it makes no difference.

        -no-webp
        -no-webengine-alsa
        -no-webengine-pulseaudio
        -no-webengine-embedded-build
        -no-webengine-icu
        -no-webengine-ffmpeg
        -no-webengine-opus
        -no-webengine-webp
        -no-webengine-pepper-plugins
        -no-webengine-printing-and-pdf
        -no-webengine-proprietary-codecs
        -no-webengine-spellchecker
        -no-webengine-native-spellchecker
        -no-webengine-webrtc

        Are there some other options I should use?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Skip the modules themselves not some options of them: -skip qtwebengine -skip qtpdf

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • I Offline
            I Offline
            iforce2d_where_is_my_old_account
            wrote on last edited by
            #5

            Thanks for the tip. I wonder why those options are not part of the --help output for the configure script.

            I was able to compile using these options, which I discovered are mentioned in the win32-g++ mkspec, so I didn't need to make my own:

            ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32- -skip qtwebengine
            

            btw "-skip qtpdf" is not a recognized option, but "-skip qtwebengine" seems to take care of it.

            Pablo J. RoginaP 1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              My bad, they are both within the qtwebengine module sources.

              I thought they were separated and the former dependent on the later.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • I iforce2d_where_is_my_old_account

                Thanks for the tip. I wonder why those options are not part of the --help output for the configure script.

                I was able to compile using these options, which I discovered are mentioned in the win32-g++ mkspec, so I didn't need to make my own:

                ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32- -skip qtwebengine
                

                btw "-skip qtpdf" is not a recognized option, but "-skip qtwebengine" seems to take care of it.

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @iforce2d_where_is_my_old_account said in Can't cross-compile Qt5 on Linux for Win64 "must be built on a 64-bit machine":

                I was able to compile

                great, so if your issue is solved please don't forget to mark this post as such!

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                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