mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02:00
Merge pull request #1049 from JulianGro/qt5.15.2_linux_amd64
Update Ubuntu 18.04 amd64 Qt to 5.15.2
This commit is contained in:
commit
529cf8cfc3
6 changed files with 200 additions and 267 deletions
2
.github/workflows/master_build.yml
vendored
2
.github/workflows/master_build.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
include:
|
||||
- os: ubuntu-18.04
|
||||
build_type: full
|
||||
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
|
||||
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 libsnappy1v5 libwebpdemux2 libwebpmux3
|
||||
fail-fast: false
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
|
|
2
.github/workflows/pr_build.yml
vendored
2
.github/workflows/pr_build.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
build_type: full
|
||||
- os: ubuntu-18.04
|
||||
build_type: full
|
||||
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
|
||||
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 libsnappy1v5 libwebpdemux2 libwebpmux3
|
||||
- os: ubuntu-18.04
|
||||
build_type: android
|
||||
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
|
||||
|
|
|
@ -66,12 +66,8 @@ endif()
|
|||
u_major = int( distro.major_version() )
|
||||
u_minor = int( distro.minor_version() )
|
||||
|
||||
if u_major == 16:
|
||||
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz'
|
||||
elif u_major == 18:
|
||||
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
|
||||
elif u_major == 19 and u_minor == 10:
|
||||
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.6-ubuntu-19.10.tar.xz'
|
||||
if u_major == 18:
|
||||
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz'
|
||||
elif u_major > 19:
|
||||
print("We don't support " + distro.name(pretty=True) + " yet. Perhaps consider helping us out?")
|
||||
raise Exception('LINUX DISTRO IS NOT SUPPORTED YET!!!')
|
||||
|
|
|
@ -56,53 +56,33 @@ https://wiki.qt.io/Jom
|
|||
Install in C:\Jom and add directory to PATH.
|
||||
|
||||
### Linux
|
||||
**TODO: Update this section for Qt 5.15.2**
|
||||
Tested on Ubuntu 16.04 and 18.04.
|
||||
**16.04 NEEDED FOR JENKINS~~ **
|
||||
1. qt5 requirements
|
||||
edit /etc/apt/sources.list (edit as root)
|
||||
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
|
||||
`sudo apt-get update -y`
|
||||
`sudo apt-get upgrade -y`
|
||||
`sudo apt-get build-dep qt5-default -y`
|
||||
1. git >= 1.6
|
||||
Check if needed `git --version`
|
||||
`sudo apt-get install git -y`
|
||||
Verify again
|
||||
1. python
|
||||
Check if needed `python --version` - should return python 2.7.x
|
||||
`sudo apt-get install python -y` (not python 3!)
|
||||
Verify again
|
||||
1. gperf
|
||||
Check if needed `gperf --version`
|
||||
`sudo apt-get install gperf -y`
|
||||
Verify again
|
||||
1. bison and flex
|
||||
Check if needed `flex --version` and `bison --version`
|
||||
`sudo apt-get install flex bison -y`
|
||||
Verify again
|
||||
1. pkg-config (needed for qtwebengine)
|
||||
Check if needed `pkg-config --version`
|
||||
`sudo apt-get install pkg-config -y`
|
||||
Verify again
|
||||
1. OpenGL
|
||||
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 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
|
||||
1. make
|
||||
Check if needed `make --version`
|
||||
`sudo apt-get install make -y`
|
||||
Verify again
|
||||
1. g++
|
||||
Check if needed
|
||||
`g++ --version`
|
||||
`sudo apt-get install g++ -y`
|
||||
Verify again
|
||||
1. dbus-1 (needed for qtwebengine)
|
||||
`sudo apt-get install libdbus-glib-1-dev -y`
|
||||
1. nss (needed for qtwebengine)
|
||||
`sudo apt-get install libnss3-dev -y`
|
||||
On Ubuntu based systems you can just have apt install the dependencies for the qt5-default package:
|
||||
Edit /etc/apt/sources.list (edit as root) and uncomment all source repositories by replacing all `# deb-src` with `deb-src`.
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt build-dep qt5-default
|
||||
```
|
||||
|
||||
2. git >= 1.6
|
||||
3. python 2.7.x
|
||||
4. gperf
|
||||
5. bison and flex
|
||||
6. pkg-config (needed for qtwebengine)
|
||||
7. OpenGL
|
||||
8. make
|
||||
9. g++
|
||||
10. dbus-1 (needed for qtwebengine)
|
||||
11. nss (needed for qtwebengine)
|
||||
|
||||
On Ubuntu based systems you can install all these dependencies with:
|
||||
```bash
|
||||
sudo apt install git python gperf flex bison pkg-config mesa-utils libgl1-mesa-dev make g++ libdbus-glib-1-dev libnss3-dev
|
||||
```
|
||||
Make sure that python 2.7.x is the system standard by checking if `python --version` returns python 2.7.x
|
||||
|
||||
Qt also provides a dependency list for some major Linux distributions here: https://wiki.qt.io/Building_Qt_5_from_Git#Linux.2FX11
|
||||
|
||||
### Mac
|
||||
1. git >= 1.6
|
||||
|
@ -221,67 +201,80 @@ Zip up this directory and upload it to Backtrace or other crash log handlng tool
|
|||
|
||||
|
||||
### Linux
|
||||
**TODO: Update this section for Qt 5.15.2**
|
||||
|
||||
#### Preparing source files
|
||||
`git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
|
||||
|
||||
* Copy the **patches** folder to qt5
|
||||
* Apply patches to Qt
|
||||
`cd qt5`
|
||||
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
|
||||
`git apply --ignore-space-change --ignore-whitespace patches/qtscript-crash-fix.patch`
|
||||
`cd ..`
|
||||
```bash
|
||||
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.15.2 --single-branch
|
||||
```
|
||||
|
||||
#### Configuring
|
||||
`mkdir qt5-install`
|
||||
`mkdir qt5-build`
|
||||
`cd qt5-build`
|
||||
```bash
|
||||
mkdir qt5-install
|
||||
mkdir qt5-build
|
||||
cd qt5-build
|
||||
```
|
||||
|
||||
*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`
|
||||
**TODO: Remove `-skip qtspeech`**
|
||||
amd64:
|
||||
```bash
|
||||
../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++-64 -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install
|
||||
```
|
||||
If libX11 or libGL aren't found, you will need to manually provide those locations. Search for `libX11.so` and `libGL.so` respectively and provide paths to their folders inside `qt5/qtbase/mkdspecs/linux-g++-64/qmake.conf`.
|
||||
On Ubuntu 18.04 both are in `/usr/lib/x86_64-linux-gnu`
|
||||
|
||||
*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`
|
||||
**TODO: Remove `-skip qtspeech`**
|
||||
|
||||
|
||||
???`../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`
|
||||
aarch64:
|
||||
```bash
|
||||
../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++ -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-icu -prefix ../qt5-install
|
||||
```
|
||||
You can accelerate the build process by installing some of the optional system dependencies.
|
||||
|
||||
#### Make
|
||||
`make`
|
||||
Replace `4` with the number of threads you want to use. Keep in mind that the Qt build process uses a lot of memory. It is recommended to have at least 1.2 GiB per thread.
|
||||
```bash
|
||||
NINJAFLAGS='-j4' make -j4
|
||||
```
|
||||
|
||||
????*Ubuntu 18.04 only*
|
||||
????`make module-qtwebengine`
|
||||
????`make module-qtscript`
|
||||
On some systems qtscript, qtwebengine, qtwebchannel and qtspeech will be build by `make` without you manually specifying it, while others require you to build modules individually.
|
||||
Check the folders of each needed module for binary files, to make sure that they have actually been built.
|
||||
If a module has not been built, make the module "manually":
|
||||
```bash
|
||||
make -j4 module-qtscript
|
||||
NINJAFLAGS='-j4' make -j4 module-qtwebengine
|
||||
make -j4 module-qtspeech
|
||||
make -j4 module-qtwebchannel
|
||||
```
|
||||
|
||||
*Both*
|
||||
`make install`
|
||||
Now Qt can be installed to qt5-install:
|
||||
```bash
|
||||
make -j4 install
|
||||
```
|
||||
|
||||
If some modules were missing in previous steps, it is needed to install them individually as well:
|
||||
```bash
|
||||
cd qtwebengine
|
||||
make -j4 install
|
||||
cd ../qtscript
|
||||
make -j4 install
|
||||
cd ../qtspeech
|
||||
make -j4 install
|
||||
cd ../qtwebchannel
|
||||
make -j4 install
|
||||
```
|
||||
If one of the make commands fails, running it a second time sometimes clears the issue.
|
||||
|
||||
#### 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)
|
||||
`cd ../qt5-install`
|
||||
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
|
||||
1. Copy *qt.conf* to *qt5-install\bin*
|
||||
```bash
|
||||
cd ../qt5-install
|
||||
find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
||||
```
|
||||
2. Copy *qt.conf* to *qt5-install\bin*
|
||||
|
||||
#### Uploading
|
||||
*Ubuntu 16.04*
|
||||
1. Return to the home folder
|
||||
`cd ..`
|
||||
1. Open a python 3 shell
|
||||
`python3`
|
||||
1. Run the following snippet:
|
||||
`import os`
|
||||
`import tarfile`
|
||||
`filename=tarfile.open("qt5-install.tar.gz", "w:gz")`
|
||||
`filename.add("qt5-install", os.path.basename("qt5-install"))`
|
||||
`exit()`
|
||||
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04
|
||||
1. Tar and xz qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture.
|
||||
```bash
|
||||
tar -Jcvf qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz qt5-install
|
||||
```
|
||||
2. Upload qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz to https://athena-public.s3.amazonaws.com/dependencies/vcpkg/
|
||||
|
||||
*Ubuntu 18.04*
|
||||
``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
|
||||
|
||||
|
||||
### Mac
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
|
||||
index ad87cb0..54ed18a 100644
|
||||
--- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
|
||||
+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
|
||||
@@ -117,6 +117,8 @@ QOpenSLESAudioInput::QOpenSLESAudioInput(const QByteArray &device)
|
||||
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_CAMCORDER;
|
||||
else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_RECOGNITION) == 0)
|
||||
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION;
|
||||
+ else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_COMMUNICATION) == 0)
|
||||
+ m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION;
|
||||
else
|
||||
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_GENERIC;
|
||||
#endif
|
||||
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
|
||||
index ad84db0..35cc379 100644
|
||||
--- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
|
||||
+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
|
||||
@@ -50,6 +50,7 @@
|
||||
#define QT_ANDROID_PRESET_MIC "mic"
|
||||
#define QT_ANDROID_PRESET_CAMCORDER "camcorder"
|
||||
#define QT_ANDROID_PRESET_VOICE_RECOGNITION "voicerecognition"
|
||||
+#define QT_ANDROID_PRESET_VOICE_COMMUNICATION "voicecommunication"
|
||||
|
||||
#endif
|
||||
|
||||
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
|
||||
index 1a16cc2..2577fb3 100644
|
||||
--- a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
|
||||
+++ b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
|
||||
@@ -114,7 +114,8 @@ QList<QByteArray> QOpenSLESEngine::availableDevices(QAudio::Mode mode) const
|
||||
#ifdef ANDROID
|
||||
devices << QT_ANDROID_PRESET_MIC
|
||||
<< QT_ANDROID_PRESET_CAMCORDER
|
||||
- << QT_ANDROID_PRESET_VOICE_RECOGNITION;
|
||||
+ << QT_ANDROID_PRESET_VOICE_RECOGNITION
|
||||
+ << QT_ANDROID_PRESET_VOICE_COMMUNICATION;
|
||||
#else
|
||||
devices << "default";
|
||||
#endif
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/qtscript/src/script/api/qscriptengine.cpp b/qtscript/src/script/api/qscriptengine.cpp
|
||||
index c5f437b..942833e 100644
|
||||
--- a/qtscript/src/script/api/qscriptengine.cpp
|
||||
+++ b/qtscript/src/script/api/qscriptengine.cpp
|
||||
@@ -1332,8 +1332,10 @@ void QScriptEnginePrivate::collectGarbage()
|
||||
|
||||
void QScriptEnginePrivate::reportAdditionalMemoryCost(int size)
|
||||
{
|
||||
- if (size > 0)
|
||||
+ if (size > 0) {
|
||||
+ QScript::APIShim shim(this);
|
||||
globalData->heap.reportExtraMemoryCost(size);
|
||||
+ }
|
||||
}
|
||||
|
||||
QScript::TimeoutCheckerProxy *QScriptEnginePrivate::timeoutChecker() const
|
Loading…
Reference in a new issue