Catch-22: Qt5 build from downloaded source on VS2008
There's a Catch-22 when trying to build Qt5 with Visual Studio from the downloaded sources (in the tarball). The README file gives a command-line instruction to use from the VS command prompt. However, this fails with a message that "configure.exe" can't be found in qtbase.
Digging deeper, there is a configure.bat file in qtbase that first checks for the existence of ".gitignore". If this isn't found, then it tries to execute the "configure.exe" file to bootstrap the configuration. This exe doesn't exist. Neither does .gitignore, since the sources came from a tarball, not gitorius.
The solution is to go to git, download the .gitignore file (making sure it is actually saved as such - on my PC, it was saved without the initial "." so I had to rename it), then run the configure script again. Now, since the .gitignore file exists, the script doesn't try to run the non-existent configure.exe. so it goes ahead and compiles up the source to actually build configure.exe.
Catch-22. Either .gitignore needs to be added to the tarball, or some other check must be done to determine if there is some initial bootstrapping required.
Have you tried using <code>configure.bat</code> from the root directory, which calls the <code>configure</code> perl script, not the one from <code>qtbase</code>.
That's exactly what I did. It's the invocation of the <code>qtbase\configure.bat</code> script by perl (from the configure.bat in the root directory) that ends up with the error. The tarball simply doesn't include the configure.exe program that the bat file in qtbase tries to run when there is no .gitignore file. The exe gets built but only after you can get the build running.
I believe it is this line of perl from the <code>configure</code> file in the root directory that spawns execution of the <code>configure.bat</code> file in the qtbase directory:
<code>my $ret = system_v("$relpath/qtbase/configure @ARGV");</code>
and that's what results in the test for <code>.gitignore</code> (which fails) and the attempt to run <code>configure.exe</code> which also fails because it doesn't exist yet.
Edit: Just for the heck of it, I decided to download the ZIP file version of the Qt5 source distribution. It does contain a <code>configure.exe</code> file in the qtbase subdirectory. The tarball doesn't. Now I wonder what else is different.
Do you mind filing a "bug report":https://bugreports.qt-project.org/secure/Dashboard.jspa?
d_stranz: From what I understand the tar-ball is meant for unix-systems, the zip file for windows. The biggest difference should be in the line endings. Of course the amount of testing the different source packages got on different OSes will also differ;-)
[quote author="Tobias Hunger" date="1356076895"]d_stranz: From what I understand the tar-ball is meant for unix-systems, the zip file for windows.[/quote]If so, this should be probably mentioned on the Downloads page then.
I also did this (well, once I got the tarball build running, it built it for me), but I was unsure of whether configure.exe was built in a system-specific way or not so I trashed the whole source tree and started over with the zip version.
Others have mentioned the line-ending differences between the zip and tarball sources. This actually makes no difference at all to the MSVC compiler; it handles unix and Windows style line endings transparently. The Visual Studio IDE will complain and convert when you edit them, but the compiler doesn't care.
The README should also say something about OpenGL/ES. This is usually not present on a Windows desktop system, and running the "standard" configure command as given in the readme will cause compilation failure on OpenGL because GLES2 headers aren't present.
This is fixable by adding the <code>-opengl desktop</code> option to the configure command line.
[quote author="d_stranz" date="1356102705"]"Reported.":https://bugreports.qt-project.org/browse/QTBUG-28791 [/quote]Thank you.