-
Notifications
You must be signed in to change notification settings - Fork 7
Qt6 + CMake migration #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
It now depends on Edit: I forgot to say I'm running Ubuntu 24.04.3 LTS Noble Numbat. |
build-qt.sh
Outdated
| -DFEATURE_formlayout=OFF | ||
| -DFEATURE_fscompleter=OFF | ||
| -DFEATURE_future=OFF | ||
| -DFEATURE_gc_binaries=OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the same as -gc-binaries, it should be ON to reduce size:
According to https://doc.qt.io/qt-6/build-optimized-qt.html:
-gc-binaries
Remove unnecessary parts from binary. Place each function or data item into its own section and enable linker garbage collection of unused sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. gc-binaries + reduce-exports shaved off 1.8M.
|
I get this: |
I guess the "remove an unused include" commit from |
|
That was that, thanks! |
|
Out of curiosity, I tried building Qt without OpenGL, to see if that would save space. The updater builds and runs this way but that looks ugly: curves are aliased, and some background color on configuration dialog is wrong. |
That's annoying: when that dependency isn't there, Qt6 doesn't build, but we cannot ship an updater requiring it. On Ubuntu 24.04 that dependency is not installed by default, and is required by only 8 softwares! That means no one have this dependency installed on Ubuntu LTS! Maybe we will have to build it statically. |
The Qt Quick documentation says that some effects are expected not to display if software rendering is used. Also I get high CPU usage in that mode (for me it happens when I run the app from a container that lacks some support libs).
Ouch. It seems Qt 6 has the opposite problem of Qt 5, which had too few hard requirements and ended up not displaying properly on the initial attempt to upgrade to Bullseye. There is an extensive list of libs for the test named |
|
I now have a version that statically links against the libxcb-XXX libraries from Debian. |
|
Excellent! |
|
Some minor changes that live in a local branch of mine:
RUN apt-get update \
&& apt-get install -y \
autoconf \
autopoint \
ca-certificates \
curl \
gettext \
git \
g++ \
libgl1-mesa-dev \
libtool \
libx11-xcb-dev \
libxcb-glx0-dev \
libxkbcommon-x11-dev \
make \
ninja-build \
perl \
p7zip-full \
pkg-config \
python \
xz-utils \
zlib1g-dev \
$XCB_MINIMUM_PACKAGES \
&& echo 'deb https://archive.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -y \
cmake/bullseye-backports \
&& apt-get cleanIt installs explicitely I also have a patch that moves the Aria build before the Qt build, so anytime Qt changes are made, the whole build is faster because modifying the Qt build doesn't invalidate the Aria build because of ordering. I had a third patch adding |
|
I don't know if that's bad or not, but Qt links against |
|
Doing this makes sure the shared lib is always used for RUN ls /usr/lib/x86_64-linux-gnu/libxcb-*.so | grep -v xcb-xkb | xargs rm -v |
|
The input part is where Qt has a bundled one that we can try. |
|
The backports list file was removed: Also I noticed the backport url could use http, making it possible to be fetched before installing That That's doable: RUN echo 'deb http://archive.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -y \
autoconf \
autopoint \
curl \
gettext \
git \
g++ \
libgl1-mesa-dev \
libtool \
libx11-xcb-dev \
libxcb-glx0-dev \
libxkbcommon-x11-dev \
make \
ninja-build \
perl \
p7zip-full \
pkg-config \
python \
xz-utils \
zlib1g-dev \
$XCB_MINIMUM_PACKAGES \
&& apt-get install -y \
cmake/bullseye-backports \
&& apt-get clean |
aa400d7 to
780eba1
Compare
|
The commit RUN ./config --prefix=/openssl --openssldir=/dev/null no-shared no-apps no-autoload-config no-capieng no-dso no-dynamic-engine no-engine no-loadereng no-module -Os |
Dockerfile
Outdated
| # Note: {foo:+bar} here is a syntax of the Dockerfile, not the shell! | ||
| ENV IPO_ARG=${release:+-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON} | ||
| RUN echo IPO_ARG ${IPO_ARG} | ||
| RUN BUILDQT_CMAKE_ARGS="${IPO_ARG} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -DFEATURE_reduce_relocations=OFF" CXXFLAGS='-fno-pic -no-pie' CFLAGS='-fno-pic -no-pie' PKG_CONFIG_PATH=/openssl/lib64/pkgconfig ./build-qt.sh && mv qt /qt && rm -rf /build-qt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-DCMAKE_POSITION_INDEPENDENT_CODE=OFF ${IPO_ARG} instead of ${IPO_ARG} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${IPO_ARG} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF always disable IPO.
Fixed |
|
There is now a Windows build, which seems to work in non-release mode. (But if you pass |
|
Fixed issue with the app not exiting when all windows are closed. Also added the toolchain file for MinGW which I forgot to add before. |
Thanks a lot! |
also switch to ninja
Will be needed for Qt 6 since the Bullseye mingw gcc is too old (no <future>). Anyway there is no reason not to use the newest compiler for Windows builds.
Now the submodule ref can be used as-is Clean up some Fluid hackiness.
|
Finally got the modal dialog thing. Turns out it is not implemented for "non-native" dialogs until Qt 6.10. The Debian distro libraries used "native" dialogs so that's why the problem could not be reproduced there. I tried building with version 6.10 but then the dialog wouldn't open at all. So I backported the commit to 6.8.
Fixed |
|
You may be interested in my |
|
I see no difference with “Continue reading”. |
|
Maybe it would be better to just test |
Never mind, I don't think it was in there either. Pushed both |
|
This is starting to look (the PR) very good! |
|
About fontconfig support, I noticed we require it on Linux to be able to render the names of the user's folders in the install directory picker window. We not only have to render our blog posts, we also have to render any character in a file path on user's computers. |
|
Another regression spotted: when we hover the “Continue reading” link, the mouse pointer doesn't turn into a finger pointing hand. |
Requires the
updater-wipbranch from https://github.com/slipher/fluid.There are two branches. This one,
slipher/qt6, includes only the commits that are supposed to be related to Qt6 migration. The other oneslipher/qt6-combinedrepresents the actual working copy I am using which includes some other commits.Upgrade from Qt 5.14 to 6.8; migrate from qmake to cmake; update Fluid by a lot which requires some migrations; also update Quazip which didn't require any migrations.
Current issues:
D-Bus is disabled. I think we use that for having the task icon blink when the download finishes.