Opened 2 years ago
Closed 2 years ago
#17476 closed enhancement (fixed)
qt5-5.15.8
Reported by: | Bruce Dubbs | Owned by: | pierre |
---|---|---|---|
Priority: | normal | Milestone: | 11.3 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
New point version.
Change History (9)
comment:1 by , 2 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 2 years ago
comment:3 by , 2 years ago
Generating the patch is messier with this version: some submodule versions seem to be wrong in the 5.15.8-lts-lgpl tag in the kde repository. Here is the procedure I've used:
git clone https://invent.kde.org/qt/qt/qt5.git cd qt5 git checkout origin/kde/5.15
Git warns about being in "detached head" state. This is not a problem... Then I do a first diff without initializing the submodules. This allow to get a list of submodules to be initialized (there may be simpler methods, but not sure):
git diff v5.15.8-lts-lgpl..origin/kde/5.15 --submodule=diff | tee ../list
Then the file ../list
contains lines of the form:
Submodule qtbase 4ee4fc18...9cf586d6 (commits not present)
Edit this file to keep only the submodule names (one per line), and remove qtpim
, qtscript
and qtwebengine
(those shouldn't be in the patch). Then I run:
cat ../list | while read s; do git submodule init $s git submodule update $s done
The patch is very big because the qtbase third party freetype and zlib repo are updated. This is not necessary since we use system packages for those. So I decided to bite the bullet and remove everything about freetype and zlib. I first generate the patch:
git diff v5.15.8-lts-lgpl..origin/kde/5.15 --submodule=diff | tee ../temp.patch
Then I edit the patch. Search the first line containing freetype
, and mark it (vi
command ma
). Go to the end of the file and search backward the last line containing freetype. Unfortunately, it is not the good one. search further up, until finding a "+++" line. go down until one line above the next "diff" line, then type d'a
. This removes 58378 lines! Do the same for zlib. 13738 more lines are removed.
Then there is a mimetype database that we don't need either, since we have one on the system. Go to the first line containing freedesktop.org.xml
, mark it, then go to the next "diff --git" line, back one line, then type delete until mark. 40781 less lines... The patch size is still ~540KB. But it is harder to know what to remove without removing important changes.
Don't forget to test whether the patch applies cleanly to a fresh extracted tarball :) Rename it and edit it to add a header.
comment:4 by , 2 years ago
Hmmm, now there is an error:
In file included from /sources/qt5/qt-everywhere-src-5.15.8/qtbase/include/QtCore/qmutex.h:1, from /sources/qt5/qt-everywhere-src-5.15.8/qtbase/src/corelib/global/qglobal.cpp:57: /sources/qt5/qt-everywhere-src-5.15.8/qtbase/include/QtCore/../../src/corelib/thread/qmutex.h:45:10: fatal error: QtCore/qtsan_impl.h: No such file or directory 45 | #include <QtCore/qtsan_impl.h> | ^~~~~~~~~~~~~~~~~~~~~
comment:5 by , 2 years ago
I think I've found the reason. When configure is run in a git repository, it runs a perl script that creates one line header files pointing to true header files. The problem here is that the real header file qtsan_impl.h
is created in qtbase/src/corelib/thread by the patch, instead of qtbase/include/QtCore as expected by the program that fails to compile. In a git repository, the perl script would create a one line header in qtbase/include/QtCore that would include the one in qtbase/src/corelib/thread. But here, we apply a patch from the repository to a tarball which is not a git repo. So the perl script is not run. This can be cured by creating the one line header ourselves:
echo '#include "../../src/corelib/thread/qtsan_impl.h"' >qtbase/include/QtCore/qtsan_impl.h
This allows the build to pass, and this is what would be done in a git repo, so I think it is the right thing to do.
comment:7 by , 2 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The QtCore/qtsan_impl.h header is needed by QtCore/qmutex.h, but is not installed by the above procedure. This leads to a failure in kf5 when building Attica... Reopening.
Instead of just creating the one liner, another solution is to put a .git directory (I hope that putting only an empty one is enough) in qtbase, so that the perl script (syncqt.pl) is run. Let me try this one.
comment:8 by , 2 years ago
Creating a .git directory in qtbase seems to be enough for the header to be installed at the right place. Magic!
comment:9 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
New instructions added at d0c60491
Release notes at https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/5.15.8/release-note.md