Solved Issues Building Static Qt
-
BTT.
Can anyone please give me some guidance? I'm in need of static builds.
-
-
@jsulm thanks. The PS script that page references is a bit out of date, so I made some changes to it, but it doesn't address the OpenGL error I'm getting on the configure step.
-
Anyone have any ideas on this? Should I report this as a bug?
-
Does it fail if you ignore the warning? I don't recall doing anything special when building Qt on windows (dynamic, but still).
-
@kshegunov yes it does fail. I get the impression there's some implicit set-up to be done for the Angle stuff, but it's not documented anywhere that I can find.
-
Here's an error message I'm getting during configure:
C:\Qt\Static\src\qt-everywhere-src-5.12.3> configure -prefix C:\Qt\Static\src\qt-everywhere-src-5.12.3\qt-build -static -static-runtime -opengl desktop -nomake examples -nomake tests ... Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. On Windows, you must set LLVM_INSTALL_DIR to the installation path. ERROR: Feature 'opengl-desktop' was enabled, but the pre-condition '(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl)) || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)' failed. ERROR: The OpenGL functionality tests failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform. Check config.log for details.
So, I gather that I'm missing something related to OpenGL, but I really don't know what it might be.
-
Do you have the opengl dev headers (I think they're in the directx sdk)?
-
I didn't have DirectX installed. Now that I do, though, I don't see anything that looks like what you're talking about. None of the files listed here are in the DirectX directory.
I'm completely out of my element here -- do I need an Angle installation as well?
-
@mzimmers said in Issues Building Static Qt:
I didn't have DirectX installed. Now that I do, though, I don't see anything that looks like what you're talking about. None of the files listed here are in the DirectX directory.
Did you by mistake install the redistributables? I was talking specifically about the SDK (software development kit). If I'm not mistaken it [the DX SDK] is also available through the Windows SDK.
I'm completely out of my element here -- do I need an Angle installation as well?
Honestly me too a bit. I think you don't, although I'm not completely certain. If I recall correctly Angle is a software implementation to substitute the GL. I hope someone's going to correct me if I'm wrong.
-
No, I installed the SDK -- went into this directory: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010).
I did open a bug report for this (here) though I'm not sure that the assignee fully understands what's going on. I'm just amazed that more people aren't experiencing something similar.
-
UPDATE:
I got the configure (and make/make install) to run successfully. On a suggestion from the person handling the bug case I opened, I deleted my existing source base and re-extracted it. I then created a subdirectory for the build, went into that subdirectory and issued this command:
..\configure -prefix C:\QtStatic\qt-everywhere-src-5.12.3 -platform win32-g++ -static -static-runtime -opengl desktop -nomake examples -nomake tests -recheck-all
Then ran mingw32-make.
Both the wiki page on this topic, and the powershell script it references, are flawed. And the build process is a bit fragile: even by creating and using a shadow build, I somehow corrupted my source, causing the OpenGL red herring that was driving me crazy. A fresh extraction was the key, but a couple other points:
- do use the -platform switch when running configure
- -static and -static-runtime are both needed
- when in doubt, use the -recheck-all switch
Anyway, this hopefully closes out this nasty little chapter. Thanks to all involved; I'll be back eventually with some follow-up questions on creating standalone apps.