Merge pull request #15649 from hyperlogic/bug-fix/qt-symbols-for-mac

Update mac qt build
This commit is contained in:
Brad Hefta-Gaub 2019-05-30 12:04:44 -07:00 committed by GitHub
commit 85389aa5b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 530 additions and 198 deletions

View file

@ -52,13 +52,12 @@ macro(setup_qt)
message(FATAL_ERROR "VCPKG_QT_CMAKE_PREFIX_PATH should have been set by hifi_vcpkg.py") message(FATAL_ERROR "VCPKG_QT_CMAKE_PREFIX_PATH should have been set by hifi_vcpkg.py")
endif() endif()
if (NOT DEV_BUILD) if (NOT DEV_BUILD)
if (APPLE) if (UNIX AND DEFINED ENV{QT_CMAKE_PREFIX_PATH} AND NOT APPLE)
# HACK: manually set the QT_CMAKE_PREFIX_PATH so that hard-coded paths find new QT libs where we'll put them
set(QT_CMAKE_PREFIX_PATH "/var/tmp/qt5-install/lib/cmake")
elseif (UNIX AND DEFINED ENV{QT_CMAKE_PREFIX_PATH})
# HACK: obey QT_CMAKE_PREFIX_PATH to allow UNIX to use older QT libs # HACK: obey QT_CMAKE_PREFIX_PATH to allow UNIX to use older QT libs
message("HACK: obey QT_CMAKE_PREFIX_PATH on UNIX")
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH}) set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
else() else()
message("override QT_CMAKE_PREFIX_PATH with VCPKG_QT_CMAKE_PREFIX_PATH")
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH}) set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
endif() endif()
else() else()
@ -70,6 +69,8 @@ macro(setup_qt)
endif() endif()
endif() endif()
message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH})
# figure out where the qt dir is # figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
set(QT_VERSION "unknown") set(QT_VERSION "unknown")

View file

@ -9,6 +9,8 @@
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> # VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
# #
#
include(vcpkg_common_functions) include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)

View file

@ -214,12 +214,8 @@ endif()
f.write(self.tagContents) f.write(self.tagContents)
def getQt5InstallPath(self): def getQt5InstallPath(self):
qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install') qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install')
if platform.system() == "Darwin" and self.args.release_type != "DEV": if self.args.android:
# HACK for MacOS Jenkins PRODUCTION and PR builds during Qt-5.12.3 transition
# we always supply /var/tmp/qt5-install for QT_CMAKE_PREFIX_PATH
qt5InstallPath = "/var/tmp/qt5-install"
elif self.args.android:
precompiled = os.path.realpath(self.androidPackagePath) precompiled = os.path.realpath(self.androidPackagePath)
qt5InstallPath = os.path.realpath(os.path.join(precompiled, 'qt')) qt5InstallPath = os.path.realpath(os.path.join(precompiled, 'qt'))
return qt5InstallPath return qt5InstallPath
@ -260,7 +256,7 @@ endif()
if platform.system() == 'Windows': if platform.system() == 'Windows':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows2.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows2.tar.gz'
elif platform.system() == 'Darwin': elif platform.system() == 'Darwin':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos2.tar.gz'
elif platform.system() == 'Linux': elif platform.system() == 'Linux':
if platform.linux_distribution()[1][:3] == '16.': if platform.linux_distribution()[1][:3] == '16.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04.tar.gz'

View file

