Can't cross-compile Qt5 on Linux for Win64 "must be built on a 64-bit machine"
-
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/GgcQLK30If 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 -
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.
-
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-webrtcAre there some other options I should use?
-
Skip the modules themselves not some options of them:
-skip qtwebengine -skip qtpdf
-
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.
-
My bad, they are both within the qtwebengine module sources.
I thought they were separated and the former dependent on the later.
-
@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!