Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler
-
@kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:
allow me to always have access to C:.
You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER
-
@jsulm Good point. In general, I am aware that this is a Windows problem, but tampering with registry keys to disable the character path limit is not the ideal solution for different systems in use. Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?
-
@kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:
Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?
Because the path is to long. Use a shorter source and build path and blame MS
Already answered two days ago...
-
@jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:
Too long paths is a Windows limitation
Not quite. Windows has support for long paths (>255 characters) since Windows 10 version 1607 released on August 2015.
But the applications need to opt-in in order to use the new functionality.
It's a tooling problem:
- Ninja - Is fixed but waiting for an official release (1.12)
- GCC - Not fixed.
- Visual C++ - Not fixed.
- moc - Fixed since Qt 6.5.
- make - Not fixed, but forgot to open a bug report.
- clang - Works out of the box.
- cmake - Works out of the box.
So on Windows if you take llvm-mingw and a patched ninja you would be able to compile with clang and Qt 6.5+ just fine.
-
@cristian-adam said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:
But the applications need to opt-in in order to use the new functionality
Well, yes. But you can also see it as on OS problem if user has to do something special just to be able to use long paths. And I think this is a system wide setting and not per-application.
-
Attempt # 9 for building on windows
Tried your suggestion, but got the same error of missing file of
qplatformmediadevices_p.h
- Cleared out the build folder and ran the configure.bat like the following:
PS C:\qt6\build> ..\configure.bat
- Ran the command
cmake --build . --parallel
Buikld stop with missing header file: https://pastebin.com/AZ7zDM2d
I used the version of llvm-mingw:
version of ninja used:
PS C:\Users\kyrlon\Downloads\qt-everywhere-src-6.6.2\build> ninja --version 1.12.0.git
-
@jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:
You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER
Another alternative is to use a virtual drive using the subst command. I might make this attempt later.
-
Attempt # 10 for building on windows [SUCCESS!!]
Started from scratch by re-downloading the source and used the
subst
command to make a new path to build with.- Created a virtual drive to avoid the PATH length limit:
subst a: .\qt-everywhere-src-6.6.2\
- created the build folder and ran the configure.bat like the following:
PS a:\build> ..\configure.bat
-
Ran the command
cmake --build . --parallel
-
Ran the install command afterwards
PS a:\build> cmake --build . --parallel
No issues and everything was installed.
-