@ -1,235 +1,243 @@
# General # General
This document describes the process to build Qt 5.12.3. This document describes the process to build Qt 5.12.3.
Note that there are two patches. The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this. Note that there are two patches. The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this.
The second patch is to OpenSL ES audio. The second patch is to OpenSL ES audio.
## Requirements ## Requirements
### Windows ### Windows
1. Visual Studio 2017 1. Visual Studio 2017
If you dont have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/). If you dont have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/).
Install with defaults Install with C++ support.
1. python 2.7.16 1. python 2.7.16
Check if needed running `python --version` - should return python 2.7.x Check if needed running `python --version` - should return python 2.7.x
Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi
Add path to python executable to PATH. Add path to python executable to PATH.
NOTE: REMOVE python 3 from PATH. Our regular build uses python 3. This will still work, because HIFI_PYTHON_EXEC points to the python 3 executable. NOTE: REMOVE python 3 from PATH. Our regular build uses python 3. This will still work, because HIFI_PYTHON_EXEC points to the python 3 executable.
Verify that python runs python 2.7 (run “python --version”) Verify that python runs python 2.7 (run “python --version”)
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
Download from https://git-scm.com/download/win Download from https://git-scm.com/download/win
Verify by entering `git --version` Verify by entering `git --version`
1. perl >= 5.14 1. perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\ Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by running `perl --version` Verify by running `perl --version`
1. flex and bison 1. flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH Add C:\flex_bison to PATH
Verify by running `flex --version` Verify by running `flex --version`
Verify by running `bison --version` Verify by running `bison --version`
1. gperf 1. gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Add C:\Program Files (x86)\GnuWin32\bin to PATH Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by running `gperf --version` Verify by running `gperf --version`
1. 7-zip 1. 7-zip
Download from https://www.7-zip.org/download.html Download from https://www.7-zip.org/download.html
1. Bash shell 1. Bash shell
From *Settings* select *Update & Security* From *Settings* select *Update & Security*
Select *For Developers* Select *For Developers*
Enable *Developer mode* Enable *Developer mode*
Restart PC Restart PC
Open Control Panel and select *Programs and Features* Open Control Panel and select *Programs and Features*
Select *Turn Windows features on or off* Select *Turn Windows features on or off*
Check *Windows Subsystem for Linux* Check *Windows Subsystem for Linux*
Click *Restart now* Click *Restart now*
Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version
[First run will take a few minutes] [First run will take a few minutes]
Enter a user name - all small letters (this is used for *sudo* commands) Enter a user name - all small letters (this is used for *sudo* commands)
Choose a password Choose a password
1. Jom
jom is a clone of nmake to support the execution of multiple independent commands in parallel.
https://wiki.qt.io/Jom
### Linux ### Linux
Tested on Ubuntu 16.04 and 18.04. Tested on Ubuntu 16.04 and 18.04.
**16.04 NEEDED FOR JENKINS~~ ** **16.04 NEEDED FOR JENKINS~~ **
1. qt5 requirements 1. qt5 requirements
edit /etc/apt/sources.list (edit as root) edit /etc/apt/sources.list (edit as root)
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`) replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
`sudo apt-get update -y` `sudo apt-get update -y`
`sudo apt-get upgrade -y` `sudo apt-get upgrade -y`
`sudo apt-get build-dep qt5-default -y` `sudo apt-get build-dep qt5-default -y`
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
`sudo apt-get install git -y` `sudo apt-get install git -y`
Verify again Verify again
1. python 1. python
Check if needed `python --version` - should return python 2.7.x Check if needed `python --version` - should return python 2.7.x
`sudo apt-get install python -y` (not python 3!) `sudo apt-get install python -y` (not python 3!)
Verify again Verify again
1. gperf 1. gperf
Check if needed `gperf --version` Check if needed `gperf --version`
`sudo apt-get install gperf -y` `sudo apt-get install gperf -y`
Verify again Verify again
1. bison and flex 1. bison and flex
Check if needed `flex --version` and `bison --version` Check if needed `flex --version` and `bison --version`
`sudo apt-get install flex bison -y` `sudo apt-get install flex bison -y`
Verify again Verify again
1. pkg-config (needed for qtwebengine) 1. pkg-config (needed for qtwebengine)
Check if needed `pkg-config --version` Check if needed `pkg-config --version`
`sudo apt-get install pkg-config -y` `sudo apt-get install pkg-config -y`
Verify again Verify again
1. OpenGL 1. OpenGL
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"` Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"`
`sudo apt-get install libgl1-mesa-dev -y` `sudo apt-get install libgl1-mesa-dev -y`
`sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0` `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 Verify again
1. make 1. make
Check if needed `make --version` Check if needed `make --version`
`sudo apt-get install make -y` `sudo apt-get install make -y`
Verify again Verify again
1. g++ 1. g++
Check if needed Check if needed
`g++ --version` `g++ --version`
`sudo apt-get install g++ -y` `sudo apt-get install g++ -y`
Verify again Verify again
1. dbus-1 (needed for qtwebengine) 1. dbus-1 (needed for qtwebengine)
`sudo apt-get install libdbus-glib-1-dev -y` `sudo apt-get install libdbus-glib-1-dev -y`
1. nss (needed for qtwebengine) 1. nss (needed for qtwebengine)
`sudo apt-get install libnss3-dev -y` `sudo apt-get install libnss3-dev -y`
### Mac ### Mac
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
Install from https://git-scm.com/download/mac Install from https://git-scm.com/download/mac
Verify again Verify again
1. pkg-config 1. pkg-config
brew fontconfig dbus-glib stall pkg-config brew fontconfig dbus-glib stall pkg-config
1. dbus-1 1. dbus-1
brew install dbus-glib brew install dbus-glib
## Build Process ## Build Process
### General ### General
qt is cloned to the qt5 folder. qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder. The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder. Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty. Before running configure, make sure that the qt5-build folder is empty.
**Only run the git patches once!!!** **Only run the git patches once!!!**
### Windows ### Windows
Before building, verify that **HIFI_VCPKG_BASE_VERSION** points to a *vcpkg* folder containing *packages\openssl-windows_x64-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*. If not, follow https://github.com/highfidelity/vcpkg to install *vcpkg* and then *openssl*.
Also, make sure the directory that you are using to build qt is not deeply nested. It is quite possible to run into the windows MAX_PATH limit when building chromium. For example: `c:\msys64\home\ajt\code\hifi\tools\qt-builder\qt5-build` is too long. `c:\q\qt5-build\` is a better choice.
#### Preparing source files #### Preparing source files
`git clone --recursive https://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch` `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
* Copy the **patches** folder to qt5 `cd qt5`
* Copy the **qt5vars.bat** file to qt5 `git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch`
* Apply the two patches to Qt `git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
`cd qt5` run `..\qt5\qt5vars.bat`
`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch` `cd ..\..\qt5-build`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
run `..\qt5\qt5vars.bat` `..\qt5\configure -force-debug-info -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`
`cd ..\..\qt5-build`
`..\qt5\configure -force-debug-info -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`
#### Make #### Make
`nmake` `jom`
`nmake install` `jom install`
#### Fixing #### Fixing
The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
1. Open a bash terminal 1. Open a bash terminal
1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`) 1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`)
1. Run the following command 1. Run the following command
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` `find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin* 1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading #### Uploading
Create a tar file called qt5-install.tar from the qt5-install folder (e.g. using 7-zip) Create a tar file called qt5-install-5.12.3-windows.tar.gz from the qt5-install folder
Create a gzip file called qt5-install.tar.gz from the qt5-install.tar file just created (e.g. using 7-zip) Upload qt5-install-5.12.3-windows.tar.gz to our Amazon S3 hifi-public bucket, under the dependencies/vckpg directory
Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Windows/ Update hifi_vcpkg.py to use this new URL. Additionally, you should make a small change to any file in the hifi/cmake/ports directory to force the re-download of the qt-install.tar.gz during the build process for hifi.
#### Preparing Symbols
Run `python3 prepare-windows-symbols-for-backtrace.py qt5-install` to scan the qt5-install directory for any dlls and pdbs. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dlls and pdbs are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload
### Linux ### Linux
#### Preparing source files #### Preparing source files
`git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch` `git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
* Copy the **patches** folder to qt5 * Copy the **patches** folder to qt5
* Apply one patch to Qt * Apply one patch to Qt
`cd qt5` `cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` `git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..` `cd ..`
#### Configuring #### Configuring
`mkdir qt5-install` `mkdir qt5-install`
`mkdir qt5-build` `mkdir qt5-build`
`cd qt5-build` `cd qt5-build`
*Ubuntu 16.04* *Ubuntu 16.04*
`../qt5/configure -opensource -confirm-license -platform linux-g++-64 -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install` `../qt5/configure -opensource -confirm-license -platform linux-g++-64 -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install`
*Ubuntu 18.04* *Ubuntu 18.04*
`../qt5/configure -force-debug-info -release -opensource -confirm-license -gdb-index -recheck-all -nomake tests -nomake examples -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 -c++std c++14 -prefix ../qt5-install` `../qt5/configure -force-debug-info -release -opensource -confirm-license -gdb-index -recheck-all -nomake tests -nomake examples -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 -c++std c++14 -prefix ../qt5-install`
???`../qt5/configure -opensource -confirm-license -gdb-index -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install` ???`../qt5/configure -opensource -confirm-license -gdb-index -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install`
#### Make #### Make
`make` `make`
????*Ubuntu 18.04 only* ????*Ubuntu 18.04 only*
????`make module-qtwebengine` ????`make module-qtwebengine`
????`make module-qtscript` ????`make module-qtscript`
*Both* *Both*
`make install` `make install`
#### Fixing #### Fixing
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) 1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install` `cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` `find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin* 1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading #### Uploading
*Ubuntu 16.04* *Ubuntu 16.04*
1. Return to the home folder 1. Return to the home folder
`cd ..` `cd ..`
1. Open a python 3 shell 1. Open a python 3 shell
`python3` `python3`
1. Run the following snippet: 1. Run the following snippet:
`import os` `import os`
`import tarfile` `import tarfile`
`filename=tarfile.open("qt5-install.tar.gz", "w:gz")` `filename=tarfile.open("qt5-install.tar.gz", "w:gz")`
`filename.add("qt5-install", os.path.basename("qt5-install"))` `filename.add("qt5-install", os.path.basename("qt5-install"))`
`exit()` `exit()`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04 1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04
*Ubuntu 18.04* *Ubuntu 18.04*
``tar -zcvf qt5-install.tar.gz qt5-install` ``tar -zcvf qt5-install.tar.gz qt5-install`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/18.04 1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/18.04
1. ### Mac ### Mac
#### Preparing source files #### Preparing source files
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
* Copy the **patches** folder to qt5 * Copy the **patches** folder to qt5
* Apply one patch to Qt * Apply one patch to Qt
`cd qt5` `cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` `git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..` `cd ..`
#### Configuring #### Configuring
`mkdir qt5-install` `mkdir qt5-install`
`mkdir qt5-build` `mkdir qt5-build`
`cd ../qt5-build` `cd ../qt5-build`
`../qt5/configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -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` `../qt5/configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -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
`make` `make`
`make install` `make install`
#### Fixing #### Fixing
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html) 1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install` `cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` `find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
`cd ..` `cd ..`
1. Copy *qt.conf* to *qt5-install\bin* 1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading #### Uploading
`tar -zcvf qt5-install.tar.gz qt5-install` `tar -zcvf qt5-install-5.13.2-macos.tar.gz qt5-install`
Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Mac/ Upload qt5-install-5.13.2-macos.tar.gz to our Amazon S3 hifi-public bucket, under the dependencies/vckpg directory
#### Creating symbols
Run `python3 prepare-mac-symbols-for-backtrace.py qt5-install` to scan the qt5-build directory for any dylibs and execute dsymutil to create dSYM bundles. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dylibs and dSYM fiels are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload
## Problems ## Problems
*configure* errors, if any, may be viewed in **config.log** and **config.summary** *configure* errors, if any, may be viewed in **config.log** and **config.summary**

View file

@ -0,0 +1,193 @@
# Scans the Mac qt-install directory for all known qt dylibs used by high fidelity.
# Then copies any DWARF symbols into a coorespoding dSYM file.
#
# usage
# python prepare-mac-symbols-for-backtace.py QT_BUILD_DIR
#
# QT_BUILD_DIR should be the directory where qt was built, because
# it requires that the temporary .o files associated with the dylibs
# are present. See hifi/tools/qt-builder/README.md for more info
#
import sys
# python 3 script
if (not sys.version_info > (3, 5)):
print("ERROR: REQUIRES Python 3")
quit()
import pathlib
import shutil
import os
import tarfile
import subprocess
import re
def cp(a, b):
print("cp {} {}".format(a, b))
shutil.copyfile(a, b)
# list of all qt dylibs used by hifi
# generarted by installing hifi and running these commands
# > find interface.app -exec file {} \; > files.txt
# > awk '$2 == "Mach-O"' files.txt > dylibs.txt
# then removing any non-qt dylibs from the list.
hifi_dylibs = [
"Contents/PlugIns/mediaservice/libqavfmediaplayer.dylib",
"Contents/PlugIns/mediaservice/libqtmedia_audioengine.dylib",
"Contents/PlugIns/mediaservice/libqavfcamera.dylib",
"Contents/PlugIns/quick/libdeclarative_multimedia.dylib",
"Contents/PlugIns/quick/libqtquickextrasflatplugin.dylib",
"Contents/PlugIns/quick/libqmlxmllistmodelplugin.dylib",
"Contents/PlugIns/quick/libqtgraphicaleffectsprivate.dylib",
"Contents/PlugIns/quick/libqtgraphicaleffectsplugin.dylib",
"Contents/PlugIns/quick/libdeclarative_webchannel.dylib",
"Contents/PlugIns/quick/libqtqmlremoteobjects.dylib",
"Contents/PlugIns/quick/libmodelsplugin.dylib",
"Contents/PlugIns/quick/libqtwebengineplugin.dylib",
"Contents/PlugIns/quick/libqtquickextrasplugin.dylib",
"Contents/PlugIns/quick/libqmlfolderlistmodelplugin.dylib",
"Contents/PlugIns/quick/libqquicklayoutsplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2materialstyleplugin.dylib",
"Contents/PlugIns/quick/libqtquick2plugin.dylib",
"Contents/PlugIns/quick/libwindowplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2imaginestyleplugin.dylib",
"Contents/PlugIns/quick/libdialogplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrolsplugin.dylib",
"Contents/PlugIns/quick/libwidgetsplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2universalstyleplugin.dylib",
"Contents/PlugIns/quick/libdialogsprivateplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2fusionstyleplugin.dylib",
"Contents/PlugIns/quick/libqtquicktemplates2plugin.dylib",
"Contents/PlugIns/quick/libqmlsettingsplugin.dylib",
"Contents/PlugIns/quick/libqtqmlstatemachine.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib",
"Contents/PlugIns/styles/libqmacstyle.dylib",
"Contents/PlugIns/audio/libqtaudio_coreaudio.dylib",
"Contents/PlugIns/bearer/libqgenericbearer.dylib",
"Contents/PlugIns/iconengines/libqsvgicon.dylib",
"Contents/PlugIns/imageformats/libqgif.dylib",
"Contents/PlugIns/imageformats/libqwbmp.dylib",
"Contents/PlugIns/imageformats/libqwebp.dylib",
"Contents/PlugIns/imageformats/libqico.dylib",
"Contents/PlugIns/imageformats/libqmacheif.dylib",
"Contents/PlugIns/imageformats/libqjpeg.dylib",
"Contents/PlugIns/imageformats/libqtiff.dylib",
"Contents/PlugIns/imageformats/libqsvg.dylib",
"Contents/PlugIns/imageformats/libqicns.dylib",
"Contents/PlugIns/imageformats/libqtga.dylib",
"Contents/PlugIns/imageformats/libqmacjp2.dylib",
"Contents/Frameworks/QtGui.framework/Versions/5/QtGui",
"Contents/Frameworks/QtGui.framework/QtGui",
"Contents/Frameworks/QtDBus.framework/Versions/5/QtDBus",
"Contents/Frameworks/QtDBus.framework/QtDBus",
"Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork",
"Contents/Frameworks/QtNetwork.framework/QtNetwork",
"Contents/Frameworks/QtMultimedia.framework/Versions/5/QtMultimedia",
"Contents/Frameworks/QtMultimedia.framework/QtMultimedia",
"Contents/Frameworks/QtQml.framework/QtQml",
"Contents/Frameworks/QtQml.framework/Versions/5/QtQml",
"Contents/Frameworks/QtXml.framework/Versions/5/QtXml",
"Contents/Frameworks/QtXml.framework/QtXml",
"Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets",
"Contents/Frameworks/QtWidgets.framework/QtWidgets",
"Contents/Frameworks/QtMultimediaQuick.framework/Versions/5/QtMultimediaQuick",
"Contents/Frameworks/QtMultimediaQuick.framework/QtMultimediaQuick",
"Contents/Frameworks/QtWebChannel.framework/Versions/5/QtWebChannel",
"Contents/Frameworks/QtWebChannel.framework/QtWebChannel",
"Contents/Frameworks/QtScriptTools.framework/Versions/5/QtScriptTools",
"Contents/Frameworks/QtScriptTools.framework/QtScriptTools",
"Contents/Frameworks/libPolyVoxCore.dylib",
"Contents/Frameworks/QtWebSockets.framework/QtWebSockets",
"Contents/Frameworks/QtWebSockets.framework/Versions/5/QtWebSockets",
"Contents/Frameworks/QtQuickTemplates2.framework/QtQuickTemplates2",
"Contents/Frameworks/QtQuickTemplates2.framework/Versions/5/QtQuickTemplates2",
"Contents/Frameworks/QtCore.framework/Versions/5/QtCore",
"Contents/Frameworks/QtCore.framework/QtCore",
"Contents/Frameworks/QtWebEngine.framework/Versions/5/QtWebEngine",
"Contents/Frameworks/QtWebEngine.framework/QtWebEngine",
"Contents/Frameworks/QtOpenGL.framework/QtOpenGL",
"Contents/Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL",
"Contents/Frameworks/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets",
"Contents/Frameworks/QtMultimediaWidgets.framework/QtMultimediaWidgets",
"Contents/Frameworks/QtQuickControls2.framework/Versions/5/QtQuickControls2",
"Contents/Frameworks/QtQuickControls2.framework/QtQuickControls2",
"Contents/Frameworks/QtRemoteObjects.framework/QtRemoteObjects",
"Contents/Frameworks/QtRemoteObjects.framework/Versions/5/QtRemoteObjects",
"Contents/Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent",
"Contents/Frameworks/QtConcurrent.framework/QtConcurrent",
"Contents/Frameworks/QtScript.framework/QtScript",
"Contents/Frameworks/QtScript.framework/Versions/5/QtScript",
"Contents/Frameworks/QtQuick.framework/Versions/5/QtQuick",
"Contents/Frameworks/QtQuick.framework/QtQuick",
"Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport",
"Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport",
"Contents/Frameworks/QtSvg.framework/Versions/5/QtSvg",
"Contents/Frameworks/QtSvg.framework/QtSvg",
"Contents/Frameworks/QtWebEngineCore.framework/Versions/5/QtWebEngineCore",
"Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess",
"Contents/Frameworks/QtWebEngineCore.framework/QtWebEngineCore",
"Contents/Frameworks/QtXmlPatterns.framework/Versions/5/QtXmlPatterns",
"Contents/Frameworks/QtXmlPatterns.framework/QtXmlPatterns",
"Contents/Resources/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.dylib",
"Contents/Resources/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.dylib",
"Contents/Resources/qml/QtQml/StateMachine/libqtqmlstatemachine.dylib",
"Contents/Resources/qml/QtQml/Models.2/libmodelsplugin.dylib",
"Contents/Resources/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.dylib",
"Contents/Resources/qml/Qt/labs/settings/libqmlsettingsplugin.dylib",
"Contents/Resources/qml/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.dylib",
"Contents/Resources/qml/QtQuick.2/libqtquick2plugin.dylib",
"Contents/Resources/qml/QtWebEngine/libqtwebengineplugin.dylib",
"Contents/Resources/qml/QtWebChannel/libdeclarative_webchannel.dylib",
"Contents/Resources/qml/QtMultimedia/libdeclarative_multimedia.dylib",
"Contents/Resources/qml/QtQuick/Extras/libqtquickextrasplugin.dylib",
"Contents/Resources/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.dylib",
"Contents/Resources/qml/QtQuick/PrivateWidgets/libwidgetsplugin.dylib",
"Contents/Resources/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib",
"Contents/Resources/qml/QtQuick/Window.2/libwindowplugin.dylib",
"Contents/Resources/qml/QtQuick/Dialogs/Private/libdialogsprivateplugin.dylib",
"Contents/Resources/qml/QtQuick/Dialogs/libdialogplugin.dylib",
"Contents/Resources/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Material/libqtquickcontrols2materialstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Universal/libqtquickcontrols2universalstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Imagine/libqtquickcontrols2imaginestyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.dylib",
"Contents/Resources/qml/QtQuick/Controls/Styles/Flat/libqtquickextrasflatplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls/libqtquickcontrolsplugin.dylib",
]
# strip off the path
desired_dylibs = [pathlib.PurePath(i).name for i in hifi_dylibs]
QT_BUILD_DIRECTORY = sys.argv[1]
# all files in the qt build directory
found_files = pathlib.Path(QT_BUILD_DIRECTORY).glob('**/*')
# create temp directory
TEMP_DIR_NAME = "backtrace"
if os.path.exists(TEMP_DIR_NAME):
shutil.rmtree(TEMP_DIR_NAME)
os.mkdir(TEMP_DIR_NAME)
# for each file in the build directory (this might take a while)
for f in found_files:
# if this file is desired
if f.name in desired_dylibs:
# run the file command on this file to determine what kind of file it is.
result = subprocess.run(['file', f], stdout=subprocess.PIPE)
# if this file is a dylib
if re.match(".*Mach-O 64-bit dynamically linked shared library x86_64", str(result.stdout)):
dst_dylib = pathlib.PurePath(TEMP_DIR_NAME, f.name)
dst_dsym = pathlib.PurePath(TEMP_DIR_NAME, f.stem + ".dSYM")
# generate a dSYM file for this dylib in the temp folder
subprocess.run(['dsymutil', f, '-o', dst_dsym])
# copy dylib into the temp folder
cp(f, dst_dylib)

View file

@ -0,0 +1,132 @@
# Scans the Windows qt-install directory for all known qt dlls used by high fidelity.
# Then copies all matching dlls and pdbs into folder named backtrace.
#
# usage
# python prepare-windows-symbols-for-backrace.py QT_INSTALL_DIR
#
# QT_BUILD_DIR should be the directory where qt is installed after running `jom install` or `nmake install`
# see hifi/tools/qt-builder/README.md for more info
#
import sys
# python 3 script
if (not sys.version_info > (3, 2)):
print("ERROR: REQUIRES Python 3")
quit()
import pathlib
import shutil
import os
import tarfile
def cp(a, b):
print("cp {} {}".format(a, b))
shutil.copyfile(a, b)
# list of all qt dlls used in hifi
hifi_dlls = [
"audioWin7/audio/qtaudio_windows.dll",
"audioWin8/audio/qtaudio_wasapi.dll",
"bearer/qgenericbearer.dll",
"iconengines/qsvgicon.dll",
"imageformats/qgif.dll",
"imageformats/qicns.dll",
"imageformats/qico.dll",
"imageformats/qjpeg.dll",
"imageformats/qsvg.dll",
"imageformats/qtga.dll",
"imageformats/qtiff.dll",
"imageformats/qwbmp.dll",
"imageformats/qwebp.dll",
"mediaservice/dsengine.dll",
"mediaservice/qtmedia_audioengine.dll",
"mediaservice/wmfengine.dll",
"platforminputcontexts/qtvirtualkeyboardplugin.dll",
"platforms/qwindows.dll",
"playlistformats/qtmultimedia_m3u.dll",
"position/qtposition_geoclue.dll",
"position/qtposition_positionpoll.dll",
"position/qtposition_serialnmea.dll",
"qmltooling/qmldbg_debugger.dll",
"qmltooling/qmldbg_inspector.dll",
"qmltooling/qmldbg_local.dll",
"qmltooling/qmldbg_messages.dll",
"qmltooling/qmldbg_native.dll",
"qmltooling/qmldbg_nativedebugger.dll",
"qmltooling/qmldbg_preview.dll",
"qmltooling/qmldbg_profiler.dll",
"qmltooling/qmldbg_quickprofiler.dll",
"qmltooling/qmldbg_server.dll",
"qmltooling/qmldbg_tcp.dll",
"Qt/labs/folderlistmodel/qmlfolderlistmodelplugin.dll",
"Qt/labs/settings/qmlsettingsplugin.dll",
"Qt5Core.dll",
"Qt5Gui.dll",
"Qt5Multimedia.dll",
"Qt5MultimediaQuick.dll",
"Qt5Network.dll",
"Qt5Positioning.dll",
"Qt5Qml.dll",
"Qt5Quick.dll",
"Qt5QuickControls2.dll",
"Qt5QuickTemplates2.dll",
"Qt5RemoteObjects.dll",
"Qt5Script.dll",
"Qt5ScriptTools.dll",
"Qt5SerialPort.dll",
"Qt5Svg.dll",
"Qt5WebChannel.dll",
"Qt5WebEngine.dll",
"Qt5WebEngineCore.dll",
"Qt5WebSockets.dll",
"Qt5Widgets.dll",
"Qt5XmlPatterns.dll",
"QtGraphicalEffects/private/qtgraphicaleffectsprivate.dll",
"QtGraphicalEffects/qtgraphicaleffectsplugin.dll",
"QtMultimedia/declarative_multimedia.dll",
"QtQml/Models.2/modelsplugin.dll",
"QtQml/RemoteObjects/qtqmlremoteobjects.dll",
"QtQml/StateMachine/qtqmlstatemachine.dll",
"QtQuick/Controls/qtquickcontrolsplugin.dll",
"QtQuick/Controls/Styles/Flat/qtquickextrasflatplugin.dll",
"QtQuick/Controls.2/Fusion/qtquickcontrols2fusionstyleplugin.dll",
"QtQuick/Controls.2/Imagine/qtquickcontrols2imaginestyleplugin.dll",
"QtQuick/Controls.2/Material/qtquickcontrols2materialstyleplugin.dll",
"QtQuick/Controls.2/qtquickcontrols2plugin.dll",
"QtQuick/Controls.2/Universal/qtquickcontrols2universalstyleplugin.dll",
"QtQuick/Dialogs/dialogplugin.dll",
"QtQuick/Dialogs/Private/dialogsprivateplugin.dll",
"QtQuick/Extras/qtquickextrasplugin.dll",
"QtQuick/Layouts/qquicklayoutsplugin.dll",
"QtQuick/PrivateWidgets/widgetsplugin.dll",
"QtQuick/Templates.2/qtquicktemplates2plugin.dll",
"QtQuick/Window.2/windowplugin.dll",
"QtQuick/XmlListModel/qmlxmllistmodelplugin.dll",
"QtQuick.2/qtquick2plugin.dll",
"QtWebChannel/declarative_webchannel.dll",
"QtWebEngine/qtwebengineplugin.dll",
"scenegraph/qsgd3d12backend.dll",
"styles/qwindowsvistastyle.dll",
]
# list of desired pdbs, created from hifi_dlls
desired_pdbs = [pathlib.PurePath(i).stem + ".pdb" for i in hifi_dlls]
QT_INSTALL_DIRECTORY = sys.argv[1]
# find all pdb files in the qt build directory
found_pdbs = pathlib.Path(QT_INSTALL_DIRECTORY).glob('**/*.pdb')
# create temp directory
TEMP_DIR_NAME = "backtrace"
if os.path.exists(TEMP_DIR_NAME):
shutil.rmtree(TEMP_DIR_NAME)
os.mkdir(TEMP_DIR_NAME)
# copy all found dlls and pdbs into the temp directory
for pdb in found_pdbs:
if pdb.name in desired_pdbs:
dll = pathlib.PurePath(pdb.parent, pdb.stem + ".dll")
cp(pdb, pathlib.PurePath(TEMP_DIR_NAME, pdb.name))
cp(dll, pathlib.PurePath(TEMP_DIR_NAME, dll.name))