Notes: Building Qt 5.4.2 / Phil Weinstein / 6-7-2015
These notes are superceded by this document:
|
6-4-2015 |
Downloaded qt-everywhere-enterprise-src-5.4.2.zip from https://account.qt.io/ and unpacked ... ultimately to C:\Riverware\tools\Qt-542\ -- see below.
In order to build Qt, we need a more advanced version of Perl, version 5.12 or later. Unfortunately we need to stick with Perl 5.6.1, e.g. for our regression tests. (Newer Perl versions lack Perl/Tk, because a maintainer was no longer available). I installed a 64-bit version of Perl 5.20.2 -- just to build Qt.
Also needed is Ruby version 1.9.3. (That was the lastest patch in Ruby 1, so I installed exactly that).
Another requirement is Python, at least version 2.7. I have Python 3.4.0 (March 2014), 32-bit on my 64-bit Windows 7 system. I believe Jim installed that on all of our Windows development machines; this was required for processing RPL Predefined Function help content for RiverWare. See the following document:
For the Qt build, my path was modified as follows:
6-5-2015 |
I believe I have built both Debug and Release versions of Qt 5.4.2 for 64-bit. [Update: Building Qt WebKit has additional
requirements, including a few free 3rd-party libaries].successfully
Here is the README file, and the output from "configure -help":
This is the "configure" command I used to set up the Qt5 build, executed in that build directory (all one line):
This lacks the following switches which we had used to build Qt 4.8.5, but which are apparently not supported in Qt 5.4:
The "-no-opengl -no-angle" switches were added to resolve the following error message, generated from "configure" -- see following. (I believe we don't need OpenGL at all).
When running "configure", I was prompted for the following information (my responses are underlined):
Note: this comment generated from "configure" -- "To reconfigure, run nmake confclean and configure" -- turns out to be incorrect; this is not actually supported in Qt5. (That's left over from Qt4). To redo the configuration, I ended up unpacking the original source into a fresh build directory. Here are the outputs from my three trial "configure" operations. (The last one is for both "debug" and "release"):
Then, after running "nmake" (which takes over an hour), I ran some of the resulting Qt example applications. They seem OK (i.e. correctly built). [Note: building with Qt WebKit will take quite a bit longer].
I then attempted to build Qwt 5.2.3 (same version we were using before) with this new Qt. I was able to create Visual Studio make files, but there is a non-trivial amount of porting work, missing symbols, which I am deferring. [This was attempted in a copy of our Qwt tools source directory, in C:\Riverware\tools\Qwt-523_Qt-542]. The first two missing symbols I encountered were QT_STATIC_CONST and qMemCopy. (We haven't generally used weird Qt stuff like that in RiverWare source code -- but we'll see).
Note: I attempted to remove Perl (ActivePerl) Version 5.20.2, but was unable to. Even the "Gomer Piles" "Administrator" account I have access to on my machine doesn't have sufficient permission to do that. (It's apparently not a full blown administrator account). So, I won't be able to run regression tests on this machine for the time being.
6-6-2015 |
I'm now seeing that there are special requirment for building Qt WebKit as part of Qt5. See these webpages:
The lastest "configure" output shows the options with which I had configured the Qt5 builds: config_out3.txt ... starting in about the middle of that file. (This shows both settings from the configure command line and, importantly, the effective settings from defaults). Notice, for example, under "Third Party Libraries," that ICU support and ANGLE are "no."
I downloaded source code and built (in Visual Studio 2010) ICU (International Components for Unicode) version 55.1 for 64-bit in C:\Riverware\tools\icu-55.1\. I ran its tests for both the debug and release builds.
Augmented path, include* and lib* environment variables:
*I didn't have include and lib environment variables (and I don't see any way of contributing to those symbols any other way, e.g. as parameters to configure). I defined those environment variables with the indicated icu-55.1 paths, and confirmed that they were showing up in the configure environment (i.e. when run from a Visual Studio 2010 x64 command line tool).
I started with a fresh C:\Riverware\tools\Qt-542\ and reran configure with -icu added:
6-7-2015 |
That worked. The Qt5 build has Qt WebKit built. The build 64-bit build took about 5 hours. The RiverWare build went better -- many of our libraries built -- including RwDoc which uses Qt WebKit.
Here are some size comparisons (64-bit):
C:\Riverware\tools\Qt-485 ... with Qt WebKit |
8.99 GB (9,657,989,499 bytes) | 63,184 Files | 7,380 Folders |
C:\Riverware\tools\Qt-542-Save1 Prior build attempt. No Qt WebKit |
9.10 GB (9,776,320,481 bytes) | 150,881 Files | 19,419 Folders |
C:\Riverware\tools\Qt-542 ... with Qt WebKit |
14.2 GB (15,348,694,767 bytes) | 156,602 Files | 19,682 Folders |
To build Qt WebKit in Qt5, it was necessary to obtain and build ICU (64-bit) [International Components for Unicode]:
C:\Riverware\tools\icu-55.1 | 766 MB (803,866,097 bytes) | 12,047 Files | 310 Folders |
... \bin64 (DLLs, deployment): | 36.6 MB (38,435,984 bytes) | 38 Files |
RiverWare Build Changes: Makefiles/qmake.pl:
Old | my $qt4 = 'C:\\RiverWare\\tools\\Qt-485'; |
New | my $qt4 = 'C:\\RiverWare\\tools\\Qt-542'; |
Old | my $cmd = "qmake $pro"; |
New | my $cmd = "C:/Riverware/tools/Qt-542/qtbase/bin/qmake $pro"; |
RiverWare Build Changes: Makefiles/riverwarebase.pro:
Old | QT += webkit |
New | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets lessThan(QT_MAJOR_VERSION, 5): QT += webkit greaterThan(QT_MAJOR_VERSION, 4): QT += webkitwidgets greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport |
---