* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
@ 2023-02-20 9:50 ` Johnnynator
2023-02-22 15:35 ` sgn
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Johnnynator @ 2023-02-20 9:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
New comment by Johnnynator on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1436653081
Comment:
*argh* I hoped we could bury qmake together with qt5 and never look at it again
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
2023-02-20 9:50 ` Johnnynator
@ 2023-02-22 15:35 ` sgn
2023-02-22 16:05 ` sgn
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-02-22 15:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1440268630
Comment:
> cross-compiling any Qt6 qmake package quickly results in something like:
> make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop.
That doesn't seems right:
```
$ /usr/lib/qt6/bin/qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/usr
QT_INSTALL_ARCHDATA:/usr/lib/qt6
QT_INSTALL_DATA:/usr/share/qt6
QT_INSTALL_DOCS:/usr/share/qt6/doc
QT_INSTALL_HEADERS:/usr/include/qt6
QT_INSTALL_LIBS:/usr/lib
QT_INSTALL_LIBEXECS:/usr/lib/qt6/libexec
QT_INSTALL_BINS:/usr/lib/qt6/bin
QT_INSTALL_TESTS:/usr/lib/qt6/tests
QT_INSTALL_PLUGINS:/usr/lib/qt6/plugins
QT_INSTALL_QML:/usr/lib/qt6/qml
QT_INSTALL_TRANSLATIONS:/usr/share/qt6/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:/usr/lib/qt6/examples
QT_INSTALL_DEMOS:/usr/lib/qt6/examples
QT_HOST_PREFIX:/usr
QT_HOST_DATA:/usr/lib/qt6
QT_HOST_BINS:/usr/lib/qt6/bin
QT_HOST_LIBEXECS:/usr/lib/qt6/libexec
QT_HOST_LIBS:/usr/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:6.4.2
$ /usr/arm-linux-musleabihf/usr/lib/qt6/bin/qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/usr/arm-linux-musleabihf/usr
QT_INSTALL_ARCHDATA:/usr/arm-linux-musleabihf/usr
QT_INSTALL_DATA:/usr/arm-linux-musleabihf/usr
QT_INSTALL_DOCS:/usr/arm-linux-musleabihf/usr/doc
QT_INSTALL_HEADERS:/usr/arm-linux-musleabihf/usr/include
QT_INSTALL_LIBS:/usr/arm-linux-musleabihf/usr/lib
QT_INSTALL_LIBEXECS:/usr/arm-linux-musleabihf/usr/libexec
QT_INSTALL_BINS:/usr/arm-linux-musleabihf/usr/bin
QT_INSTALL_TESTS:/usr/arm-linux-musleabihf/usr/tests
QT_INSTALL_PLUGINS:/usr/arm-linux-musleabihf/usr/plugins
QT_INSTALL_QML:/usr/arm-linux-musleabihf/usr/qml
QT_INSTALL_TRANSLATIONS:/usr/arm-linux-musleabihf/usr/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:/usr/arm-linux-musleabihf/usr/examples
QT_INSTALL_DEMOS:/usr/arm-linux-musleabihf/usr/examples
QT_HOST_PREFIX:/usr/arm-linux-musleabihf/usr
QT_HOST_DATA:/usr/arm-linux-musleabihf/usr/lib/qt6
QT_HOST_BINS:/usr/arm-linux-musleabihf/usr/lib/qt6/bin
QT_HOST_LIBEXECS:/usr/arm-linux-musleabihf/usr/lib/qt6/libexec
QT_HOST_LIBS:/usr/arm-linux-musleabihf/usr/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:6.4.2
```
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
2023-02-20 9:50 ` Johnnynator
2023-02-22 15:35 ` sgn
@ 2023-02-22 16:05 ` sgn
2023-02-22 16:10 ` sgn
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-02-22 16:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1440317101
Comment:
OK, I found a fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (2 preceding siblings ...)
2023-02-22 16:05 ` sgn
@ 2023-02-22 16:10 ` sgn
2023-03-01 13:09 ` [PR PATCH] [Updated] " JamiKettunen
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-02-22 16:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1440317101
Comment:
OK, I found a fix (for shipped qt6-qmake).
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (3 preceding siblings ...)
2023-02-22 16:10 ` sgn
@ 2023-03-01 13:09 ` JamiKettunen
2023-03-01 13:10 ` JamiKettunen
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: JamiKettunen @ 2023-03-01 13:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]
There is an updated pull request by JamiKettunen against master on the void-packages repository
https://github.com/JamiKettunen/void-packages qt6-qmake
https://github.com/void-linux/void-packages/pull/42354
build-style/qmake: add support for Qt6
<!-- Uncomment relevant sections and delete options which are not applicable -->
There's a big problem: cross-compiling any Qt6 `qmake` package quickly results in something like:
```
make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop.
```
Native builds still work as expected however already. For a testing tree see [my `qt6-qmake-demo` tree](https://github.com/JamiKettunen/void-packages/commits/qt6-qmake-demo) and try e.g. `./xbps-src pkg qt6-qpa-hwcomposer-plugin` vs `./xbps-src pkg -a aarch64 qt6-qpa-hwcomposer-plugin` on a glibc masterdir.
As per https://forum.qt.io/topic/137300/qtpaths-return-incorrect-path `ln -s /usr/lib/qt6/libexec/moc /usr/libexec/moc` would probably work as a really ugly hack, but is there someone around (perhaps @Johnnynator?) who knows how this could be fixed properly, and maybe even upstream? Here's a few other places where the same error can be seen:
- https://community.nxp.com/t5/i-MX-Processors/Imx8mp-cmake-creat-qt6-project-with-an-error-usr-libexec-moc-no/m-p/1567183
- https://gobolinux.discourse.group/t/system-index-libexec-is-empty-issue/101
There's also no `qt6-doc` package (compared to `qt5-doc`) or `qt6-examples` subpackage (compared to `qt5-examples`) but those could just be ignored I suppose
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/42354.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6-qmake-42354.patch --]
[-- Type: text/x-diff, Size: 5591 bytes --]
From ec7f8968749641a6fb4c0138bafcca188fba1294 Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 20 Feb 2023 01:06:51 +0200
Subject: [PATCH] build-style/qmake: add support for Qt6
---
common/build-style/qmake.sh | 63 +++++++++++++++++++++----------------
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh
index 486bb0644380..efca7789bf14 100644
--- a/common/build-style/qmake.sh
+++ b/common/build-style/qmake.sh
@@ -4,13 +4,18 @@
do_configure() {
local qmake
local qmake_args
+ local qt
if [ -x "/usr/lib/qt5/bin/qmake" ]; then
qmake="/usr/lib/qt5/bin/qmake"
+ qt="qt5"
+ elif [ -x "/usr/lib/qt6/bin/qmake" ]; then
+ qmake="/usr/lib/qt6/bin/qmake"
+ qt="qt6"
fi
if [ -z "${qmake}" ]; then
msg_error "${pkgver}: Could not find qmake - missing in hostmakedepends?\n"
fi
- if [ "$CROSS_BUILD" ] && [ "$qmake" == "/usr/lib/qt5/bin/qmake" ]; then
+ if [ "$CROSS_BUILD" ]; then
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
x86_64*) _qt_arch=x86_64;;
@@ -26,13 +31,13 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
-QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/modules
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
+QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
@@ -49,7 +54,7 @@ QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
- echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
+ echo "#include \"${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
mkdir -p "${wrksrc}/.host-spec/linux-g++"
cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<_EOF
@@ -57,12 +62,12 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
QMAKE_CC = ${CC_host}
QMAKE_CXX = ${CXX_host}
QMAKE_LINK = ${CXX_host}
@@ -79,28 +84,32 @@ QMAKE_CXXFLAGS = ${CXXFLAGS_host}
QMAKE_LFLAGS = ${LDFLAGS_host}
load(qt_config)
_EOF
-echo '#include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
+echo '#include "/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
+ # FIXME:
+ # - package cross-builds fail fast with "make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop."
+ # - Qt6 docs not @ usr/share/doc/qt6 (no qt6-doc package)!
+ # - Qt6 examples @ usr/share/qt6/examples (no qt6-examples subpackage)!
cat > "${wrksrc}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=/usr
-ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5
-Data=${XBPS_CROSS_BASE}/usr/share/qt5
-Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5
-Headers=${XBPS_CROSS_BASE}/usr/include/qt5
+ArchData=${XBPS_CROSS_BASE}/usr/lib/${qt}
+Data=${XBPS_CROSS_BASE}/usr/share/${qt}
+Documentation=${XBPS_CROSS_BASE}/usr/share/doc/${qt}
+Headers=${XBPS_CROSS_BASE}/usr/include/${qt}
Libraries=${XBPS_CROSS_BASE}/usr/lib
-LibraryExecutables=/usr/lib/qt5/libexec
-Binaries=/usr/lib/qt5/bin
+LibraryExecutables=/usr/lib/${qt}/libexec
+Binaries=/usr/lib/${qt}/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
-Plugins=/usr/lib/qt5/plugins
-Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports
-Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml
-Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations
+Plugins=/usr/lib/${qt}/plugins
+Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/imports
+Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/qml
+Translations=${XBPS_CROSS_BASE}/usr/share/${qt}/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
-Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples
+Examples=${XBPS_CROSS_BASE}/usr/share/${qt}/examples
HostPrefix=/usr
-HostData=/usr/lib/qt5
-HostBinaries=/usr/lib/qt5/bin
+HostData=/usr/lib/${qt}
+HostBinaries=/usr/lib/${qt}/bin
HostLibraries=/usr/lib
Spec=${wrksrc}/.host-spec/linux-g++
TargetSpec=${wrksrc}/.target-spec/linux-g++
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (4 preceding siblings ...)
2023-03-01 13:09 ` [PR PATCH] [Updated] " JamiKettunen
@ 2023-03-01 13:10 ` JamiKettunen
2023-03-01 13:15 ` sgn
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: JamiKettunen @ 2023-03-01 13:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
New comment by JamiKettunen on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1450132395
Comment:
@sgn The crossbuild issue still persists on my end, not sure if anything regarding the `qt6-qmake` fix got merged yet?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (5 preceding siblings ...)
2023-03-01 13:10 ` JamiKettunen
@ 2023-03-01 13:15 ` sgn
2023-03-01 13:16 ` sgn
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-03-01 13:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 187 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1450139621
Comment:
You need `HostLibraryExecutable`, see `sip-build`
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (6 preceding siblings ...)
2023-03-01 13:15 ` sgn
@ 2023-03-01 13:16 ` sgn
2023-03-01 14:34 ` [PR PATCH] [Updated] " JamiKettunen
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-03-01 13:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/42354#issuecomment-1450139621
Comment:
You need `HostLibraryExecutables`, see `sip-build`
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (7 preceding siblings ...)
2023-03-01 13:16 ` sgn
@ 2023-03-01 14:34 ` JamiKettunen
2023-03-01 17:58 ` JamiKettunen
2023-03-02 0:52 ` [PR PATCH] [Merged]: " sgn
10 siblings, 0 replies; 12+ messages in thread
From: JamiKettunen @ 2023-03-01 14:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]
There is an updated pull request by JamiKettunen against master on the void-packages repository
https://github.com/JamiKettunen/void-packages qt6-qmake
https://github.com/void-linux/void-packages/pull/42354
build-style/qmake: add support for Qt6
<!-- Uncomment relevant sections and delete options which are not applicable -->
There's a big problem: cross-compiling any Qt6 `qmake` package quickly results in something like:
```
make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop.
```
Native builds still work as expected however already. For a testing tree see [my `qt6-qmake-demo` tree](https://github.com/JamiKettunen/void-packages/commits/qt6-qmake-demo) and try e.g. `./xbps-src pkg qt6-qpa-hwcomposer-plugin` vs `./xbps-src pkg -a aarch64 qt6-qpa-hwcomposer-plugin` on a glibc masterdir.
As per https://forum.qt.io/topic/137300/qtpaths-return-incorrect-path `ln -s /usr/lib/qt6/libexec/moc /usr/libexec/moc` would probably work as a really ugly hack, but is there someone around (perhaps @Johnnynator?) who knows how this could be fixed properly, and maybe even upstream? Here's a few other places where the same error can be seen:
- https://community.nxp.com/t5/i-MX-Processors/Imx8mp-cmake-creat-qt6-project-with-an-error-usr-libexec-moc-no/m-p/1567183
- https://gobolinux.discourse.group/t/system-index-libexec-is-empty-issue/101
There's also no `qt6-doc` package (compared to `qt5-doc`) or `qt6-examples` subpackage (compared to `qt5-examples`) but those could just be ignored I suppose
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/42354.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6-qmake-42354.patch --]
[-- Type: text/x-diff, Size: 5644 bytes --]
From 4032ac6e140bc2eab2ac8a89863023b45e5bc535 Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 20 Feb 2023 01:06:51 +0200
Subject: [PATCH] build-style/qmake: add support for Qt6
---
common/build-style/qmake.sh | 64 +++++++++++++++++++++----------------
1 file changed, 37 insertions(+), 27 deletions(-)
diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh
index 486bb0644380..bf8527ba9a7f 100644
--- a/common/build-style/qmake.sh
+++ b/common/build-style/qmake.sh
@@ -4,13 +4,18 @@
do_configure() {
local qmake
local qmake_args
+ local qt
if [ -x "/usr/lib/qt5/bin/qmake" ]; then
qmake="/usr/lib/qt5/bin/qmake"
+ qt="qt5"
+ elif [ -x "/usr/lib/qt6/bin/qmake" ]; then
+ qmake="/usr/lib/qt6/bin/qmake"
+ qt="qt6"
fi
if [ -z "${qmake}" ]; then
msg_error "${pkgver}: Could not find qmake - missing in hostmakedepends?\n"
fi
- if [ "$CROSS_BUILD" ] && [ "$qmake" == "/usr/lib/qt5/bin/qmake" ]; then
+ if [ "$CROSS_BUILD" ]; then
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
x86_64*) _qt_arch=x86_64;;
@@ -26,13 +31,13 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
-QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/modules
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
+QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
@@ -49,7 +54,7 @@ QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
- echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
+ echo "#include \"${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
mkdir -p "${wrksrc}/.host-spec/linux-g++"
cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<_EOF
@@ -57,12 +62,12 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
QMAKE_CC = ${CC_host}
QMAKE_CXX = ${CXX_host}
QMAKE_LINK = ${CXX_host}
@@ -79,29 +84,34 @@ QMAKE_CXXFLAGS = ${CXXFLAGS_host}
QMAKE_LFLAGS = ${LDFLAGS_host}
load(qt_config)
_EOF
-echo '#include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
+echo '#include "/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
+ # FIXME:
+ # - package cross-builds fail fast with "make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop."
+ # - Qt6 docs not @ usr/share/doc/qt6 (no qt6-doc package)!
+ # - Qt6 examples @ usr/share/qt6/examples (no qt6-examples subpackage)!
cat > "${wrksrc}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=/usr
-ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5
-Data=${XBPS_CROSS_BASE}/usr/share/qt5
-Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5
-Headers=${XBPS_CROSS_BASE}/usr/include/qt5
+ArchData=${XBPS_CROSS_BASE}/usr/lib/${qt}
+Data=${XBPS_CROSS_BASE}/usr/share/${qt}
+Documentation=${XBPS_CROSS_BASE}/usr/share/doc/${qt}
+Headers=${XBPS_CROSS_BASE}/usr/include/${qt}
Libraries=${XBPS_CROSS_BASE}/usr/lib
-LibraryExecutables=/usr/lib/qt5/libexec
-Binaries=/usr/lib/qt5/bin
+LibraryExecutables=/usr/lib/${qt}/libexec
+Binaries=/usr/lib/${qt}/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
-Plugins=/usr/lib/qt5/plugins
-Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports
-Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml
-Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations
+Plugins=/usr/lib/${qt}/plugins
+Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/imports
+Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/qml
+Translations=${XBPS_CROSS_BASE}/usr/share/${qt}/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
-Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples
+Examples=${XBPS_CROSS_BASE}/usr/share/${qt}/examples
HostPrefix=/usr
-HostData=/usr/lib/qt5
-HostBinaries=/usr/lib/qt5/bin
+HostData=/usr/lib/${qt}
+HostBinaries=/usr/lib/${qt}/bin
HostLibraries=/usr/lib
+HostLibraryExecutables=/usr/lib/${qt}/libexec
Spec=${wrksrc}/.host-spec/linux-g++
TargetSpec=${wrksrc}/.target-spec/linux-g++
_EOF
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (8 preceding siblings ...)
2023-03-01 14:34 ` [PR PATCH] [Updated] " JamiKettunen
@ 2023-03-01 17:58 ` JamiKettunen
2023-03-02 0:52 ` [PR PATCH] [Merged]: " sgn
10 siblings, 0 replies; 12+ messages in thread
From: JamiKettunen @ 2023-03-01 17:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]
There is an updated pull request by JamiKettunen against master on the void-packages repository
https://github.com/JamiKettunen/void-packages qt6-qmake
https://github.com/void-linux/void-packages/pull/42354
build-style/qmake: add support for Qt6
<!-- Uncomment relevant sections and delete options which are not applicable -->
There's no `qt6-doc` package (compared to `qt5-doc`) or `qt6-examples` subpackage (compared to `qt5-examples`) but those could just be ignored I suppose
~~There's a big problem: cross-compiling any Qt6 `qmake` package quickly results in something like `make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop.`~~
~~Native builds still work as expected however already. For a testing tree see [my `qt6-qmake-demo` tree](https://github.com/JamiKettunen/void-packages/commits/qt6-qmake-demo) and try e.g. `./xbps-src pkg qt6-qpa-hwcomposer-plugin` vs `./xbps-src pkg -a aarch64 qt6-qpa-hwcomposer-plugin` on a glibc masterdir.~~
~~As per https://forum.qt.io/topic/137300/qtpaths-return-incorrect-path `ln -s /usr/lib/qt6/libexec/moc /usr/libexec/moc` would probably work as a really ugly hack, but is there someone around (perhaps @Johnnynator?) who knows how this could be fixed properly, and maybe even upstream? Here's a few other places where the same error can be seen:~~
- ~~https://community.nxp.com/t5/i-MX-Processors/Imx8mp-cmake-creat-qt6-project-with-an-error-usr-libexec-moc-no/m-p/1567183~~
- ~~https://gobolinux.discourse.group/t/system-index-libexec-is-empty-issue/101~~
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/42354.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qt6-qmake-42354.patch --]
[-- Type: text/x-diff, Size: 5363 bytes --]
From 78cb50241766200768da3431d89fc7f0890cf95b Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 20 Feb 2023 01:06:51 +0200
Subject: [PATCH] build-style/qmake: add support for Qt6
---
common/build-style/qmake.sh | 60 ++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 27 deletions(-)
diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh
index 486bb0644380..31745833606e 100644
--- a/common/build-style/qmake.sh
+++ b/common/build-style/qmake.sh
@@ -4,13 +4,18 @@
do_configure() {
local qmake
local qmake_args
+ local qt
if [ -x "/usr/lib/qt5/bin/qmake" ]; then
qmake="/usr/lib/qt5/bin/qmake"
+ qt="qt5"
+ elif [ -x "/usr/lib/qt6/bin/qmake" ]; then
+ qmake="/usr/lib/qt6/bin/qmake"
+ qt="qt6"
fi
if [ -z "${qmake}" ]; then
msg_error "${pkgver}: Could not find qmake - missing in hostmakedepends?\n"
fi
- if [ "$CROSS_BUILD" ] && [ "$qmake" == "/usr/lib/qt5/bin/qmake" ]; then
+ if [ "$CROSS_BUILD" ]; then
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
x86_64*) _qt_arch=x86_64;;
@@ -26,13 +31,13 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
-QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/modules
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
+QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
@@ -49,7 +54,7 @@ QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
- echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
+ echo "#include \"${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
mkdir -p "${wrksrc}/.host-spec/linux-g++"
cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<_EOF
@@ -57,12 +62,12 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
-include(/usr/lib/qt5/mkspecs/common/linux.conf)
-include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
-include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/linux.conf)
+include(/usr/lib/${qt}/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/${qt}/mkspecs/common/g++-unix.conf)
-QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
-QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
+QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qconfig.pri
+QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/qmodule.pri
QMAKE_CC = ${CC_host}
QMAKE_CXX = ${CXX_host}
QMAKE_LINK = ${CXX_host}
@@ -79,29 +84,30 @@ QMAKE_CXXFLAGS = ${CXXFLAGS_host}
QMAKE_LFLAGS = ${LDFLAGS_host}
load(qt_config)
_EOF
-echo '#include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
+echo '#include "/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
cat > "${wrksrc}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=/usr
-ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5
-Data=${XBPS_CROSS_BASE}/usr/share/qt5
-Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5
-Headers=${XBPS_CROSS_BASE}/usr/include/qt5
+ArchData=${XBPS_CROSS_BASE}/usr/lib/${qt}
+Data=${XBPS_CROSS_BASE}/usr/share/${qt}
+Documentation=${XBPS_CROSS_BASE}/usr/share/doc/${qt}
+Headers=${XBPS_CROSS_BASE}/usr/include/${qt}
Libraries=${XBPS_CROSS_BASE}/usr/lib
-LibraryExecutables=/usr/lib/qt5/libexec
-Binaries=/usr/lib/qt5/bin
+LibraryExecutables=/usr/lib/${qt}/libexec
+Binaries=/usr/lib/${qt}/bin
Tests=${XBPS_CROSS_BASE}/usr/tests
-Plugins=/usr/lib/qt5/plugins
-Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports
-Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml
-Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations
+Plugins=/usr/lib/${qt}/plugins
+Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/imports
+Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/${qt}/qml
+Translations=${XBPS_CROSS_BASE}/usr/share/${qt}/translations
Settings=${XBPS_CROSS_BASE}/etc/xdg
-Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples
+Examples=${XBPS_CROSS_BASE}/usr/share/${qt}/examples
HostPrefix=/usr
-HostData=/usr/lib/qt5
-HostBinaries=/usr/lib/qt5/bin
+HostData=/usr/lib/${qt}
+HostBinaries=/usr/lib/${qt}/bin
HostLibraries=/usr/lib
+HostLibraryExecutables=/usr/lib/${qt}/libexec
Spec=${wrksrc}/.host-spec/linux-g++
TargetSpec=${wrksrc}/.target-spec/linux-g++
_EOF
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Merged]: build-style/qmake: add support for Qt6
2023-02-20 1:03 [PR PATCH] build-style/qmake: add support for Qt6 JamiKettunen
` (9 preceding siblings ...)
2023-03-01 17:58 ` JamiKettunen
@ 2023-03-02 0:52 ` sgn
10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2023-03-02 0:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]
There's a merged pull request on the void-packages repository
build-style/qmake: add support for Qt6
https://github.com/void-linux/void-packages/pull/42354
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
There's no `qt6-doc` package (compared to `qt5-doc`) or `qt6-examples` subpackage (compared to `qt5-examples`) but those could just be ignored I suppose
~~There's a big problem: cross-compiling any Qt6 `qmake` package quickly results in something like `make: *** No rule to make target '/usr/libexec/moc', needed by '.moc/main.moc'. Stop.`~~
~~Native builds still work as expected however already. For a testing tree see [my `qt6-qmake-demo` tree](https://github.com/JamiKettunen/void-packages/commits/qt6-qmake-demo) and try e.g. `./xbps-src pkg qt6-qpa-hwcomposer-plugin` vs `./xbps-src pkg -a aarch64 qt6-qpa-hwcomposer-plugin` on a glibc masterdir.~~
~~As per https://forum.qt.io/topic/137300/qtpaths-return-incorrect-path `ln -s /usr/lib/qt6/libexec/moc /usr/libexec/moc` would probably work as a really ugly hack, but is there someone around (perhaps @Johnnynator?) who knows how this could be fixed properly, and maybe even upstream? Here's a few other places where the same error can be seen:~~
- ~~https://community.nxp.com/t5/i-MX-Processors/Imx8mp-cmake-creat-qt6-project-with-an-error-usr-libexec-moc-no/m-p/1567183~~
- ~~https://gobolinux.discourse.group/t/system-index-libexec-is-empty-issue/101~~
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 12+ messages in thread