error trying to build static Qt 6.5.0 (Windows)
-
Hi all -
Tried to follow the directions on this page, with this command:
configure.bat -opensource -confirm-license -static -static-runtime -release -platform win32-g++ -opengl desktop -skip qtwebengine -nomake examples -nomake tests -prefix c:\qt\6.5.0_static
and I'm getting this error:
-DCMAKE_MODULE_PATH:STRING=C:/Qt/6.5.0/Src/qtbase/cmake/platforms CMake Error at qtbase/cmake/QtSyncQtHelpers.cmake:235 (message): syncqt.cpp failed for module QtZlib: Call Stack (most recent call first): qtbase/cmake/QtModuleHelpers.cmake:871 (qt_internal_target_sync_headers) qtbase/cmake/QtScopeFinalizerHelpers.cmake:24:EVAL:1 (qt_finalize_module) qtbase/src/3rdparty/zlib/CMakeLists.txt:DEFERRED -- Configuring incomplete, errors occurred!
Any idea what I did wrong? Thanks...
EDIT:
I tried the configure command with both -qt-zlib and -system-zlib. I also tried -no-zlib but got a unknown command line option error.
-
So, the team identified a bug that was causing my problem, and gave me a workaround (detailed in the bug report linked above). They also made a patch which I'm in the process of building.
Using the workaround, I am able to build a static version of my application.
I can pull it out of the build directory, double click on it, and it opens fine. So, I thought I had the problem solved. BUT: when I shared this file with someone else, he got an error message about "libgcc_s_seh-1.dll was not found."EDIT:
This is a different enough question to merit its own topic.
I'll report back on the patch after I build it.
EDIT 2:
I never did apply the patch, but further investigation revealed that the lingering problem was traced to my Perl installation, which placed perl bins (which included C compilers) above my Qt toolchain in my PATH variable. Fixing this allowed the build to work.
-
-
@JoeCFD that's essentially what I'm trying to do (with different options set). But I have to get past that zlib issue for the configuration to complete successfully.
I also recall from years ago that after a failed configure attempt, it was necessary to perform some clean-up before retrying the configure. I'm not sure this is still the case; I haven't found any recent mention of it.
-
UPDATE: it turns out the culprit that killed my configure was the inclusion of strawberry perl in my PATH environment variable. I removed it, and it configured and built.
BUT: my static build give me a warning in Creator: "No QML utility installed." I remember seeing this long ago, but I don't recall what the fix is. (I had to manually add my static library, as it wasn't auto-detected.)
Can someone please remind me what the fix is for this? Thank you.
-
@JoeCFD said in error trying to build static Qt 6.5.0 (Windows):
are these QML executable commands like qml etc. not installed?
Well, if they aren't, then I did something wrong with my configure command, though this exact command (above) worked with an earlier version of Qt 6, so I'm not sure what to say.
-
@JoeCFD I just checked - they're not (at least qml.exe isn't). So...that's a problem for sure.
I looked through the configure help, and found nothing that I might need to set in order to get this, but there's nothing in my static build with any QML stuff.
EDIT: I've been building from the source code that I downloaded through the maintenance tool. I think I'll try downloading via git, and building with that. I'll report back with any findings.
-
An update on this: the missing QML was caused (at least partly) by running the configure.bat script from qtbase, and not the root folder.
I now produce a semi-valid Qt library, but for some reason, it's missing parts of the qtmultimedia module, so I can't use it with apps that need multimedia support. I opened a bug report on this and am discussing it with the bug fixing folks.
I'll report back when I have more information.
-
So, the team identified a bug that was causing my problem, and gave me a workaround (detailed in the bug report linked above). They also made a patch which I'm in the process of building.
Using the workaround, I am able to build a static version of my application.
I can pull it out of the build directory, double click on it, and it opens fine. So, I thought I had the problem solved. BUT: when I shared this file with someone else, he got an error message about "libgcc_s_seh-1.dll was not found."EDIT:
This is a different enough question to merit its own topic.
I'll report back on the patch after I build it.
EDIT 2:
I never did apply the patch, but further investigation revealed that the lingering problem was traced to my Perl installation, which placed perl bins (which included C compilers) above my Qt toolchain in my PATH variable. Fixing this allowed the build to work.
-
-
@mzimmers I'm facing this error
CMake Error at qtbase/cmake/QtSyncQtHelpers.cmake:235 (message):
syncqt.cpp failed for module QtCore:Missing argument: -rhiIncludeDir
Call Stack (most recent call first):
qtbase/cmake/QtModuleHelpers.cmake:871 (qt_internal_target_sync_headers)
qtbase/cmake/QtScopeFinalizerHelpers.cmake:24:EVAL:1 (qt_finalize_module)
qtbase/src/corelib/CMakeLists.txt:DEFERRED-- Configuring incomplete, errors occurred!
CMake Error at /Users/fyi/Documents/qt-workspace/qt5/qtbase/cmake/QtProcessConfigureArgs.cmake:994 (message):
CMake exited with code 1.This is how my PATH variable looks like
/Users/fyi/Library/Android/sdk/platform-tools:/opt/homebrew/opt/openjdk@11/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/binperl is installed in /usr/bin/perl
How did fix it in the PATH variable ?
-
@K-Pradeep-Kumar-Reddy Your problem has nothing to do with Perl. You should start your own thread instead of posting in this one.