.. | ||
patches | ||
qt5vars.bat | ||
README.md |
General
This document describes the process to build Qt 5.12.3
Requirements
Windows
-
Visual Studio 2017
If you don’t have Community or Professional edition of Visual Studio 2017, download Visual Studio Community 2017.
Install with defaults -
python 2.7.16
Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi
Add path to python executable to PATH.
Verify that python runs python 2.7 (run “python --version”)
NOTE: our regular build uses python 3. This will still work, because HIFI_PYTHON_EXEC points to the python 3 executable.
- git >= 1.6
Verify by enteringgit --version
- perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by runningperl --version
- flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH
Verify by runningflex --version
Verify by runningbison --version
- gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Install
Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by runninggperf --version
Linux
Tested on Ubuntu 18.04
- qt5 requirements
edit /etc/apt/sources.list (edit as root)
replace all # deb-src with deb-src (in vi1,$s/# deb-src/deb-src/
)
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get build-dep qt5-default
- git >= 1.6
Verify if needed enteringgit --version
sudo apt-get install -y git
Verify again - python
Verify if needed runningpython --version
- should return python 2.7.xsudo apt-get install -y python
(not python 3!)
Verify again - gperf
Verify if needed running gperf --versionsudo apt-get install -y gperf
Verify again - bison and flex
Verify if needed runningflex --version
Verify if needed runningbison --version
sudo apt-get install -y flex bison
Verify again - pkg-config (needed for qtwebengine)
Verify if needed runningpkg-config --version
sudo apt-get install -y pkg-config
Verify again - OpenGL
Verify (first install mesa-utils -sudo apt install -y mesa-utils
) byglxinfo | grep "OpenGL version"
sudo apt-get install -y libgl1-mesa-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0
Verify again - make
Verify by runningmake --version
sudo apt-get install -y make
- g++
Verify by runningg++ --version
sudo apt-get install -y g++
Verify again - dbus-1 (needed for qtwebengine)
sudo apt-get install -y libdbus-glib-1-dev
- nss (needed for qtwebengine)
sudo apt-get install -y libnss3-dev
Mac
- git >= 1.6
Verify by entering git --version - pkg-config
brew fontconfig dbus-glib stall pkg-config - dbus-1
brew install dbus-glib
Build Process
General
qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty.
Only run the patches once!!!
Windows
Before building, verify that HIFI_VCPKG_BASE_VERSION points to a vcpkg folder containing packages\openssl-windows_x64-windows. If not, follow https://github.com/highfidelity/vcpkg to install vcpkg and then openssl.
git clone --recursive https://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
- Copy the patches folder to qt5
- Copy the qt5vars.bat file to qt5
- Apply the two patches to Qt
cd qt5
git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch git apply --ignore-space-change --ignore-whitespace patches/aec.patch
cd ..
mkdir qt5-install
mkdir qt5-build
cd qt5-build
run ..\qt5\qt5vars.bat
cd ....\qt5-build
..\qt5\configure -opensource -confirm-license -opengl desktop -platform win32-msvc -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\include -L %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\lib -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ..\qt5-install
nmake
nmake install
Linux
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
- Copy the patches folder to qt5
- Apply the two patches to Qt
cd qt5
git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch
git apply --ignore-space-change --ignore-whitespace patches/aec.patch
cd ..
mkdir qt5-install
mkdir qt5-build
cd qt5-build
../qt5/configure -opensource -confirm-license -platform linux-g++-64 -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install
make
make install
Mac
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
- Copy the patches folder to qt5
- Apply the two patches to Qt
cd qt5
git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch git apply --ignore-space-change --ignore-whitespace patches/aec.patch cd ..
mkdir qt5-install
mkdir qt5-build
cd ../qt5-build
../qt5/configure -opensource -confirm-license -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install
make
make install
Problems
configure errors, if any, may be viewed in config.log and config.summary