Skip to contentSkip to conversation

Qt5 qmake infra and per-package compatibility

PATCH New Andreas Naumann 9 participants 98 messages Feb 17, 2020 – Jul 24, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

v6 cover Qt5 qmake infra and per-package compatibility

Hi,
this is a reworked version from my previous effort to convert qt5 packages to a qmake-package infra and then make that infrastructure suitable for per-package builds.

Though combining the two is not strictly necessary, the approach leads to, hopefully, less complicated and more maintainable code. The trick for the generic infra is basically to remove most of the handcrafted target install steps, in favor of relying on the qmake generated install recipes. How this is done has not changed since v4 and what we have agreed on back then. Details in the commits. I have also tried to incorporate the suggestions of the reviews back then, but dont yell at me if I missed some (v4 was march last year).

Now for the testing:
Since "2215b8a75 qt5: disable for static-only builds" it's not possible to build with static library only support, so I didn't test it. However, the patch "qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen" is included in case static libs will be reenabled in the future.

This series is now rebased on master from a few days ago, but most of the testing has been done on top of revision fe033bd 2019-12-15 18:36
FFontaine o package/samba4: fix build without python3.
That version happened to build almost fine with a modified imx6-sabresd_qt5_defconfig (all possible qt packages activated, see below). Afterwards I tried several times to rebuild with newer master version, only to find the build break in some corner cases, which didnt seem to relate to the changes I did. Time and again I ran out of time debugging and fixing those issues.

The aim of my testing was to prove the target and staging results would not differ between sequential build without the patches and a parallelized per-package build with them.

However, there are differences, and they are interesting. To find them I compared the target folders with a rsync dry-run (details below). It actually revealed that some files are missing in the old install method:
- executables of qt5xmlpatterns (if not desired could be removed inside POST_INSTALL_TARGET_HOOKS)
- many plain library links (the ones without any version appendix)
- libQt5Nfc.so* altogether
- NFC examples
- liblocationlabsplugin.so (and some more files from qt5location)

The only files that were missing with the new method are *.prl. Those were explicitly removed in the target-finalize step. This is a little inconsistent with the way the examples are installed (with source, Makefiles and all), so I dont know if it's a issue.

After adding the more complicated package conversions some additional differences inthe target folders become visible:
- webkitqml, webkitwidgets now appear in examples!
- a number of lipi_toolkit libraries appear in the plugins folder (originate in qt5virtualkeyboard)
- QtWebPluginProcess and QtWebProcess appear in /usr/libexec (originate from qt5webkit)
- qtwebengine locales appear in usr/translations/qtwebengine_locales/ instead of usr/translations/qtwebengine_locales/qtwebengine_locales/

However, the majority of target files exists equally in both variants and I was unable to find major inconsistencies.

The same comparison on the host folders showed hardly any difference at all. Unfortunately I didnt keep the output, so I cant provide evidence right now.

Finally, on one occassion I think I observed some kind of race condition in the per-package host assembly. A build would fail complaining about some missing header. I would look for it, find it, restart the build which then happily continued..

Ok, enough for now, regards,
Andreas

Detailed rsync line (grep removes directories from the list):
anaumann at wslxew902-$ rsync -avun --ignore-existing --delete output/target/ ../buildroot-orig/output/target/ | grep -v "/$" sending incremental file list
usr/bin/xmlpatterns
usr/bin/xmlpatternsvalidator
usr/lib/libEnginio.so -> libEnginio.so.1.6.3 usr/lib/libQt53DAnimation.so -> libQt53DAnimation.so.5.12.5 usr/lib/libQt53DCore.so -> libQt53DCore.so.5.12.5 usr/lib/libQt53DExtras.so -> libQt53DExtras.so.5.12.5 usr/lib/libQt53DInput.so -> libQt53DInput.so.5.12.5 usr/lib/libQt53DLogic.so -> libQt53DLogic.so.5.12.5 usr/lib/libQt53DQuick.so -> libQt53DQuick.so.5.12.5 usr/lib/libQt53DQuickAnimation.so -> libQt53DQuickAnimation.so.5.12.5 usr/lib/libQt53DQuickExtras.so -> libQt53DQuickExtras.so.5.12.5 usr/lib/libQt53DQuickInput.so -> libQt53DQuickInput.so.5.12.5 usr/lib/libQt53DQuickRender.so -> libQt53DQuickRender.so.5.12.5 usr/lib/libQt53DQuickScene2D.so -> libQt53DQuickScene2D.so.5.12.5 usr/lib/libQt53DRender.so -> libQt53DRender.so.5.12.5 usr/lib/libQt5Bluetooth.so -> libQt5Bluetooth.so.5.12.5 usr/lib/libQt5Charts.so -> libQt5Charts.so.5.12.5 usr/lib/libQt5ExtSerialPort.so -> libQt5ExtSerialPort.so.1.2.0 usr/lib/libQt5Location.so -> libQt5Location.so.5.12.5 usr/lib/libQt5Multimedia.so -> libQt5Multimedia.so.5.12.5 usr/lib/libQt5MultimediaGstTools.so -> libQt5MultimediaGstTools.so.5.12.5 usr/lib/libQt5MultimediaQuick.so -> libQt5MultimediaQuick.so.5.12.5 usr/lib/libQt5MultimediaWidgets.so -> libQt5MultimediaWidgets.so.5.12.5 usr/lib/libQt5Nfc.so -> libQt5Nfc.so.5.12.5 usr/lib/libQt5Nfc.so.5 -> libQt5Nfc.so.5.12.5 usr/lib/libQt5Nfc.so.5.12 -> libQt5Nfc.so.5.12.5 usr/lib/libQt5Nfc.so.5.12.5
usr/lib/libQt5Positioning.so -> libQt5Positioning.so.5.12.5 usr/lib/libQt5PositioningQuick.so -> libQt5PositioningQuick.so.5.12.5 usr/lib/libQt5Qml.so -> libQt5Qml.so.5.12.5 usr/lib/libQt5Quick.so -> libQt5Quick.so.5.12.5 usr/lib/libQt5QuickControls2.so -> libQt5QuickControls2.so.5.12.5 usr/lib/libQt5QuickParticles.so -> libQt5QuickParticles.so.5.12.5 usr/lib/libQt5QuickShapes.so -> libQt5QuickShapes.so.5.12.5 usr/lib/libQt5QuickTemplates2.so -> libQt5QuickTemplates2.so.5.12.5 usr/lib/libQt5QuickTest.so -> libQt5QuickTest.so.5.12.5 usr/lib/libQt5QuickWidgets.so -> libQt5QuickWidgets.so.5.12.5 usr/lib/libQt5Script.so -> libQt5Script.so.5.12.5 usr/lib/libQt5ScriptTools.so -> libQt5ScriptTools.so.5.12.5 usr/lib/libQt5Scxml.so -> libQt5Scxml.so.5.12.5 usr/lib/libQt5Sensors.so -> libQt5Sensors.so.5.12.5 usr/lib/libQt5SerialBus.so -> libQt5SerialBus.so.5.12.5 usr/lib/libQt5SerialPort.so -> libQt5SerialPort.so.5.12.5 usr/lib/libQt5Svg.so -> libQt5Svg.so.5.12.5 usr/lib/libQt5WebSockets.so -> libQt5WebSockets.so.5.12.5 usr/lib/libQt5WebView.so -> libQt5WebView.so.5.12.5 usr/lib/libQt5X11Extras.so -> libQt5X11Extras.so.5.12.5 usr/lib/libQt5XmlPatterns.so -> libQt5XmlPatterns.so.5.12.5 deleting usr/lib/qt/examples/multimedia/spectrum/libfftreal.prl usr/lib/qt/examples/nfc/nfc.pro usr/lib/qt/examples/nfc/annotatedurl/annotatedurl usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.cpp usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.h usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.pro usr/lib/qt/examples/nfc/annotatedurl/main.cpp usr/lib/qt/examples/nfc/annotatedurl/mainwindow.cpp usr/lib/qt/examples/nfc/annotatedurl/mainwindow.h usr/lib/qt/examples/nfc/annotatedurl/mainwindow.ui usr/lib/qt/examples/nfc/corkboard/Mode.qml usr/lib/qt/examples/nfc/corkboard/NfcFlag.png usr/lib/qt/examples/nfc/corkboard/cork.jpg usr/lib/qt/examples/nfc/corkboard/corkboard.pro usr/lib/qt/examples/nfc/corkboard/corkboard.qrc usr/lib/qt/examples/nfc/corkboard/corkboards.qml usr/lib/qt/examples/nfc/corkboard/icon.png usr/lib/qt/examples/nfc/corkboard/main.cpp usr/lib/qt/examples/nfc/corkboard/note-yellow.png usr/lib/qt/examples/nfc/corkboard/qml_corkboard usr/lib/qt/examples/nfc/corkboard/tack.png usr/lib/qt/examples/nfc/corkboard/android/AndroidManifest.xml usr/lib/qt/examples/nfc/ndefeditor/main.cpp usr/lib/qt/examples/nfc/ndefeditor/mainwindow.cpp usr/lib/qt/examples/nfc/ndefeditor/mainwindow.h usr/lib/qt/examples/nfc/ndefeditor/mainwindow.ui usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.h usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.ui usr/lib/qt/examples/nfc/ndefeditor/ndefeditor usr/lib/qt/examples/nfc/ndefeditor/ndefeditor.pro usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.cpp usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.h usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.ui usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.cpp usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.h usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.ui usr/lib/qt/examples/nfc/poster/poster.pro usr/lib/qt/examples/nfc/poster/poster.qml usr/lib/qt/examples/nfc/poster/poster.qrc usr/lib/qt/examples/nfc/poster/qml_poster usr/lib/qt/examples/nfc/poster/qmlposter.cpp
deleting usr/lib/qt/examples/sensors/grue/libgruesensor.prl deleting usr/lib/qt/examples/webkitqml/shared/libshared.prl deleting usr/lib/qt/examples/widgets/tools/plugandpaint/plugins/libpnp_basictools.prl usr/qml/Qt/labs/location/liblocationlabsplugin.so usr/qml/Qt/labs/location/plugins.qmltypes usr/qml/Qt/labs/location/qmldir usr/qml/QtNfc/libdeclarative_nfc.so usr/qml/QtNfc/plugins.qmltypes
usr/qml/QtNfc/qmldir

Packages on top of imx6-sabresd_qt5_defconfig (with toolchain-external-arm-arm) +BR2_PACKAGE_DIRECTFB=y
+BR2_PACKAGE_QT53D=y
+BR2_PACKAGE_QT5BASE_EXAMPLES=y
+BR2_PACKAGE_QT5BASE_MYSQL=y
+BR2_PACKAGE_QT5BASE_PSQL=y
+BR2_PACKAGE_QT5BASE_SQLITE_QT=y
+BR2_PACKAGE_QT5BASE_XCB=y
+BR2_PACKAGE_QT5BASE_HARFBUZZ=y
+BR2_PACKAGE_QT5BASE_TSLIB=y
+BR2_PACKAGE_QT5CANVAS3D=y
+BR2_PACKAGE_QT5CHARTS=y
+BR2_PACKAGE_QT5CONNECTIVITY=y
+BR2_PACKAGE_QT5ENGINIO=y
+BR2_PACKAGE_QT5IMAGEFORMATS=y
+BR2_PACKAGE_QT5LOCATION=y
+BR2_PACKAGE_QT5SCXML=y
+BR2_PACKAGE_QT5SENSORS=y
+BR2_PACKAGE_QT5SERIALBUS=y
+BR2_PACKAGE_QT5TOOLS_QDOC_TOOL=y +BR2_PACKAGE_QT5TOOLS_PIXELTOOL=y
+BR2_PACKAGE_QT5TOOLS_QTDIAG=y
+BR2_PACKAGE_QT5TOOLS_QTPATHS=y +BR2_PACKAGE_QT5TOOLS_QTPLUGININFO=y +BR2_PACKAGE_QT5VIRTUALKEYBOARD=y +BR2_PACKAGE_QT5VIRTUALKEYBOARD_HANDWRITING=y +BR2_PACKAGE_QT5VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION=y +BR2_PACKAGE_QT5WAYLAND=y
+BR2_PACKAGE_QT5WAYLAND_COMPOSITOR=y +BR2_PACKAGE_QT5WEBKIT_EXAMPLES=y
+BR2_PACKAGE_QT5WEBENGINE=y +BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y +BR2_PACKAGE_QT5WEBENGINE_ALSA=y
+BR2_PACKAGE_QT5WEBVIEW=y
+BR2_PACKAGE_QT5X11EXTRAS=y
+BR2_PACKAGE_CUTELYST=y
+BR2_PACKAGE_GRANTLEE=y
+BR2_PACKAGE_KF5=y
+BR2_PACKAGE_KF5_KCOREADDONS=y
+BR2_PACKAGE_QEXTSERIALPORT=y
+BR2_PACKAGE_QJSON=y
+BR2_PACKAGE_QUAZIP=y
+BR2_PACKAGE_QWT=y
+BR2_PACKAGE_QWT_SVG=y
+BR2_PACKAGE_QWT_MATHML=y
+BR2_PACKAGE_QWT_OPENGL=y
+BR2_PACKAGE_XORG7=y
+BR2_PACKAGE_XLIB_LIBXDAMAGE=y
+BR2_PACKAGE_QT_WEBKIT_KIOSK=y +BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS=y
+BR2_PACKAGE_PYTHON=y
+BR2_PACKAGE_PYTHON_PYQT5=y
+BR2_PACKAGE_BLUEZ5_UTILS=y

v4->v6
- Remove the now merged qt.conf.in and la/prl-fixup patches
- rebase to current master
- Split the more complicate to convert packages into single commits
- Added the new webview package to the straigtforward conversion patch
- find and fix hidden dependencies of some packages
- and many more, I lost track to be honest

v4->v5
- Split out the qt.conf.in and la/prl-fixup patch (now merged) from qmake infra patches (because of limited time for full rework)
- Keep custom settings path /usr instead of resetting to default /usr/etc/xdg

Andreas Naumann (28):
package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen core/pkg-infra: Add generic qmake package infrastructure
qt5: Convert straightforward packages to qmake infra package/qt5base: Convert to qmake infra
package/qwt: Partially convert to qmake infra
package/qwt: Add missing qt5svg dependency package/qt5tools: Partially convert to qmake infra package/qt5virtualkeyboard: Convert to qmake infra package/quazip: Convert to qmake infra
package/qt5wayland: Convert to qmake infra package/qt5webchannel: Convert to qmake infra package/qt5webkit: Convert to qmake infra package/qt5webkit-examples: Convert to qmake infra package/qt5webengine: Convert to qmake infra package/qt-webkit-kiosk: Convert to qmake infra package/qt5cinex: Convert to qmake infra
core/pkg-infra: Fix package file statistics for parallel build package/cmake: Fix for using -O in top-level make core/pkg-infra: Add per-package support in qmake infra
qt5: Fix pkgconfig search path for per-package infrastructure package/python-sip: Fix qmake usage for per-package build package/python-pyqt5: Fix qmake usage for per-package build package/qt5webengine: add libXdamage as XCB dependency package/qt5webengine: Add optional dependency on qt5quickcontrols2 package/qt5webengine: Add optional dependency on qt5location package/qt5virtualkeyboard: Add optional dependency on
qt5quickcontrols2
package/qt53d: Add optional dependency on qt5multimedia package/qt5charts: Add optional dependency on qt5multimedia

 Makefile                                      |   5 +-
 docs/manual/adding-packages-qmake.txt         |  85 ++++++++++++++
 docs/manual/adding-packages.txt               |   2 +
 package/Makefile.in                           |   1 +
 package/cmake/cmake.mk                        |   1 +
 package/pkg-generic.mk                        |  14 ++-
 package/pkg-qmake.mk                          | 106 ++++++++++++++++++
 package/python-pyqt5/python-pyqt5.mk          |   1 +
 package/python-sip/python-sip.mk              |   3 +-
 package/qextserialport/qextserialport.mk      |  22 +---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk    |  11 +-
 package/qt5/qt5.mk                            |  19 +++-
 package/qt5/qt53d/qt53d.mk                    |  42 +------
 package/qt5/qt5base/qt5base.mk                |  97 ++--------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        |  25 +----
 package/qt5/qt5charts/qt5charts.mk            |  40 +------
 .../qt5/qt5connectivity/qt5connectivity.mk    |  59 +---------
 package/qt5/qt5declarative/qt5declarative.mk  |  47 +-------
 package/qt5/qt5enginio/qt5enginio.mk          |  38 +------
 .../qt5graphicaleffects.mk                    |  18 +--
 .../qt5/qt5imageformats/qt5imageformats.mk    |  20 +---
 package/qt5/qt5location/qt5location.mk        |  49 +-------
 package/qt5/qt5multimedia/qt5multimedia.mk    |  46 +-------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  41 +------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    |  40 +------
 package/qt5/qt5script/qt5script.mk            |  31 +----
 package/qt5/qt5scxml/qt5scxml.mk              |  36 +-----
 package/qt5/qt5sensors/qt5sensors.mk          |  39 +------
 package/qt5/qt5serialbus/qt5serialbus.mk      |  37 +-----
 package/qt5/qt5serialport/qt5serialport.mk    |  31 +----
 package/qt5/qt5svg/qt5svg.mk                  |  39 +------
 package/qt5/qt5tools/qt5tools.mk              |   6 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  67 ++---------
 package/qt5/qt5wayland/qt5wayland.mk          |  56 +--------
 package/qt5/qt5webchannel/qt5webchannel.mk    |  39 +------
 package/qt5/qt5webengine/Config.in            |   1 +
 package/qt5/qt5webengine/qt5webengine.mk      |  58 +++-------
 .../qt5webkit-examples/qt5webkit-examples.mk  |  23 +---
 package/qt5/qt5webkit/qt5webkit.mk            |  29 ++---
 package/qt5/qt5websockets/qt5websockets.mk    |  39 +------
 package/qt5/qt5webview/qt5webview.mk          |  39 +------
 package/qt5/qt5x11extras/qt5x11extras.mk      |  20 +---
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  31 +----
 package/qt5cinex/qt5cinex.mk                  |   9 +-
 package/quazip/quazip.mk                      |  18 +--
 package/qwt/qwt.mk                            |  10 +-
 46 files changed, 313 insertions(+), 1177 deletions(-)
 create mode 100644 docs/manual/adding-packages-qmake.txt
 create mode 100644 package/pkg-qmake.mk
Signature · 1 line
2.25.0
#1 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Traditionally we configured qt5 to always build shared libraries. This resulted in many conditionals when setting buildroot to static-libs only, because each module's target install had to be guarded.
So to avoid this and simplify target install in a subsequent commit, configure qt to build (and install) only the type of libs which the buildroot defconfig is set to.
Unfortunately it seems that Qt does not support building both dynamic and static libs at the same time, so we still set it shared if buildroot asks for both.

---
 package/qt5/qt5base/qt5base.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +7 -2
index 774c771bc9..c662921b8f 100644
@@ -24,8 +24,13 @@ QT5BASE_CONFIGURE_OPTS += \
 	-no-iconv \
 	-system-zlib \
 	-system-pcre \
-	-no-pch \
-	-shared
+	-no-pch
+
+ifeq ($(BR2_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -static
+else
+QT5BASE_CONFIGURE_OPTS += -shared
+endif
 
 # starting from version 5.9.0, -optimize-debug is enabled by default
 # for debug builds and it overrides -O* with -Og which is not what we
Signature · 1 line
2.25.0
#2 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Hello Andreas,

Quoted 21 lines · On Mon, 17 Feb 2020 22:23:23 +0100 Andreas Naumann <[email protected]>…

Traditionally we configured qt5 to always build shared libraries. This resulted in many conditionals when setting buildroot to static-libs only, because each module's target install had to be guarded.
So to avoid this and simplify target install in a subsequent commit, configure qt to build (and install) only the type of libs which the buildroot defconfig is set to.
Unfortunately it seems that Qt does not support building both dynamic and static libs at the same time, so we still set it shared if buildroot asks for both.

---
 package/qt5/qt5base/qt5base.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +0 -0
index 774c771bc9..c662921b8f 100644
@@ -24,8 +24,13 @@ QT5BASE_CONFIGURE_OPTS += \
 	-no-iconv \
 	-system-zlib \

package/qt5/qt5base/qt5base.mk QT5BASE_CONFIGURE_OPTS += \ · line 33

Quoted 10 lines
package/qt5/qt5base/qt5base.mk +7 -2
 	-system-pcre \
-	-no-pch \
-	-shared
+	-no-pch
+
+ifeq ($(BR2_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -static
+else
+QT5BASE_CONFIGURE_OPTS += -shared
+endif

From package/qt5/Config.in:

menuconfig BR2_PACKAGE_QT5
bool "Qt5"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 depends on !BR2_ARM_CPU_ARMV4 # needs ARMv5+ # no built-in double-conversion support depends on !BR2_arc && !BR2_nios2 && !BR2_xtensa depends on !BR2_STATIC_LIBS

So Qt5 cannot be enabled when BR2_STATIC_LIBS=y. See also:

commit 2215b8a75edea384182f0511b6649306e60b55d1

Author: Thomas Petazzoni <[email protected]>
Date:   Wed Aug 26 17:06:18 2015 +0200

qt5: disable for static-only builds

Even though we have some specific code to support building Qt5 for static-only configurations, it doesn't work. The first problem is that our custom qmake.conf always passes -ldl, which makes a number of Qt5 config.tests fail at configure time. Once this problem is fixed by removing -ldl from QMAKE_LIBS and adding it to QMAKE_LIBS_DYNLOAD instead, the next problem is that the plugin infrastructure of Qt5 assumes that Linux has dynamic library support: the qlibrary_unix.cpp file includes <dlfcn.h>, and the only condition for this file to not be included is:

Until recently, building Qt5 statically was working because our C library was not built static-only: it provided <dlfcn.h> and libdl.so. But now that we have a really static only toolchain, Qt5 no longer builds.

The easiest solution is to simply make Qt5 depend on dynamic library support.

Fixes:

http://autobuild.buildroot.net/results/538/538e0325adba9fabbe4ec8e550fbb6a7219f5e7a/

So I don't think this patch is necessary, unless I missed something. How did you test it?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Hello Thomas,

Quoted 13 lines · Thomas Petazzoni

From package/qt5/Config.in:

menuconfig BR2_PACKAGE_QT5
bool "Qt5"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 depends on !BR2_ARM_CPU_ARMV4 # needs ARMv5+ # no built-in double-conversion support depends on !BR2_arc && !BR2_nios2 && !BR2_xtensa depends on !BR2_STATIC_LIBS

That is funny, depends on !BR2_nios2 because of double conversion, just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]), which was a autobuild failure..., but I think QT5 was enabled via package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa' dependency....

Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after back porting the second part from [2]...

Regards,
Peter

[1] https://git.buildroot.net/buildroot/commit/?id=e2fdb41f711db8894f9c5c83f32250728d4c3aa9
[2] https://github.com/google/double-conversion/commit/a54561be5588ac9b16d3c20760b9b554168bb8aa

#4 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Hello,

Quoted 8 lines · On Mon, 9 Mar 2020 23:42:33 +0100 Peter Seiderer <[email protected]> wrote:

That is funny, depends on !BR2_nios2 because of double conversion, just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]), which was a autobuild failure..., but I think QT5 was enabled via package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa' dependency....

Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after back porting the second part from [2]...

Indeed. Will you send some patches ?

Thanks for spotting this!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Hello Thomas,

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · On Mon, 9 Mar 2020 23:42:33 +0100 Peter Seiderer <[email protected]> wrote:

That is funny, depends on !BR2_nios2 because of double conversion, just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]), which was a autobuild failure..., but I think QT5 was enabled via package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa' dependency....

Quoted 4 lines
Quoted 2 lines

Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after back porting the second part from [2]...

Indeed. Will you send some patches ?

Yes...

Regards,
Peter

Quoted 4 lines

Thanks for spotting this!

Thomas

#6 lore raw

PATCH v6 1/28 package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

In reply to Thomas Petazzoni

Hi Thomas,

Quoted 3 lines · Thomas Petazzoni

So I don't think this patch is necessary, unless I missed something. How did you test it?

I had in my original set (and tested it only back then). I didnt know if Qt static build would ever be reenabled so I kept it. But it isnt needed, so no problem omitting it.

regards,
Andreas

Quoted 5 lines

Thanks!

Thomas

#7 lore raw

PATCH v6 2/28 core/pkg-infra: Add generic qmake package infrastructure

In reply to Andreas Naumann

This provides generic functions for Qt5 qmake based packages. It will make it possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD| INSTALL_STATGING}_CMDS. Additionally it provides a generic target install method which will make most of the package specific commands obsolete.

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder. The cleanup of many files we dont want in target is deferred to the target-finalize step. In addition to what's being removed already, we also have to cleanup some Qt5 specific files (prl) and the documentation directory.

This approach was chosen over copying all files recorded in the pkg-files-list after some discussion which Thomas Petazzoni summed up:
"We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing."

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

---
 Makefile                              |   5 +-
 docs/manual/adding-packages-qmake.txt |  85 +++++++++++++++++++++
 docs/manual/adding-packages.txt       |   2 +
 package/Makefile.in                   |   1 +
 package/pkg-qmake.mk                  | 105 ++++++++++++++++++++++++++
 5 files changed, 196 insertions(+), 2 deletions(-)
 create mode 100644 docs/manual/adding-packages-qmake.txt
 create mode 100644 package/pkg-qmake.mk
Makefile +3 -2
index a52f1c75fd..4cd3d2ba79 100644
@@ -737,10 +737,11 @@ target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize
 	$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
 	rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
-		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
+		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake \
+		$(TARGET_DIR)/usr/doc
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
 	find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
-		\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
+		\( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
 	rm -rf $(TARGET_DIR)/usr/share/gdb
 endif
docs/manual/adding-packages-qmake.txt new file +85 -0

85 lines not on this page · raw message

docs/manual/adding-packages.txt +2 -0
index 4a4a17e879..814355cd76 100644
@@ -41,6 +41,8 @@ include::adding-packages-cargo.txt[]
 
 include::adding-packages-golang.txt[]
 
+include::adding-packages-qmake.txt[]
+
 include::adding-packages-kernel-module.txt[]
 
 include::adding-packages-asciidoc.txt[]
package/Makefile.in +1 -0
index 285e2837ef..51f5cbce4f 100644
@@ -426,3 +426,4 @@ include package/pkg-kernel-module.mk
 include package/pkg-waf.mk
 include package/pkg-golang.mk
 include package/pkg-meson.mk
+include package/pkg-qmake.mk
package/pkg-qmake.mk new file +105 -0

105 lines not on this page · raw message

Signature · 1 line
2.25.0
#8 lore raw

PATCH v6 2/28 core/pkg-infra: Add generic qmake package infrastructure

Hello Andreas,

Quoted 24 lines · On Mon, 17 Feb 2020 22:23:24 +0100 Andreas Naumann <[email protected]>…

This provides generic functions for Qt5 qmake based packages. It will make it possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD| INSTALL_STATGING}_CMDS. Additionally it provides a generic target install method which will make most of the package specific commands obsolete.

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder. The cleanup of many files we dont want in target is deferred to the target-finalize step. In addition to what's being removed already, we also have to cleanup some Qt5 specific files (prl) and the documentation directory.

This approach was chosen over copying all files recorded in the pkg-files-list after some discussion which Thomas Petazzoni summed up:
"We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing."

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

Quoted 5 lines

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

I've applied to master, after doing some small changes, see below.

docs/manual/adding-packages-qmake.txt line 65

Quoted 6 lines
docs/manual/adding-packages-qmake.txt new file +6 -0
+An additional variable, specific to the QMake infrastructure, can
+also be defined.
+
+* +LIBFOO_QMAKE_OPTS+, to specify additional options to pass to the
+  +qmake+ script at every step of the package build process: configure,
+  build and installation. By default, empty.

This option doesn't exist in your qmake-package infra, only CONF_OPTS exists, so I've dropped this QMAKE_OPTS description.

package/pkg-qmake.mk line 41

Quoted 8 lines
package/pkg-qmake.mk new file +8 -0
+define inner-qmake-package
+
+$(2)_CONF_ENV			?=
+$(2)_CONF_OPTS			?=
+$(2)_MAKE_ENV			?=
+$(2)_MAKE_OPTS			?=
+$(2)_INSTALL_STAGING_OPTS	?= install
+$(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)

I've added a:

$(2)_DEPENDENCIES += qt5base

here, since all packages that use qmake-package need qmake, and qmake is provided by qt5base.

Of course, I have then dropped the addition of qt5base as an explicit dependency in the next patches.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH v6 2/28 core/pkg-infra: Add generic qmake package infrastructure

Hi,

Quoted 37 lines · Thomas Petazzoni

Hello Andreas,

Quoted 24 lines · On Mon, 17 Feb 2020 22:23:24 +0100 Andreas Naumann <[email protected]>…

This provides generic functions for Qt5 qmake based packages. It will make it possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD| INSTALL_STATGING}_CMDS. Additionally it provides a generic target install method which will make most of the package specific commands obsolete.

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder. The cleanup of many files we dont want in target is deferred to the target-finalize step. In addition to what's being removed already, we also have to cleanup some Qt5 specific files (prl) and the documentation directory.

This approach was chosen over copying all files recorded in the pkg-files-list after some discussion which Thomas Petazzoni summed up:
"We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing."

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

Quoted 5 lines

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

I've applied to master, after doing some small changes, see below.

Quoted 9 lines

docs/manual/adding-packages-qmake.txt line 65

Quoted 6 lines
docs/manual/adding-packages-qmake.txt new file +6 -0
+An additional variable, specific to the QMake infrastructure, can
+also be defined.
+
+* +LIBFOO_QMAKE_OPTS+, to specify additional options to pass to the
+  +qmake+ script at every step of the package build process: configure,
+  build and installation. By default, empty.

This option doesn't exist in your qmake-package infra, only CONF_OPTS exists, so I've dropped this QMAKE_OPTS description.

of course, thanks.

Quoted 12 lines

package/pkg-qmake.mk line 41

Quoted 9 lines
package/pkg-qmake.mk new file +8 -0
+define inner-qmake-package
+
+$(2)_CONF_ENV			?=
+$(2)_CONF_OPTS			?=
+$(2)_MAKE_ENV			?=
+$(2)_MAKE_OPTS			?=
+$(2)_INSTALL_STAGING_OPTS	?= install
+$(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)

I've added a:

Quoted 4 lines

$(2)_DEPENDENCIES += qt5base

here, since all packages that use qmake-package need qmake, and qmake is provided by qt5base.

I wasnt sure which way to go, but this is fine also.

regards,
Andreas

Quoted 8 lines

Of course, I have then dropped the addition of qt5base as an explicit dependency in the next patches.

Thanks!

Thomas

#10 lore raw

PATCH v6 3/28 qt5: Convert straightforward packages to qmake infra

In reply to Andreas Naumann

This converts all qmake packages to the new infra for which no custom environments, option or additional hooks are needed.

---
 package/qextserialport/qextserialport.mk      | 22 +------
 package/qt5/qt53d/qt53d.mk                    | 38 +-----------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        | 25 +-------
 package/qt5/qt5charts/qt5charts.mk            | 40 +------------
 .../qt5/qt5connectivity/qt5connectivity.mk    | 59 +------------------
 package/qt5/qt5declarative/qt5declarative.mk  | 47 +--------------
 package/qt5/qt5enginio/qt5enginio.mk          | 38 +-----------
 .../qt5graphicaleffects.mk                    | 18 +-----
 .../qt5/qt5imageformats/qt5imageformats.mk    | 20 +------
 package/qt5/qt5location/qt5location.mk        | 49 +--------------
 package/qt5/qt5multimedia/qt5multimedia.mk    | 46 +--------------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  | 41 +------------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    | 40 +------------
 package/qt5/qt5script/qt5script.mk            | 31 +---------
 package/qt5/qt5scxml/qt5scxml.mk              | 36 +----------
 package/qt5/qt5sensors/qt5sensors.mk          | 39 +-----------
 package/qt5/qt5serialbus/qt5serialbus.mk      | 37 +-----------
 package/qt5/qt5serialport/qt5serialport.mk    | 31 +---------
 package/qt5/qt5svg/qt5svg.mk                  | 39 +-----------
 package/qt5/qt5websockets/qt5websockets.mk    | 39 +-----------
 package/qt5/qt5webview/qt5webview.mk          | 39 +-----------
 package/qt5/qt5x11extras/qt5x11extras.mk      | 20 +------
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  | 31 +---------
 23 files changed, 23 insertions(+), 802 deletions(-)
package/qextserialport/qextserialport.mk +1 -21
index ecaff21efc..6f14d21fe7 100644
@@ -16,24 +16,4 @@ endif
 
 QEXTSERIALPORT_DEPENDENCIES = qt5base
 
-define QEXTSERIALPORT_CONFIGURE_CMDS
-	cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) $(QEXTSERIALPORT_CONF_OPTS)
-endef
-
-define QEXTSERIALPORT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QEXTSERIALPORT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),y)
-QEXTSERIALPORT_INSTALL_TARGET = NO
-else
-define QEXTSERIALPORT_INSTALL_TARGET_CMDS
-	cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt53d/qt53d.mk +1 -37
index 7674b44558..eeb1b3644c 100644
@@ -17,40 +17,4 @@ endif
 QT53D_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0
 QT53D_LICENSE_FILES = LICENSE.GPL LICENSE.GPLv3 LICENSE.LGPLv3
 
-define QT53D_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT53D_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT53D_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT53D_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/qt3d $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_STATIC_LIBS),)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-# Available since 5.9
-define QT53D_INSTALL_TARGET_LATEST
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geometryloaders $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/renderplugins $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-define QT53D_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt53D*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sceneparsers $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt3D $(TARGET_DIR)/usr/qml
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml
-	$(QT53D_INSTALL_TARGET_LATEST)
-	$(QT53D_INSTALL_TARGET_EXAMPLES)
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5canvas3d/qt5canvas3d.mk +1 -24
index b550ff00f2..711d0175d4 100644
@@ -18,27 +18,4 @@ QT5CANVAS3D_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0
 QT5CANVAS3D_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3
 endif
 
-define QT5CANVAS3D_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5CANVAS3D_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5CANVAS3D_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5CANVAS3D_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/canvas3d $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5CANVAS3D_INSTALL_TARGET_CMDS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtCanvas3D $(TARGET_DIR)/usr/qml/
-	$(QT5CANVAS3D_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5charts/qt5charts.mk +1 -39
index e359747503..40f5efc2da 100644
@@ -24,42 +24,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5CHARTS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5CHARTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5CHARTS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5CHARTS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5CHARTS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Charts*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-# this is only built with quick support enabled
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5CHARTS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtCharts $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5CHARTS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/charts* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5CHARTS_INSTALL_TARGET_CMDS
-	$(QT5CHARTS_INSTALL_TARGET_LIBS)
-	$(QT5CHARTS_INSTALL_TARGET_QMLS)
-	$(QT5CHARTS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5connectivity/qt5connectivity.mk +1 -58

62 lines not on this page · raw message

package/qt5/qt5declarative/qt5declarative.mk +1 -46

50 lines not on this page · raw message

package/qt5/qt5enginio/qt5enginio.mk +1 -37
index ebd99e4cb7..714f8c6b73 100644
@@ -22,40 +22,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5ENGINIO_DEPENDENCIES += qt5declarative
 endif
 
-define QT5ENGINIO_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5ENGINIO_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5ENGINIO_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5ENGINIO_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/Enginio $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5ENGINIO_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/enginio $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5ENGINIO_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libEnginio.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5ENGINIO_INSTALL_TARGET_CMDS
-	$(QT5ENGINIO_INSTALL_TARGET_LIBS)
-	$(QT5ENGINIO_INSTALL_TARGET_QMLS)
-	$(QT5ENGINIO_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk +1 -17
index c5011a94f0..92a3c1b8fb 100644
@@ -18,20 +18,4 @@ QT5GRAPHICALEFFECTS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or L
 QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5GRAPHICALEFFECTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5GRAPHICALEFFECTS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5GRAPHICALEFFECTS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-define QT5GRAPHICALEFFECTS_INSTALL_TARGET_CMDS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtGraphicalEffects $(TARGET_DIR)/usr/qml
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5imageformats/qt5imageformats.mk +1 -19
index fa13ebedaf..662215521c 100644
@@ -18,22 +18,4 @@ QT5IMAGEFORMATS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-
 QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5IMAGEFORMATS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5IMAGEFORMATS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5IMAGEFORMATS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5IMAGEFORMATS_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/*.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5location/qt5location.mk +1 -48

52 lines not on this page · raw message

package/qt5/qt5multimedia/qt5multimedia.mk +1 -45

54 lines not on this page · raw message

package/qt5/qt5quickcontrols/qt5quickcontrols.mk +1 -40

44 lines not on this page · raw message

package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk +1 -39
index c2004c2ee7..51d8b60741 100644
@@ -13,42 +13,4 @@ QT5QUICKCONTROLS2_INSTALL_STAGING = YES
 QT5QUICKCONTROLS2_LICENSE = GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5QUICKCONTROLS2_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 
-define QT5QUICKCONTROLS2_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5QUICKCONTROLS2_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5QUICKCONTROLS2_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/quickcontrols2 $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5QuickTemplates2.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5QuickControls2.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/platform $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Controls.2 $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Templates.2 $(TARGET_DIR)/usr/qml/QtQuick
-	$(QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES)
-endef
-else
-define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5LabsTemplates.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/controls $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/templates $(TARGET_DIR)/usr/qml/Qt/labs
-	$(QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES)
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5script/qt5script.mk +1 -30
index a3b8cb7e34..e2a1bb2812 100644
@@ -27,33 +27,4 @@ QT5SCRIPT_LICENSE_FILES += \
 	src/3rdparty/javascriptcore/JavaScriptCore/COPYING.LIB \
 	src/3rdparty/javascriptcore/JavaScriptCore/pcre/COPYING
 
-define QT5SCRIPT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SCRIPT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SCRIPT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SCRIPT_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Script*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SCRIPT_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/script $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SCRIPT_INSTALL_TARGET_CMDS
-	$(QT5SCRIPT_INSTALL_TARGET_LIBS)
-	$(QT5SCRIPT_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5scxml/qt5scxml.mk +1 -35
index c0776314d5..b90ab01030 100644
@@ -16,38 +16,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5SCXML_LICENSE += , BSD-3-Clause (examples)
 endif
 
-define QT5SCXML_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SCXML_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SCXML_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SCXML_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Scxml*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5SCXML_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtScxml/ $(TARGET_DIR)/usr/qml/
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SCXML_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/scxml $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SCXML_INSTALL_TARGET_CMDS
-	$(QT5SCXML_INSTALL_TARGET_LIBS)
-	$(QT5SCXML_INSTALL_TARGET_QMLS)
-	$(QT5SCXML_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5sensors/qt5sensors.mk +1 -38
index 10498a4970..7a3c5b7ef5 100644
@@ -22,41 +22,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5SENSORS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5SENSORS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SENSORS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SENSORS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SENSORS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Sensors.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sensor* $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5SENSORS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtSensors $(TARGET_DIR)/usr/qml
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SENSORS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/sensors $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SENSORS_INSTALL_TARGET_CMDS
-	$(QT5SENSORS_INSTALL_TARGET_LIBS)
-	$(QT5SENSORS_INSTALL_TARGET_QMLS)
-	$(QT5SENSORS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5serialbus/qt5serialbus.mk +1 -36
index be8bb8b23c..0ee351afe2 100644
@@ -13,39 +13,4 @@ QT5SERIALBUS_INSTALL_STAGING = YES
 QT5SERIALBUS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5SERIALBUS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 
-define QT5SERIALBUS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SERIALBUS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SERIALBUS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SERIALBUS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialBus.so.* \
-		$(TARGET_DIR)/usr/lib
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/canbus
-	cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/canbus/*.so \
-		$(TARGET_DIR)/usr/lib/qt/plugins/canbus
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES)$(BR2_PACKAGE_QT5BASE_WIDGETS),yy)
-define QT5SERIALBUS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/serialbus $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SERIALBUS_INSTALL_TARGET_CMDS
-	$(QT5SERIALBUS_INSTALL_TARGET_LIBS)
-	$(QT5SERIALBUS_INSTALL_TARGET_EXAMPLES)
-	$(INSTALL) -m 0755 -D $(@D)/bin/canbusutil \
-		$(TARGET_DIR)/usr/bin/canbusutil
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5serialport/qt5serialport.mk +1 -30
index 5c2abd82da..f08fac6002 100644
@@ -18,33 +18,4 @@ QT5SERIALPORT_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-3.
 QT5SERIALPORT_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5SERIALPORT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SERIALPORT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SERIALPORT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SERIALPORT_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialPort.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SERIALPORT_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/serialport $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SERIALPORT_INSTALL_TARGET_CMDS
-	$(QT5SERIALPORT_INSTALL_TARGET_LIBS)
-	$(QT5SERIALPORT_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5svg/qt5svg.mk +1 -38
index cb91844efd..2d8dade407 100644
@@ -18,41 +18,4 @@ QT5SVG_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3 (docs)
 QT5SVG_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5SVG_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SVG_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SVG_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
-define QT5SVG_INSTALL_ICONENGINES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/iconengines $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SVG_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/svg $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SVG_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Svg*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/libqsvg.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/
-	$(QT5SVG_INSTALL_ICONENGINES)
-endef
-endif
-
-define QT5SVG_INSTALL_TARGET_CMDS
-	$(QT5SVG_INSTALL_TARGET_LIBS)
-	$(QT5SVG_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5websockets/qt5websockets.mk +1 -38
index 6e734a3bf3..0647ade615 100644
@@ -25,41 +25,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBSOCKETS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5WEBSOCKETS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBSOCKETS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBSOCKETS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/WebSockets $(TARGET_DIR)/usr/qml/Qt/
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebSockets $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/websockets $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebSockets.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5WEBSOCKETS_INSTALL_TARGET_CMDS
-	$(QT5WEBSOCKETS_INSTALL_TARGET_LIBS)
-	$(QT5WEBSOCKETS_INSTALL_TARGET_QMLS)
-	$(QT5WEBSOCKETS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5webview/qt5webview.mk +1 -38
index 0a80dba612..db4813563a 100644
@@ -16,41 +16,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5WEBVIEW_LICENSE += , BSD-3-Clause (examples)
 endif
 
-define QT5WEBVIEW_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBVIEW_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBVIEW_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBVIEW_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebView $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBVIEW_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webview $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBVIEW_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebView.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/webview $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-define QT5WEBVIEW_INSTALL_TARGET_CMDS
-	$(QT5WEBVIEW_INSTALL_TARGET_LIBS)
-	$(QT5WEBVIEW_INSTALL_TARGET_QMLS)
-	$(QT5WEBVIEW_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5x11extras/qt5x11extras.mk +1 -19
index 6acc9462c1..8590f543c6 100644
@@ -18,22 +18,4 @@ QT5X11EXTRAS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0
 QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5X11EXTRAS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5X11EXTRAS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5X11EXTRAS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5X11EXTRAS_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5X11Extras.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk +1 -30
index 6ed247fd59..0a12bf6bdc 100644
@@ -21,33 +21,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5XMLPATTERNS_LICENSE += , BSD-3-Clause (examples)
 endif
 
-define QT5XMLPATTERNS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5XMLPATTERNS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5XMLPATTERNS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5XMLPATTERNS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5XmlPatterns*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5XMLPATTERNS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/xmlpatterns $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5XMLPATTERNS_INSTALL_TARGET_CMDS
-	$(QT5XMLPATTERNS_INSTALL_TARGET_LIBS)
-	$(QT5XMLPATTERNS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#11 lore raw

PATCH v6 3/28 qt5: Convert straightforward packages to qmake infra

Hello Andreas,

Quoted 4 lines · On Mon, 17 Feb 2020 22:23:25 +0100 Andreas Naumann <[email protected]>…

This converts all qmake packages to the new infra for which no custom environments, option or additional hooks are needed.

I've applied to master, after:

(1) Splitting the qextserialport change to its own patch, since this package is not in package/qt5

(2) Rebasing on master, where changes occurred with the removal of Qt

     5.6 support.

(3) Dropping the explicit qt5base dependency, since it is now implied by the qmake-package infrastructure.

Do not hesitate to carefully review the patches I have pushed, it was a lot of mechanical change, so a second review will certainly be good.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#12 lore raw

PATCH v6 3/28 qt5: Convert straightforward packages to qmake infra

Hi,

Quoted 15 lines · Thomas Petazzoni

Hello Andreas,

Quoted 4 lines · On Mon, 17 Feb 2020 22:23:25 +0100 Andreas Naumann <[email protected]>…

This converts all qmake packages to the new infra for which no custom environments, option or additional hooks are needed.

I've applied to master, after:

(1) Splitting the qextserialport change to its own patch, since this package is not in package/qt5

Quoted 8 lines

(2) Rebasing on master, where changes occurred with the removal of Qt

      5.6 support.

(3) Dropping the explicit qt5base dependency, since it is now implied by the qmake-package infrastructure.

Do not hesitate to carefully review the patches I have pushed, it was a lot of mechanical change, so a second review will certainly be good.

As far as I could see it should fine.

Thanks,
Andreas

Quoted 5 lines

Thanks!

Thomas

#13 lore raw

PATCH v6 4/28 package/qt5base: Convert to qmake infra

In reply to Andreas Naumann

Convert build, staging and target install to the qmake infra commands. This removes a lot of conditional code because we solely rely on all install rules being properly generated according to the configured options.

Of course we keep the configure command/logic as is, because qmake does not yet exist.

Handling of the custom qt.conf is now done in the post staging hook.

Todo: Check if font install for 5.6 is still working.

---
 package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
 1 file changed, 2 insertions(+), 79 deletions(-)
package/qt5/qt5base/qt5base.mk +2 -79
index c662921b8f..03f984ef8c 100644
@@ -286,33 +286,6 @@ else
 QT5BASE_CONFIGURE_OPTS += -no-journald
 endif
 
-# Build the list of libraries to be installed on the target
-QT5BASE_INSTALL_LIBS_y                                 += Qt5Core
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XCB)        += Qt5XcbQpa
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK)    += Qt5Network
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL)        += Qt5Sql
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST)       += Qt5Test
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML)        += Qt5Xml
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFSDeviceIntegration
-ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
-endif
-ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
-endif
-else
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglDeviceIntegration
-endif
-
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI)          += Qt5Gui
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS)      += Qt5Widgets
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
-
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
-
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
 # use vivante backend
@@ -379,10 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-define QT5BASE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
 # The file "qt.conf" can be used to override the hard-coded paths that are
 # compiled into the Qt library. We need it to make "qmake" relocatable.
 define QT5BASE_INSTALL_QT_CONF
@@ -390,52 +359,6 @@ define QT5BASE_INSTALL_QT_CONF
 		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
 endef
 
-define QT5BASE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5BASE_INSTALL_QT_CONF)
-endef
-
-define QT5BASE_INSTALL_TARGET_LIBS
-	for lib in $(QT5BASE_INSTALL_LIBS_y); do \
-		cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib || exit 1 ; \
-	done
-endef
-
-define QT5BASE_INSTALL_TARGET_PLUGINS
-	if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
-	fi
-endef
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-define QT5BASE_INSTALL_TARGET_FONTS
-	if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \
-	fi
-endef
-endif
-
-define QT5BASE_INSTALL_TARGET_EXAMPLES
-	if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
-	fi
-endef
-
-ifeq ($(BR2_STATIC_LIBS),y)
-define QT5BASE_INSTALL_TARGET_CMDS
-	$(QT5BASE_INSTALL_TARGET_FONTS)
-	$(QT5BASE_INSTALL_TARGET_EXAMPLES)
-endef
-else
-define QT5BASE_INSTALL_TARGET_CMDS
-	$(QT5BASE_INSTALL_TARGET_LIBS)
-	$(QT5BASE_INSTALL_TARGET_PLUGINS)
-	$(QT5BASE_INSTALL_TARGET_FONTS)
-	$(QT5BASE_INSTALL_TARGET_EXAMPLES)
-endef
-endif
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#14 lore raw

PATCH v6 4/28 package/qt5base: Convert to qmake infra

Hello Andreas,

Quoted 10 lines · On Mon, 17 Feb 2020 22:23:26 +0100 Andreas Naumann <[email protected]>…

Convert build, staging and target install to the qmake infra commands. This removes a lot of conditional code because we solely rely on all install rules being properly generated according to the configured options.

Of course we keep the configure command/logic as is, because qmake does not yet exist.

Handling of the custom qt.conf is now done in the post staging hook.

Todo: Check if font install for 5.6 is still working.

This Todo is no longer relevant, as support for Qt 5.6 has been removed.

Quoted 4 lines
---
 package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
 1 file changed, 2 insertions(+), 79 deletions(-)

I've applied this patch to master, after fixing the conflicts when applying.

I also added a preliminary patch that changes pkg-qmake.mk to only add qt5base as a dependency when the package is *not* qt5base, to avoid a circular dependency.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#15 lore raw

PATCH v6 4/28 package/qt5base: Convert to qmake infra

Hi,

Quoted 23 lines · Thomas Petazzoni

Hello Andreas,

Quoted 10 lines · On Mon, 17 Feb 2020 22:23:26 +0100 Andreas Naumann <[email protected]>…

Convert build, staging and target install to the qmake infra commands. This removes a lot of conditional code because we solely rely on all install rules being properly generated according to the configured options.

Of course we keep the configure command/logic as is, because qmake does not yet exist.

Handling of the custom qt.conf is now done in the post staging hook.

Todo: Check if font install for 5.6 is still working.

This Todo is no longer relevant, as support for Qt 5.6 has been removed.

Quoted 4 lines
---
  package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
  1 file changed, 2 insertions(+), 79 deletions(-)
Quoted 6 lines

I've applied this patch to master, after fixing the conflicts when applying.

I also added a preliminary patch that changes pkg-qmake.mk to only add qt5base as a dependency when the package is *not* qt5base, to avoid a circular dependency.

Ah yes, I didnt think of this when you changed patch 02. Now I'm really curious as to what the autobuilders say..

regards,
Andreas

Quoted 5 lines

Thanks!

Thomas

#16 lore raw

PATCH v6 5/28 package/qwt: Partially convert to qmake infra

In reply to Andreas Naumann

Use the qmake infra CONFIGURE and BUILD generic but keep the manipulation of qwtconfig.pri as PRE_CONFIGURE_HOOK as well as the custom install steps.

---
 package/qwt/qwt.mk | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
package/qwt/qwt.mk +3 -6
index e0ffec765f..1fec17b19a 100644
@@ -41,14 +41,11 @@ else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/'
 endif
 
-define QWT_CONFIGURE_CMDS
+define QWT_PRE_CONFIGURE_CMD
 	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
-define QWT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD
 
 # After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so
 # that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and
@@ -64,4 +61,4 @@ define QWT_INSTALL_TARGET_CMDS
 	rm -Rf $(TARGET_DIR)/usr/mkspecs
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#17 lore raw

PATCH v6 5/28 package/qwt: Partially convert to qmake infra

Hello,

package/qwt/qwt.mk else · line 48

Quoted 10 lines · On Mon, 17 Feb 2020 22:23:27 +0100 Andreas Naumann <[email protected]>…
package/qwt/qwt.mk +2 -5
-define QWT_CONFIGURE_CMDS
+define QWT_PRE_CONFIGURE_CMD
 	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
-define QWT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD

PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Also, why can this package use INSTALL_ROOT in a "normal" way, i.e INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#18 lore raw

PATCH v6 5/28 package/qwt: Partially convert to qmake infra

Hi,

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:27 +0100 Andreas Naumann <[email protected]>…
package/qwt/qwt.mk +1 -2
-define QWT_CONFIGURE_CMDS
+define QWT_PRE_CONFIGURE_CMD
  	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
  endef
Quoted 7 lines

package/qwt/qwt.mk else · line 48

Quoted 4 lines
package/qwt/qwt.mk +1 -3
-define QWT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD

PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Sounds better, yes.

Quoted 3 lines

Also, why can this package use INSTALL_ROOT in a "normal" way, i.e INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

I guess the qwt project does not install anything in host so there's no need for us to separate the host from the target files. Which is why we cant use the INSTALL_ROOT method for other qt modules (and keep things generic).
I didnt entirely understand the additional modification in the staging install so just kept the install steps as is. Looking into it now I see a 'rm -Rf $(TARGET_DIR)/usr/mkspecs' in the target install which makes my assumption above invalid. So yes, maybe the install steps could be simplified by using the new pkg-qmake method.

best regards,
Andreas

Quoted 5 lines

Best regards,

Thomas

#19 lore raw

PATCH v6 6/28 package/qwt: Add missing qt5svg dependency

In reply to Andreas Naumann
---
 package/qwt/qwt.mk | 1 +
 1 file changed, 1 insertion(+)
package/qwt/qwt.mk +1 -0
index 1fec17b19a..50df7e2642 100644
@@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
 
 ifeq ($(BR2_PACKAGE_QWT_SVG),y)
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
+QWT_DEPENDENCIES += qt5svg
 else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
 endif
Signature · 1 line
2.25.0
#20 lore raw

PATCH v6 6/28 package/qwt: Add missing qt5svg dependency

Quoted 10 lines · On Mon, 17 Feb 2020 22:23:28 +0100 Andreas Naumann <[email protected]>…
---
 package/qwt/qwt.mk | 1 +
 1 file changed, 1 insertion(+)
package/qwt/qwt.mk +0 -0
index 1fec17b19a..50df7e2642 100644

package/qwt/qwt.mk QWT_CONFIG += -e 's%/features%/mkspecs/features%' · line 25

Quoted 7 lines
package/qwt/qwt.mk +1 -0
@@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
 
 ifeq ($(BR2_PACKAGE_QWT_SVG),y)
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
+QWT_DEPENDENCIES += qt5svg
 else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
 endif

This looks like a fix we should apply today. Why doesn't this trigger any autobuilder failure?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#21 lore raw

PATCH v6 6/28 package/qwt: Add missing qt5svg dependency

Hi

Am 17.02.20 um 22:56 schrieb Thomas Petazzoni:

Quoted 14 lines
Quoted 11 lines · On Mon, 17 Feb 2020 22:23:28 +0100 Andreas Naumann <[email protected]>…
---
  package/qwt/qwt.mk | 1 +
  1 file changed, 1 insertion(+)
package/qwt/qwt.mk +0 -0
index 1fec17b19a..50df7e2642 100644
@@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
 
Quoted 9 lines

package/qwt/qwt.mk QWT_CONFIG += -e 's%/features%/mkspecs/features%' · line 25

Quoted 6 lines
package/qwt/qwt.mk +1 -0
  ifeq ($(BR2_PACKAGE_QWT_SVG),y)
  QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
+QWT_DEPENDENCIES += qt5svg
  else
  QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
  endif

This looks like a fix we should apply today. Why doesn't this trigger any autobuilder failure?

Probably because qwt is built after qt5svg (more or less by chance). However, in per-package mode this becomes a problem because the libs are not copied to the qwt per-package staging.

regards,
Andreas

Quoted 3 lines

Thomas

#22 lore raw

PATCH v6 6/28 package/qwt: Add missing qt5svg dependency

Quoted 6 lines · On Tue, 18 Feb 2020 10:43:17 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 2 lines

This looks like a fix we should apply today. Why doesn't this trigger any autobuilder failure?

Probably because qwt is built after qt5svg (more or less by chance). However, in per-package mode this becomes a problem because the libs are not copied to the qwt per-package staging.

Ah yes, indeed. It's still a good bug fix that we can apply to master now, independently of the rest of the series.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#24 lore raw

PATCH v6 7/28 package/qt5tools: Partially convert to qmake infra

In reply to Andreas Naumann

Use generic configure command but for now keep custom build and install logic.

---
 package/qt5/qt5tools/qt5tools.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
package/qt5/qt5tools/qt5tools.mk +1 -5
index 0d00022998..8e06706dd6 100644
@@ -50,10 +50,6 @@ QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths
 QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
 QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
 
-define QT5TOOLS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
 define QT5TOOLS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) sub-src-qmake_all
 	$(foreach p,$(QT5TOOLS_BUILD_DIRS_y), \
@@ -71,4 +67,4 @@ define QT5TOOLS_INSTALL_TARGET_CMDS
 		$(INSTALL) -D -m0755 $(@D)/bin/$(p) $(TARGET_DIR)/usr/bin/$(p)$(sep))
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#25 lore raw

PATCH v6 7/28 package/qt5tools: Partially convert to qmake infra

Quoted 7 lines · On Mon, 17 Feb 2020 22:23:29 +0100 Andreas Naumann <[email protected]>…

Use generic configure command but for now keep custom build and install logic.

---
 package/qt5/qt5tools/qt5tools.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied to master, after dropping the qt5base dependency.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#26 lore raw

PATCH v6 8/28 package/qt5virtualkeyboard: Convert to qmake infra

In reply to Andreas Naumann

It seems the old method was missing some files from the install step since after the conversion the the following additional files appear in target after a build with all config options selected:
usr/lib/qt/plugins/lipi_toolkit/libactivedtw.so usr/lib/qt/plugins/lipi_toolkit/libboxfld.so usr/lib/qt/plugins/lipi_toolkit/libl7.so usr/lib/qt/plugins/lipi_toolkit/liblipiengine.so usr/lib/qt/plugins/lipi_toolkit/liblogger.so usr/lib/qt/plugins/lipi_toolkit/libneuralnet.so usr/lib/qt/plugins/lipi_toolkit/libnn.so usr/lib/qt/plugins/lipi_toolkit/libnpen.so usr/lib/qt/plugins/lipi_toolkit/libpointfloat.so usr/lib/qt/plugins/lipi_toolkit/libpreproc.so usr/lib/qt/plugins/lipi_toolkit/libsubstroke.so usr/lib/qt/plugins/virtualkeyboard/libqtvirtualkeyboard_lipi.so

---
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  | 63 ++-----------------
 1 file changed, 4 insertions(+), 59 deletions(-)
package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk +4 -59
index c13fa699a6..162ed88c8c 100644
@@ -22,7 +22,7 @@ endif
 
 QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS = $(call qstrip,$(BR2_PACKAGE_QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS))
 ifneq ($(strip $(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+="$(foreach lang,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS),lang-$(lang))"
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+="$(foreach lang,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS),lang-$(lang))"
 
 ifneq ($(filter ja_JP all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (openwnn)
@@ -36,7 +36,6 @@ endif
 ifneq ($(filter zh_CN all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (pinyin)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/pinyin/NOTICE
 else
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/plugins/pinyin/3rdparty/pinyin/NOTICE
@@ -46,7 +45,6 @@ endif
 ifneq ($(filter zh_TW all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (tcime), BSD-3-Clause (tcime)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/tcime/COPYING
 else
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/plugins/tcime/3rdparty/tcime/COPYING
@@ -55,8 +53,7 @@ endif
 endif
 
 ifeq ($(BR2_PACKAGE_QT5VIRTUALKEYBOARD_HANDWRITING),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+=handwriting
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+=handwriting
 QT5VIRTUALKEYBOARD_LICENSE += , MIT (lipi-toolkit)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/lipi-toolkit/license.txt
@@ -66,59 +63,7 @@ endif
 endif
 
 ifeq ($(BR2_PACKAGE_QT5VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION),y)
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+=arrow-key-navigation
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+=arrow-key-navigation
 endif
 
-ifeq ($(QT5VIRTUALKEYBOARD_3RDPARTY_PARTS),YES)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS
-	cp -dpfr $(STAGING_DIR)/usr/qtvirtualkeyboard $(TARGET_DIR)/usr
-endef
-endif
-
-define QT5VIRTUALKEYBOARD_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5VIRTUALKEYBOARD_QMAKEFLAGS))
-endef
-
-define QT5VIRTUALKEYBOARD_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5VIRTUALKEYBOARD_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
-	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick/Enterprise
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Enterprise/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/Enterprise/
-endef
-else
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
-	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/virtualkeyboard $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST):$(BR2_STATIC_LIBS),y:)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_CMDS
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so \
-		$(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#27 lore raw

PATCH v6 8/28 package/qt5virtualkeyboard: Convert to qmake infra

Quoted 16 lines · On Mon, 17 Feb 2020 22:23:30 +0100 Andreas Naumann <[email protected]>…

It seems the old method was missing some files from the install step since after the conversion the the following additional files appear in target after a build with all config options selected:
usr/lib/qt/plugins/lipi_toolkit/libactivedtw.so usr/lib/qt/plugins/lipi_toolkit/libboxfld.so usr/lib/qt/plugins/lipi_toolkit/libl7.so usr/lib/qt/plugins/lipi_toolkit/liblipiengine.so usr/lib/qt/plugins/lipi_toolkit/liblogger.so usr/lib/qt/plugins/lipi_toolkit/libneuralnet.so usr/lib/qt/plugins/lipi_toolkit/libnn.so usr/lib/qt/plugins/lipi_toolkit/libnpen.so usr/lib/qt/plugins/lipi_toolkit/libpointfloat.so usr/lib/qt/plugins/lipi_toolkit/libpreproc.so usr/lib/qt/plugins/lipi_toolkit/libsubstroke.so usr/lib/qt/plugins/virtualkeyboard/libqtvirtualkeyboard_lipi.so

Quoted 4 lines
---
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  | 63 ++-----------------
 1 file changed, 4 insertions(+), 59 deletions(-)

Applied to master after fixing the conflicts and dropping the qt5base dependency. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#28 lore raw

PATCH v6 9/28 package/quazip: Convert to qmake infra

In reply to Andreas Naumann

We need to use correct staging path as prefix after switching to qmake infra, because the qmake infra no longer overwrites the built in install pathes.

Otherwise the build breaks when the install steps are trying to copy to /usr.

---
 package/quazip/quazip.mk | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
package/quazip/quazip.mk +2 -16
index 53042f6c4c..35cf8adafd 100644
@@ -13,20 +13,6 @@ QUAZIP_DEPENDENCIES = \
 QUAZIP_LICENSE = LGPL-2.1
 QUAZIP_LICENSE_FILES = COPYING
 
-define QUAZIP_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
+QUAZIP_CONF_OPTS = PREFIX=$(STAGING_DIR)/usr
 
-define QUAZIP_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QUAZIP_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR)
-endef
-
-define QUAZIP_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#29 lore raw

PATCH v6 9/28 package/quazip: Convert to qmake infra

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:31 +0100 Andreas Naumann <[email protected]>…

We need to use correct staging path as prefix after switching to qmake infra, because the qmake infra no longer overwrites the built in install pathes.

Otherwise the build breaks when the install steps are trying to copy to /usr.

A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where the things will be once installed in the target. Do we really need to do this change?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#30 lore raw

PATCH v6 9/28 package/quazip: Convert to qmake infra

Hi,

Am 17.02.20 um 22:57 schrieb Thomas Petazzoni:

Quoted 6 lines
Quoted 3 lines · On Mon, 17 Feb 2020 22:23:31 +0100 Andreas Naumann <[email protected]>…

We need to use correct staging path as prefix after switching to qmake infra, because the qmake infra no longer overwrites the built in install pathes.

Quoted 7 lines
Quoted 3 lines

Otherwise the build breaks when the install steps are trying to copy to /usr.

A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where the things will be once installed in the target. Do we really need to do this change?

I agree it's probably not how PREFIX is intended to be used. But after all the project doesnt seem to support cross-compile/install properly as you can see by the need to explicitly set INSTALL_ROOT to a different path for staging/target.

I had an earlier solution where I made a patch to the quazip .pro file, but I wasnt entirely sure if it's correct. So I figured with this solution I dont need to do any upstream work ;-), which I'm not 100% sure about.

Andreas

Quoted 5 lines

Thanks,

Thomas

#31 lore raw

PATCH v6 9/28 package/quazip: Convert to qmake infra

Quoted 8 lines · On Tue, 18 Feb 2020 11:00:07 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 3 lines

A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where the things will be once installed in the target. Do we really need to do this change?

I agree it's probably not how PREFIX is intended to be used. But after all the project doesnt seem to support cross-compile/install properly as you can see by the need to explicitly set INSTALL_ROOT to a different path for staging/target.

Well, in fact the current install procedure for quazip is perfect, as you don't have to do the horrible rsync dance that we have to do for other Qt packages. The fact that INSTALL_ROOT is different for staging and target is *perfect*, it is exactly how INSTALL_ROOT should be have in the first place: like DESTDIR.

So I'd really like to see more research done on this package, to understand why we need to bogus PREFIX= variable, and make sure it behaves like other packages.

It would in fact be ideal if all other Qt packages could properly support INSTALL_ROOT like quazip does.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#32 lore raw

PATCH v6 9/28 package/quazip: Convert to qmake infra

Hi Thomas,

Quoted 12 lines · Thomas Petazzoni
Quoted 8 lines · On Tue, 18 Feb 2020 11:00:07 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 3 lines

A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where the things will be once installed in the target. Do we really need to do this change?

I agree it's probably not how PREFIX is intended to be used. But after all the project doesnt seem to support cross-compile/install properly as you can see by the need to explicitly set INSTALL_ROOT to a different path for staging/target.

Quoted 5 lines

Well, in fact the current install procedure for quazip is perfect, as you don't have to do the horrible rsync dance that we have to do for other Qt packages. The fact that INSTALL_ROOT is different for staging and target is *perfect*, it is exactly how INSTALL_ROOT should be have in the first place: like DESTDIR.

I couldn't agree more, if INSTALL_ROOT would not touch the destination for host-files the whole thing would be much easier. But, it isnt that quazip works better than other packages. It's just simpler because it doesnt have any files for host.

Quoted 4 lines

So I'd really like to see more research done on this package, to understand why we need to bogus PREFIX= variable, and make sure it behaves like other packages.

Again, the quazip.pro uses PREFIX directly as install destination, so it's not aware of the sysroot/staging pathes for cross-compiles. This could probably be changed by patching it to use QT_INSTALL_PREFIX (which is prefixed with the staging path, if set). I dont know if that would break other things or require more changes in the project file.

Quoted 3 lines

It would in fact be ideal if all other Qt packages could properly support INSTALL_ROOT like quazip does.

See above. It's not the packages fault but how qmake uses INSTALL_ROOT.

best regards,
Andreas

Quoted 5 lines

Best regards,

Thomas

#33 lore raw

PATCH v6 10/28 package/qt5wayland: Convert to qmake infra

In reply to Andreas Naumann

Straightforward conversion except for the wayland-compositor configure option.

---
 package/qt5/qt5wayland/qt5wayland.mk | 56 +---------------------------
 1 file changed, 2 insertions(+), 54 deletions(-)
package/qt5/qt5wayland/qt5wayland.mk +2 -54
index 4790efc660..b98a28b5c8 100644
@@ -27,59 +27,7 @@ QT5WAYLAND_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICE
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WAYLAND_COMPOSITOR),y)
-QT5WAYLAND_QMAKEFLAGS += CONFIG+=wayland-compositor
+QT5WAYLAND_CONF_OPTS += CONFIG+=wayland-compositor
 endif
 
-define QT5WAYLAND_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5WAYLAND_QMAKEFLAGS))
-endef
-
-define QT5WAYLAND_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WAYLAND_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5WAYLAND_COMPOSITOR),y)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5WAYLAND_INSTALL_COMPOSITOR
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandCompositor.so* $(TARGET_DIR)/usr/lib
-endef
-else
-define QT5WAYLAND_INSTALL_COMPOSITOR
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Compositor.so* $(TARGET_DIR)/usr/lib
-endef
-endif
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5_VERSION_LATEST),yy)
-define QT5WAYLAND_INSTALL_COMPOSITOR_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWayland $(TARGET_DIR)/usr/qml/
-endef
-endif
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL),y)
-define QT5WAYLAND_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/wayland $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-else
-define QT5WAYLAND_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/wayland $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-endif
-
-define QT5WAYLAND_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandClient.so* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/wayland* $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforms/libqwayland* $(TARGET_DIR)/usr/lib/qt/plugins/platforms
-	$(QT5WAYLAND_INSTALL_COMPOSITOR)
-	$(QT5WAYLAND_INSTALL_COMPOSITOR_QMLS)
-	$(QT5WAYLAND_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#34 lore raw

PATCH v6 10/28 package/qt5wayland: Convert to qmake infra

Quoted 7 lines · On Mon, 17 Feb 2020 22:23:32 +0100 Andreas Naumann <[email protected]>…

Straightforward conversion except for the wayland-compositor configure option.

---
 package/qt5/qt5wayland/qt5wayland.mk | 56 +---------------------------
 1 file changed, 2 insertions(+), 54 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#35 lore raw

PATCH v6 11/28 package/qt5webchannel: Convert to qmake infra

In reply to Andreas Naumann

The install of the javascript is custom and thus needs to be kept.

---
 package/qt5/qt5webchannel/qt5webchannel.mk | 39 ++--------------------
 1 file changed, 2 insertions(+), 37 deletions(-)
package/qt5/qt5webchannel/qt5webchannel.mk +2 -37
index 22523036e7..112d5218ba 100644
@@ -25,18 +25,6 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBCHANNEL_DEPENDENCIES += qt5declarative
 endif
 
-define QT5WEBCHANNEL_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBCHANNEL_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBCHANNEL_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 	$(INSTALL) -m 0644 -D $(@D)/examples/webchannel/shared/qwebchannel.js \
@@ -49,29 +37,6 @@ define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webchannel $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebChannel.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5WEBCHANNEL_INSTALL_TARGET_CMDS
-	$(QT5WEBCHANNEL_INSTALL_TARGET_LIBS)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_QMLS)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES)
-endef
+QT5WEBCHANNEL_POST_INSTALL_TARGET_HOOKS += QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#36 lore raw

PATCH v6 11/28 package/qt5webchannel: Convert to qmake infra

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:33 +0100 Andreas Naumann <[email protected]>…

The install of the javascript is custom and thus needs to be kept.

---
 package/qt5/qt5webchannel/qt5webchannel.mk | 39 ++--------------------
 1 file changed, 2 insertions(+), 37 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#37 lore raw

PATCH v6 12/28 package/qt5webkit: Convert to qmake infra

In reply to Andreas Naumann

Mostly straightforward conversion.
The jsc binary was not installed automatically. Unsure of its significance the custom install command is kept in a hook.

Note:
The generic install creates QtWebProcess in /usr/libexec/ instead of /usr/bin.

---
 package/qt5/qt5webkit/qt5webkit.mk | 29 +++++++----------------------
 1 file changed, 7 insertions(+), 22 deletions(-)
package/qt5/qt5webkit/qt5webkit.mk +7 -22
index 25c5495482..f20fa24b9c 100644
@@ -37,35 +37,20 @@ endif
 # QtWebkit's build system uses python, but only supports python2. We work
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
-QT5WEBKIT_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+QT5WEBKIT_CONF_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+QT5WEBKIT_MAKE_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
 define QT5WEBKIT_PYTHON2_SYMLINK
 	mkdir -p $(@D)/host-bin
 	ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
 endef
 QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
 
-define QT5WEBKIT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/bin/qmake WEBKIT_CONFIG+=use_system_leveldb)
-endef
-
-define QT5WEBKIT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBKIT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) install
-endef
+QT5WEBKIT_CONF_OPTS = WEBKIT_CONFIG+=use_system_leveldb
 
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBKIT_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-define QT5WEBKIT_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
+define QT5WEBKIT_INSTALL_TARGET_EXTRAS
 	cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
-	$(QT5WEBKIT_INSTALL_TARGET_QMLS)
 endef
 
-$(eval $(generic-package))
+QT5WEBKIT_POST_INSTALL_TARGET_HOOKS += QT5WEBKIT_INSTALL_TARGET_EXTRAS
+
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#38 lore raw

PATCH v6 12/28 package/qt5webkit: Convert to qmake infra

Quoted 11 lines · On Mon, 17 Feb 2020 22:23:34 +0100 Andreas Naumann <[email protected]>…

Mostly straightforward conversion.
The jsc binary was not installed automatically. Unsure of its significance the custom install command is kept in a hook.

Note:
The generic install creates QtWebProcess in /usr/libexec/ instead of /usr/bin.

---
 package/qt5/qt5webkit/qt5webkit.mk | 29 +++++++----------------------
 1 file changed, 7 insertions(+), 22 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#39 lore raw

PATCH v6 13/28 package/qt5webkit-examples: Convert to qmake infra

In reply to Andreas Naumann

Straightforward conversion. Only conditional dependencies have to remain.

---
 .../qt5webkit-examples/qt5webkit-examples.mk  | 23 +------------------
 1 file changed, 1 insertion(+), 22 deletions(-)
package/qt5/qt5webkit-examples/qt5webkit-examples.mk +1 -22
index 94153fd652..1f6058657d 100644
@@ -26,29 +26,8 @@ ifeq ($(BR2_PACKAGE_QT5XMLPATTERNS),y)
 QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5xmlpatterns
 endif
 
-define QT5WEBKIT_EXAMPLES_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBKIT_EXAMPLES_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBKIT_EXAMPLES_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5declarative
-define QT5WEBKIT_EXAMPLES_INSTALL_QML
-	cp -dpfr $(@D)/examples/webkitqml $(TARGET_DIR)/usr/lib/qt/examples
-endef
 endif
 
-define QT5WEBKIT_EXAMPLES_INSTALL_TARGET_CMDS
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/examples
-	cp -dpfr $(@D)/examples/webkitwidgets $(TARGET_DIR)/usr/lib/qt/examples
-	$(QT5WEBKIT_EXAMPLES_INSTALL_QML)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#40 lore raw

PATCH v6 13/28 package/qt5webkit-examples: Convert to qmake infra

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:35 +0100 Andreas Naumann <[email protected]>…

Straightforward conversion. Only conditional dependencies have to remain.

---
 .../qt5webkit-examples/qt5webkit-examples.mk  | 23 +------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#41 lore raw

PATCH v6 14/28 package/qt5webengine: Convert to qmake infra

In reply to Andreas Naumann

Mostly straightforward conversion but keeping custom config/build env to apply the python2 workaround.

---
 package/qt5/qt5webengine/qt5webengine.mk | 47 +++---------------------
 1 file changed, 6 insertions(+), 41 deletions(-)
package/qt5/qt5webengine/qt5webengine.mk +6 -41
index 1d5ee8d819..798b777df0 100644
@@ -30,16 +30,16 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 endif
 
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_QMAKEFLAGS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
 endif
 
 # QtWebengine's build system uses python, but only supports python2. We work
@@ -63,42 +63,7 @@ QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
 QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
 endif
 
-define QT5WEBENGINE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(HOST_DIR)/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
-endef
-
-define QT5WEBENGINE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBENGINE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D) install
-endef
-
-define QT5WEBENGINE_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebEngine $(TARGET_DIR)/usr/qml/
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBENGINE_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webengine* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBENGINE_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebEngine*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/libexec/QtWebEngineProcess $(TARGET_DIR)/usr/libexec/
-	cp -dpfr $(STAGING_DIR)/usr/resources/ $(TARGET_DIR)/usr/
-	mkdir -p $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-	cp -dpfr $(STAGING_DIR)/usr/translations/qtwebengine_locales $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-endef
-endif
-
-define QT5WEBENGINE_INSTALL_TARGET_CMDS
-	$(QT5WEBENGINE_INSTALL_TARGET_LIBS)
-	$(QT5WEBENGINE_INSTALL_TARGET_QMLS)
-	$(QT5WEBENGINE_INSTALL_TARGET_EXAMPLES)
-endef
+QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
+QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#42 lore raw

PATCH v6 14/28 package/qt5webengine: Convert to qmake infra

Hello,

Quoted 4 lines · On Mon, 17 Feb 2020 22:23:36 +0100 Andreas Naumann <[email protected]>…

Mostly straightforward conversion but keeping custom config/build env to apply the python2 workaround.

I've applied, but I have a comment, see below.

package/qt5/qt5webengine/qt5webengine.mk QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG · line 67

Quoted 2 lines
package/qt5/qt5webengine/qt5webengine.mk +2 -0
+QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
+QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)

I'm not really thrilled by this, and we had to do the same in qt5webkit. This is modeled after the autotools-package infrastructure, where normally environment variables passed to the ./configure script don't need to be passed again at build time.

But if with qmake they are needed at both configure time and build time, then perhaps we should change to have a single <pkg>_ENV variable, passed at both configure and build time.

Let's see how many packages need this, and we'll adjust later if needed.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#43 lore raw

PATCH v6 14/28 package/qt5webengine: Convert to qmake infra

Hi,

Quoted 20 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · On Mon, 17 Feb 2020 22:23:36 +0100 Andreas Naumann <[email protected]>…

Mostly straightforward conversion but keeping custom config/build env to apply the python2 workaround.

I've applied, but I have a comment, see below.

package/qt5/qt5webengine/qt5webengine.mk QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG · line 67

Quoted 2 lines
package/qt5/qt5webengine/qt5webengine.mk +2 -0
+QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
+QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)

I'm not really thrilled by this, and we had to do the same in qt5webkit. This is modeled after the autotools-package infrastructure, where normally environment variables passed to the ./configure script don't need to be passed again at build time.

Quoted 3 lines

But if with qmake they are needed at both configure time and build time, then perhaps we should change to have a single <pkg>_ENV variable, passed at both configure and build time.

Actually I dont know which of the env settings are needed at configure time and which at build time or both. I've just kept the logic as it was.

regards,
Andreas

Quoted 7 lines

Let's see how many packages need this, and we'll adjust later if needed.

Best regards,

Thomas

#44 lore raw

PATCH v6 15/28 package/qt-webkit-kiosk: Convert to qmake infra

In reply to Andreas Naumann

Convert but keep the slightly complicated custom install step for now.

---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +3 -8
index a714fca9c9..22cbf3cb87 100644
@@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia
 QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0
 QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html
 
-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QT_WEBKIT_KIOSK_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QT_WEBKIT_KIOSK_INSTALL_STAGING = NO
+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr
 
 define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \
@@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 		$(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound)
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#45 lore raw

PATCH v6 15/28 package/qt-webkit-kiosk: Convert to qmake infra

Hello Andreas,

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:37 +0100 Andreas Naumann <[email protected]>…

Convert but keep the slightly complicated custom install step for now.

---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

I've applied, but I have some comments below.

Quoted 7 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +0 -0
index a714fca9c9..22cbf3cb87 100644
@@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia
 QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0

package/qt-webkit-kiosk/qt-webkit-kiosk.mk QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia · line 14

Quoted 10 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +1 -7
 QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html
 
-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QT_WEBKIT_KIOSK_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QT_WEBKIT_KIOSK_INSTALL_STAGING = NO

This is not needed, as this is the default, and check-package complains about this.

package/qt-webkit-kiosk/qt-webkit-kiosk.mk QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia · line 15

Quoted 1 line
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +1 -0
+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr

Do you know why specifically for this package we need to pass PREFIX=/usr, and not for any other qmake-based package ?

package/qt-webkit-kiosk/qt-webkit-kiosk.mk define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS · line 25

Quoted 5 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +0 -0
 define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \
@@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 		$(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound)
 endef

Any reason for these custom installation commands, rather than using the package-provided installation logic ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#46 lore raw

PATCH v6 15/28 package/qt-webkit-kiosk: Convert to qmake infra

Hi Thomas,

Quoted 23 lines · Thomas Petazzoni

Hello Andreas,

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:37 +0100 Andreas Naumann <[email protected]>…

Convert but keep the slightly complicated custom install step for now.

---
  package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
  1 file changed, 3 insertions(+), 8 deletions(-)

I've applied, but I have some comments below.

Quoted 9 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +0 -0
index a714fca9c9..22cbf3cb87 100644
@@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia
  QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0
  QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html
 
Quoted 12 lines

package/qt-webkit-kiosk/qt-webkit-kiosk.mk QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia · line 14

Quoted 8 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +1 -7
-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QT_WEBKIT_KIOSK_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QT_WEBKIT_KIOSK_INSTALL_STAGING = NO

This is not needed, as this is the default, and check-package complains about this.

Ok.

Quoted 4 lines

package/qt-webkit-kiosk/qt-webkit-kiosk.mk QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia · line 15

Quoted 1 line
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +1 -0
+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr

Do you know why specifically for this package we need to pass PREFIX=/usr, and not for any other qmake-based package ?

Well, it's the same for quazip and other application projects I've seen:
They dont use the default install paths of the corresponding qmake (QT_INSTALL_PREFIX|DATA|DOCS|LIBS|BINS|...), but define their own. This is fair enough but usually results in ignoring the knowledge about sysroot/staging destination which qmake does have. This information then has to be put into the INSTALL_ROOT variable in case of cross-compile.

Quoted 9 lines

package/qt-webkit-kiosk/qt-webkit-kiosk.mk define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS · line 25

Quoted 6 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +0 -0
  define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
  	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \
@@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
  		$(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound)
  endef

Any reason for these custom installation commands, rather than using the package-provided installation logic ?

Uh, I dont remember. Probably the default didnt work or me being lazy to not having to test even more.

regards,
Andreas

Quoted 5 lines

Thanks!

Thomas

#47 lore raw

PATCH v6 16/28 package/qt5cinex: Convert to qmake infra

In reply to Andreas Naumann

Keep custom install logic because qt5cinex has no built-in install target.

---
 package/qt5cinex/qt5cinex.mk | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
package/qt5cinex/qt5cinex.mk +1 -8
index 89c38ee3f5..2b27f651d8 100644
@@ -17,13 +17,6 @@ QT5CINEX_DEPENDENCIES = qt5base qt5declarative
 QT5CINEX_LICENSE = CC-BY-3.0
 QT5CINEX_LICENSE_FILES = README
 
-define QT5CINEX_CONFIGURE_CMDS
-	cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake
-endef
-
-define QT5CINEX_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
 
 # In addition to the Cinematic Experience itself, we also install a
 # wrapper shell script to /usr/bin: the Cinematic Experience binary
@@ -39,4 +32,4 @@ define QT5CINEX_INSTALL_TARGET_CMDS
 		$(TARGET_DIR)/usr/bin/CinematicExperience-demo
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.25.0
#48 lore raw

PATCH v6 16/28 package/qt5cinex: Convert to qmake infra

Quoted 6 lines · On Mon, 17 Feb 2020 22:23:38 +0100 Andreas Naumann <[email protected]>…

Keep custom install logic because qt5cinex has no built-in install target.

---
 package/qt5cinex/qt5cinex.mk | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#49 lore raw

PATCH v6 17/28 core/pkg-infra: Fix package file statistics for parallel build

In reply to Andreas Naumann

When activating top level parallel build, multiple processes may try to modify the various *files-list* files in the common build/ directory at the same time. This can cause racy build failures.

The fix here is to use flock to ensure exclusive execution of the statistics gathering code. For this to work it is assumed that the target/staging/host directories are isolated, which is true for per-package builds.
For standard sequential builds, the locking is of course unnecessary but no conditional handling is implemented since the runtime cost is expected to be next to nothing.

For flock to work, the statistics gathering code must be run in a single subshell. Otherwise the lockfile descriptor would be closed after the subshell (= the Makefile line where it was opened) ends and thus the lock would be released before even entering the critical code section.

---
 package/pkg-generic.mk | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
package/pkg-generic.mk +8 -6
index 268d999efb..d18805e2d0 100644
@@ -64,20 +64,22 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time
 # $(3): suffix of file  (optional)
 define step_pkg_size_inner
 	@touch $(BUILD_DIR)/.files-list$(3).stat
-	@touch $(BUILD_DIR)/packages-file-list$(3).txt
-	$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt
+	exec 3>$(BUILD_DIR)/packages-file-list$(3).txt; \
+	flock -x 3; \
+	$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt; \
 	cd $(2); \
 	LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
-		| LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new
+		| LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new; \
 	LC_ALL=C comm -13 \
 		$(BUILD_DIR)/.files-list$(3).stat \
 		$(BUILD_DIR)/.files-list$(3).new \
-		> $($(PKG)_BUILDDIR)/.files-list$(3).txt
+		> $($(PKG)_BUILDDIR)/.files-list$(3).txt; \
 	sed -r -e 's/^[^,]+/$(1)/' \
 		$($(PKG)_BUILDDIR)/.files-list$(3).txt \
-		>> $(BUILD_DIR)/packages-file-list$(3).txt
+		>> $(BUILD_DIR)/packages-file-list$(3).txt; \
 	mv $(BUILD_DIR)/.files-list$(3).new \
-		$(BUILD_DIR)/.files-list$(3).stat
+		$(BUILD_DIR)/.files-list$(3).stat; \
+	exec 3>&-
 endef
 
 define step_pkg_size
Signature · 1 line
2.25.0
#50 lore raw

PATCH v6 17/28 core/pkg-infra: Fix package file statistics for parallel build

Hello,

Quoted 12 lines · On Mon, 17 Feb 2020 22:23:39 +0100 Andreas Naumann <[email protected]>…

When activating top level parallel build, multiple processes may try to modify the various *files-list* files in the common build/ directory at the same time. This can cause racy build failures.

The fix here is to use flock to ensure exclusive execution of the statistics gathering code. For this to work it is assumed that the target/staging/host directories are isolated, which is true for per-package builds.
For standard sequential builds, the locking is of course unnecessary but no conditional handling is implemented since the runtime cost is expected to be next to nothing.

Quoted 7 lines

For flock to work, the statistics gathering code must be run in a single subshell. Otherwise the lockfile descriptor would be closed after the subshell (= the Makefile line where it was opened) ends and thus the lock would be released before even entering the critical code section.

This is no longer needed: we have taken a different approach in commit 0e2be4db8ab01d479177a3a187c22525752195ae, where we make the logic per-package, and collect the overall data in target-finalize.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#51 lore raw

PATCH v6 17/28 core/pkg-infra: Fix package file statistics for parallel build

Hi,

Quoted 23 lines · Thomas Petazzoni

Hello,

Quoted 18 lines · On Mon, 17 Feb 2020 22:23:39 +0100 Andreas Naumann <[email protected]>…

When activating top level parallel build, multiple processes may try to modify the various *files-list* files in the common build/ directory at the same time. This can cause racy build failures.

The fix here is to use flock to ensure exclusive execution of the statistics gathering code. For this to work it is assumed that the target/staging/host directories are isolated, which is true for per-package builds.
For standard sequential builds, the locking is of course unnecessary but no conditional handling is implemented since the runtime cost is expected to be next to nothing.

For flock to work, the statistics gathering code must be run in a single subshell. Otherwise the lockfile descriptor would be closed after the subshell (= the Makefile line where it was opened) ends and thus the lock would be released before even entering the critical code section.

Quoted 5 lines
Quoted 1 line

This is no longer needed: we have taken a different approach in commit 0e2be4db8ab01d479177a3a187c22525752195ae, where we make the logic per-package, and collect the overall data in target-finalize.

I'm very glad as I wasnt too happy about this.

regards,
Andreas

Quoted 5 lines

Thanks,

Thomas

#52 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

In reply to Andreas Naumann

Setting -O in top level make somehow interferes with the explicit setting of -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure case.

---
 package/cmake/cmake.mk | 1 +
 1 file changed, 1 insertion(+)
package/cmake/cmake.mk +1 -0
index 1f30736023..690603b09c 100644
@@ -41,6 +41,7 @@ define HOST_CMAKE_CONFIGURE_CMDS
 	(cd $(@D); \
 		$(HOST_CONFIGURE_OPTS) \
 		CFLAGS="$(HOST_CMAKE_CFLAGS)" \
+		MAKEFLAGS= \
 		./bootstrap --prefix=$(HOST_DIR) \
 			--parallel=$(PARALLEL_JOBS) -- \
 			-DCMAKE_C_FLAGS="$(HOST_CMAKE_CFLAGS)" \
Signature · 1 line
2.25.0
#53 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hello,

Let's add Arnout in the loop, for the make sorcery.

Quoted 5 lines · On Mon, 17 Feb 2020 22:23:40 +0100 Andreas Naumann <[email protected]>…

Setting -O in top level make somehow interferes with the explicit setting of -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure case.

This commit log was a bit vague on what the issue was. If I understand correctly, what you see is that the "make" process running to build host-cmake is constantly entering/leaving its build directory, like this:

make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'

Reading
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
it seems like it is expected for -Otarget to behave like this. However, if you use -Orecurse, it works as expected: the entire output of the sub-make is buffered, and output in one-go when the make target at the Buildroot level completes.

So I'm not sure we want to prevent -Otarget from doing what it does: we should probably instead use -Orecurse.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#54 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Quoted 3 lines · Thomas Petazzoni

Hello,

Let's add Arnout in the loop, for the make sorcery.

Not much sorcery going on here...

Quoted 24 lines
Quoted 5 lines · On Mon, 17 Feb 2020 22:23:40 +0100 Andreas Naumann <[email protected]>…

Setting -O in top level make somehow interferes with the explicit setting of -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure case.

This commit log was a bit vague on what the issue was. If I understand correctly, what you see is that the "make" process running to build host-cmake is constantly entering/leaving its build directory, like this:

make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'

Quoted 3 lines

Reading
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
it seems like it is expected for -Otarget to behave like this.

Indeed, looks exactly like expected.

Quoted 7 lines

However,
if you use -Orecurse, it works as expected: the entire output of the sub-make is buffered, and output in one-go when the make target at the Buildroot level completes.

So I'm not sure we want to prevent -Otarget from doing what it does: we should probably instead use -Orecurse.

Where do we pass -Otarget to begin with?

There could be something to be set for globall resetting MAKEFLAGS and taking
control over the make flags entirely from Buildroot infra when calling into package build systems. However, this is a bit complicated in make, and I'm not entirely convinced we really want that...

Regards,
Arnout

#55 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Quoted 11 lines · On Thu, 12 Mar 2020 14:00:24 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 3 lines

Reading
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
it seems like it is expected for -Otarget to behave like this.

Indeed, looks exactly like expected.

Quoted 5 lines

However,
if you use -Orecurse, it works as expected: the entire output of the sub-make is buffered, and output in one-go when the make target at the Buildroot level completes.

Quoted 5 lines
Quoted 2 lines

So I'm not sure we want to prevent -Otarget from doing what it does: we should probably instead use -Orecurse.

Where do we pass -Otarget to begin with?

We don't. But I guess Andreas is using "make -Otarget" as it is using/testing top-level parallel build and it doesn't want messed up build log.

Quoted 4 lines

There could be something to be set for globall resetting MAKEFLAGS and taking
control over the make flags entirely from Buildroot infra when calling into package build systems. However, this is a bit complicated in make, and I'm not entirely convinced we really want that...

And I assume we wouldn't want to solve on that on a per-package basis, but rather more globally for all packages.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#56 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

In reply to Arnout Vandecappelle

Hi,

Quoted 19 lines · Arnout Vandecappelle
Quoted 3 lines · Thomas Petazzoni

Hello,

Let's add Arnout in the loop, for the make sorcery.

Not much sorcery going on here...

Quoted 10 lines
Quoted 5 lines · On Mon, 17 Feb 2020 22:23:40 +0100 Andreas Naumann <[email protected]>…

Setting -O in top level make somehow interferes with the explicit setting of -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure case.

This commit log was a bit vague on what the issue was. If I understand

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

Quoted 14 lines
Quoted 14 lines

correctly, what you see is that the "make" process running to build host-cmake is constantly entering/leaving its build directory, like this:

make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'

Quoted 9 lines
Quoted 3 lines

Reading
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
it seems like it is expected for -Otarget to behave like this.

Indeed, looks exactly like expected. >

Quoted 4 lines

However,
if you use -Orecurse, it works as expected: the entire output of the sub-make is buffered, and output in one-go when the make target at the Buildroot level completes.

I dont mind the entering/leaving info. Rather I thought -Orecurse would buffer everything to the end of the buildroot process, which is not what I wanted.

Quoted 6 lines
Quoted 3 lines

So I'm not sure we want to prevent -Otarget from doing what it does: we should probably instead use -Orecurse.

Where do we pass -Otarget to begin with?

I did after brmake.

Quoted 5 lines

There could be something to be set for globall resetting MAKEFLAGS and taking
control over the make flags entirely from Buildroot infra when calling into package build systems. However, this is a bit complicated in make, and I'm not entirely convinced we really want that...

Hmm, I have not seen problems anywhere else with the -O option. Just in this case the configure step died. After some fiddling I found out it's connected to what the bootstrap script does with the option --parallel=$(PARALLEL_JOBS). If the --parallel option was not used then -Oxxx was not a problem, but of course, the build used one core only.

regards,
Andreas

Quoted 8 lines

Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#57 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hello,

Quoted 5 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#58 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hello,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

Quoted 8 lines
Quoted 3 lines

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

Quoted 12 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Asaf.

#59 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hi,

Quoted 21 lines · Asaf Kahlon

Hello,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

Quoted 8 lines
Quoted 3 lines

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

Quoted 7 lines

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

I'm not using ccache at the moment and I dont get a sensible error message. But seeing your error message I recognize it because probably I used ccache back when I made the patch.

Now after testing again with master (0f0868a) I can state the following:

Build breaks during configure (bootstrap) phase when running
* make -j2 -Oline host-cmake
* make -j2 -Otarget host-cmake
with
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors:
/home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log

Looking at the logfile I cant figure out what the problem is.

The build succeeds with

*  make -j2 host-cmake
*  make -j2 -Onone host-cmake
*  make -j2 -Orecurse host-cmake

My assumption is that the problem lies in passing certain MAKEFLAGS for a parallel build while not passing -jxxx itself but using the --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow reassembles the -jxxx option and certain ${cmake_make_flags} in an incompatible way (at least for -Oline and -Otarget).

I use GNU Make 4.1.

best regards,
Andreas

Quoted 17 lines
Quoted 4 lines

Best regards,

Quoted 9 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Asaf.

#60 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hello,

Quoted 56 lines · Andreas Naumann

Hi,

Quoted 21 lines · Asaf Kahlon

Hello,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

Quoted 8 lines
Quoted 3 lines

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

Quoted 7 lines

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

I'm not using ccache at the moment and I dont get a sensible error message. But seeing your error message I recognize it because probably I used ccache back when I made the patch.

Now after testing again with master (0f0868a) I can state the following:

Build breaks during configure (bootstrap) phase when running
* make -j2 -Oline host-cmake
* make -j2 -Otarget host-cmake
with
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors:
/home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log

Looking at the logfile I cant figure out what the problem is.

The build succeeds with

*  make -j2 host-cmake
*  make -j2 -Onone host-cmake
*  make -j2 -Orecurse host-cmake
Quoted 7 lines

My assumption is that the problem lies in passing certain MAKEFLAGS for a parallel build while not passing -jxxx itself but using the --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow reassembles the -jxxx option and certain ${cmake_make_flags} in an incompatible way (at least for -Oline and -Otarget).

I use GNU Make 4.1.

This line made me suspect the make version.
I use make 4.2.1 and it always works for me.
I tried to reproduce it on a docker with make 4.1 and it instantly reproduced. When I installed on the docker container Make 4.2.1 - it worked. Can this be a bug in Make?

Quoted 22 lines

best regards,
Andreas

Quoted 17 lines
Quoted 4 lines

Best regards,

Quoted 9 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Asaf.

Regards,
Asaf.

#61 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hi,

Quoted 65 lines · Asaf Kahlon

Hello,

Quoted 62 lines · Andreas Naumann

Hi,

Quoted 21 lines · Asaf Kahlon

Hello,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

Quoted 8 lines
Quoted 3 lines

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

Quoted 7 lines

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

I'm not using ccache at the moment and I dont get a sensible error message. But seeing your error message I recognize it because probably I used ccache back when I made the patch.

Now after testing again with master (0f0868a) I can state the following:

Build breaks during configure (bootstrap) phase when running
* make -j2 -Oline host-cmake
* make -j2 -Otarget host-cmake
with
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors:
/home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log

Looking at the logfile I cant figure out what the problem is.

The build succeeds with

*  make -j2 host-cmake
*  make -j2 -Onone host-cmake
*  make -j2 -Orecurse host-cmake

My assumption is that the problem lies in passing certain MAKEFLAGS for a parallel build while not passing -jxxx itself but using the --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow reassembles the -jxxx option and certain ${cmake_make_flags} in an incompatible way (at least for -Oline and -Otarget).

Quoted 7 lines
Quoted 1 line

I use GNU Make 4.1.

This line made me suspect the make version.
I use make 4.2.1 and it always works for me.
I tried to reproduce it on a docker with make 4.1 and it instantly reproduced. When I installed on the docker container Make 4.2.1 - it worked. Can this be a bug in Make?

I tried 4.2.1 as well and the issue is gone. In the changelog for 4.2 at
https://lists.gnu.org/archive/html/info-gnu/2016-05/msg00013.html I found:
* main.c(main): Disable output sync without parallel builds. To me it seems like this could be the culprit. The question is, what should we do with this? Check for Make version < 4.2 && -j && -O and give a warning? Maybe this is a bit too much.

regards,
Andreas

Quoted 27 lines
Quoted 23 lines

best regards,
Andreas

Quoted 17 lines
Quoted 4 lines

Best regards,

Quoted 9 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Asaf.

Regards,
Asaf.

#62 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hi,

Quoted 77 lines · Andreas Naumann

Hi,

Quoted 65 lines · Asaf Kahlon

Hello,

Quoted 62 lines · Andreas Naumann

Hi,

Quoted 21 lines · Asaf Kahlon

Hello,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · On Mon, 16 Mar 2020 23:15:24 +0100 Andreas Naumann <[email protected]> wrote:
Quoted 1 line
Quoted 1 line

This commit log was a bit vague on what the issue was. If I understand

Quoted 8 lines
Quoted 3 lines

The issue was that the cmake configure step stopped with an error if I used the -O option. I dont think it was related to which output strategy was used.

I have not been able to reproduce the CMake configure step failure then. Are you still able to reproduce this? If so, could you provide more details about the setup: make version being, exact command line, Buildroot version, etc ?

Quoted 7 lines

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

I'm not using ccache at the moment and I dont get a sensible error message. But seeing your error message I recognize it because probably I used ccache back when I made the patch.

Now after testing again with master (0f0868a) I can state the following:

Build breaks during configure (bootstrap) phase when running
* make -j2 -Oline host-cmake
* make -j2 -Otarget host-cmake
with
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors:
/home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log

Looking at the logfile I cant figure out what the problem is.

The build succeeds with

*  make -j2 host-cmake
*  make -j2 -Onone host-cmake
*  make -j2 -Orecurse host-cmake

My assumption is that the problem lies in passing certain MAKEFLAGS for a parallel build while not passing -jxxx itself but using the --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow reassembles the -jxxx option and certain ${cmake_make_flags} in an incompatible way (at least for -Oline and -Otarget).

Quoted 7 lines
Quoted 1 line

I use GNU Make 4.1.

This line made me suspect the make version.
I use make 4.2.1 and it always works for me.
I tried to reproduce it on a docker with make 4.1 and it instantly reproduced. When I installed on the docker container Make 4.2.1 - it worked. Can this be a bug in Make?

Quoted 3 lines

I tried 4.2.1 as well and the issue is gone. In the changelog for 4.2 at
https://lists.gnu.org/archive/html/info-gnu/2016-05/msg00013.html I found:
* main.c(main): Disable output sync without parallel builds.

Actually, this commit was not the one which fixes the bug (although I also suspected it
because of the commit title).
I did a git-bisect from 4.1 to 4.2 and found out the commit was fb7a7ad (Extract jobserver implementation into OS-specific files.)

Quoted 3 lines

To me it seems like this could be the culprit. The question is, what should we do with this? Check for Make version < 4.2 && -j && -O and give a warning? Maybe this is a bit too much.

We now check for make>4.0. Do we want to bump it?
Maybe some of the core Buildroot maintainers can give their advice here.

Quoted 31 lines

regards,
Andreas

Quoted 27 lines
Quoted 23 lines

best regards,
Andreas

Quoted 17 lines
Quoted 4 lines

Best regards,

Quoted 9 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Asaf.

Regards,
Asaf.

Regards,
Asaf.

#63 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Quoted 5 lines · On Thu, 19 Mar 2020 13:40:36 +0200 Asaf Kahlon <[email protected]> wrote:
Quoted 3 lines

To me it seems like this could be the culprit. The question is, what should we do with this? Check for Make version < 4.2 && -j && -O and give a warning? Maybe this is a bit too much.

We now check for make>4.0. Do we want to bump it?
Maybe some of the core Buildroot maintainers can give their advice here.

We don't require make 4.0, we only require make 3.81.

The logic in support/dependencies/check-host-make.mk to check for make 4.0 is only for those few packages that do need make >= 4.0. For such packages, if the version of make installed system-wide is < 4.0, then we build our own host-make. But the overall Buildroot build is still executed by the system-wide make, which may be < 4.0.

Requiring make > 4.0 on the host system is too strict, especially considering that the issue we have here only happens in very specific
conditions: ccache support enabled, and passing of custom -O flags that are only useful for top-level parallel build, which is itself an experimental feature.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#64 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hello,

Quoted 10 lines · Thomas Petazzoni
Quoted 5 lines · On Thu, 19 Mar 2020 13:40:36 +0200 Asaf Kahlon <[email protected]> wrote:
Quoted 3 lines

To me it seems like this could be the culprit. The question is, what should we do with this? Check for Make version < 4.2 && -j && -O and give a warning? Maybe this is a bit too much.

We now check for make>4.0. Do we want to bump it?
Maybe some of the core Buildroot maintainers can give their advice here.

Quoted 7 lines

We don't require make 4.0, we only require make 3.81.

The logic in support/dependencies/check-host-make.mk to check for make 4.0 is only for those few packages that do need make >= 4.0. For such packages, if the version of make installed system-wide is < 4.0, then we build our own host-make. But the overall Buildroot build is still executed by the system-wide make, which may be < 4.0.

You're right, thanks for the correction.

Quoted 6 lines

Requiring make > 4.0 on the host system is too strict, especially considering that the issue we have here only happens in very specific
conditions: ccache support enabled, and passing of custom -O flags that are only useful for top-level parallel build, which is itself an experimental feature.

Just as a side note - the problem isn't related to ccache. We reproduced it with -O
and top-level parallel build.
In addition, if you have any suggestion how to address that case - I'll be more than happy
to help.

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Asaf.

#65 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Quoted 8 lines · On Thu, 19 Mar 2020 15:53:23 +0200 Asaf Kahlon <[email protected]> wrote:
Quoted 5 lines

Requiring make > 4.0 on the host system is too strict, especially considering that the issue we have here only happens in very specific
conditions: ccache support enabled, and passing of custom -O flags that are only useful for top-level parallel build, which is itself an experimental feature.

Just as a side note - the problem isn't related to ccache. We reproduced it with -O and top-level parallel build.

Sorry, I mixed things up, and thought it was ccache related.

Quoted 2 lines

In addition, if you have any suggestion how to address that case - I'll be more than happy to help.

I don't have any really good suggestion. But it's really a corner case:
only happens with make 4.1 if I understand correctly, and only when you pass some variants of the -O option.

The "make -Orecurse" option, which is the most relevant for top-level parallel build, does not exhibit the issue.

So essentially I simply wouldn't fix the problem. If you really want to fix it, maybe we can have some fancy logic in the main Makefile to detect that one of the problematic -O option is passed, and the make version is not appropriate, and then error out.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#66 lore raw

PATCH v6 18/28 package/cmake: Fix for using -O in top-level make

Hi,

Quoted 17 lines · Thomas Petazzoni
Quoted 8 lines · On Thu, 19 Mar 2020 15:53:23 +0200 Asaf Kahlon <[email protected]> wrote:
Quoted 5 lines

Requiring make > 4.0 on the host system is too strict, especially considering that the issue we have here only happens in very specific
conditions: ccache support enabled, and passing of custom -O flags that are only useful for top-level parallel build, which is itself an experimental feature.

Just as a side note - the problem isn't related to ccache. We reproduced it with -O and top-level parallel build.

Sorry, I mixed things up, and thought it was ccache related.

Quoted 2 lines

In addition, if you have any suggestion how to address that case - I'll be more than happy to help.

Quoted 8 lines

I don't have any really good suggestion. But it's really a corner case:
only happens with make 4.1 if I understand correctly, and only when you pass some variants of the -O option.

The "make -Orecurse" option, which is the most relevant for top-level parallel build, does not exhibit the issue.

So essentially I simply wouldn't fix the problem. If you really want to

That's ok for me since it really is a corner case.

regards,
Andreas

Quoted 6 lines

fix it, maybe we can have some fancy logic in the main Makefile to detect that one of the problematic -O option is passed, and the make version is not appropriate, and then error out.

Thomas

#67 lore raw

PATCH v6 19/28 core/pkg-infra: Add per-package support in qmake infra

In reply to Andreas Naumann

Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot pathes set during configuration/building of qt5base for their install destinations.
For the per-package host/staging infrastructure, this causes non-qt5base packages to litter the qt5base folders. In addition, buildroots target-install step subsequently fails because the respective files are missing from the per-package sysroot of the package itself.

Fortunately, qmake's built-in pathes can be overridden by placing a custom qt.conf next to the qmake binary. This is already used to facilitate SDK relocation. So for per-package path manipulation we can reuse that method, but need to change the host/sysroot values according to each per-package path.

---
 package/pkg-qmake.mk           |  1 +
 package/qt5/qt5.mk             | 15 +++++++++++++++
 package/qt5/qt5base/qt5base.mk |  9 +--------
 3 files changed, 17 insertions(+), 8 deletions(-)
package/pkg-qmake.mk +1 -0
index 53ac3e4a1c..3aa0dd7101 100644
@@ -46,6 +46,7 @@ $(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
 #
 ifndef $(2)_CONFIGURE_CMDS
 define $(2)_CONFIGURE_CMDS
+	$$(QT5_QT_CONF_FIXUP)
 	cd $$($(2)_BUILDDIR) && \
 	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
 endef
package/qt5/qt5.mk +15 -0
index d94d9cc99f..eb2a749678 100644
@@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
 
 include $(sort $(wildcard package/qt5/*/*.mk))
 
+# The file "qt.conf" can be used to override the hard-coded paths that are
+# compiled into the Qt library. We need it to make "qmake" relocatable and
+# tweak the per-package install pathes
+define QT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf && \
+	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
+		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
+endef
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5_QT_CONF_FIXUP
+        $(QT5_INSTALL_QT_CONF)
+endef
+endif
+
 # Variable for other Qt applications to use
 QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
package/qt5/qt5base/qt5base.mk +1 -8
index 03f984ef8c..960a802b3b 100644
@@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-# The file "qt.conf" can be used to override the hard-coded paths that are
-# compiled into the Qt library. We need it to make "qmake" relocatable.
-define QT5BASE_INSTALL_QT_CONF
-	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
-		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
-endef
-
-QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
 $(eval $(qmake-package))
Signature · 1 line
2.25.0
#68 lore raw

PATCH v6 19/28 core/pkg-infra: Add per-package support in qmake infra

Andreas, All,

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:

Quoted 8 lines

Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot pathes set during configuration/building of qt5base for their install destinations.
For the per-package host/staging infrastructure, this causes non-qt5base packages to litter the qt5base folders. In addition, buildroots target-install step subsequently fails because the respective files are missing from the per-package sysroot of the package itself.

Quoted 5 lines

Fortunately, qmake's built-in pathes can be overridden by placing a custom qt.conf next to the qmake binary. This is already used to facilitate SDK relocation. So for per-package path manipulation we can reuse that method, but need to change the host/sysroot values according to each per-package path.

Neat! :-)

Quoted 2 lines

---

[--SNIP--]

package/qt5/qt5.mk QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION) · line 24

Quoted 13 lines
package/qt5/qt5.mk +5 -0
index d94d9cc99f..eb2a749678 100644
@@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
 
 include $(sort $(wildcard package/qt5/*/*.mk))
 
+# The file "qt.conf" can be used to override the hard-coded paths that are
+# compiled into the Qt library. We need it to make "qmake" relocatable and
+# tweak the per-package install pathes
+define QT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf && \

This rm is superfluous, since you're overwriting the file anyway...

package/qt5/qt5.mk QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION) · line 26

Quoted 2 lines
package/qt5/qt5.mk +2 -0
+	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
+		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
                                     ^

Here -------------------------------/

No need to resend jsut for that, it can be fixed locally when applying. Otherwise:

Regards,
Yann E. MORIN.

Quoted 36 lines
package/qt5/qt5.mk +8 -0
+endef
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5_QT_CONF_FIXUP
+        $(QT5_INSTALL_QT_CONF)
+endef
+endif
+
 # Variable for other Qt applications to use
 QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
package/qt5/qt5base/qt5base.mk +1 -8
index 03f984ef8c..960a802b3b 100644
@@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-# The file "qt.conf" can be used to override the hard-coded paths that are
-# compiled into the Qt library. We need it to make "qmake" relocatable.
-define QT5BASE_INSTALL_QT_CONF
-	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
-		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
-endef
-
-QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
 $(eval $(qmake-package))
Signature · 6 lines
2.25.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#69 lore raw

PATCH v6 19/28 core/pkg-infra: Add per-package support in qmake infra

In reply to Andreas Naumann

Andreas, All,

Sorry for the long delay in looking (again) at this complex series... I'll try and apply as much as I can in the following days...

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:

Quoted 8 lines

Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot pathes set during configuration/building of qt5base for their install destinations.
For the per-package host/staging infrastructure, this causes non-qt5base packages to litter the qt5base folders. In addition, buildroots target-install step subsequently fails because the respective files are missing from the per-package sysroot of the package itself.

Quoted 7 lines

Fortunately, qmake's built-in pathes can be overridden by placing a custom qt.conf next to the qmake binary. This is already used to facilitate SDK relocation. So for per-package path manipulation we can reuse that method, but need to change the host/sysroot values according to each per-package path.

I did the slight ammendment I already pointed out earlier, and applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 69 lines
---
 package/pkg-qmake.mk           |  1 +
 package/qt5/qt5.mk             | 15 +++++++++++++++
 package/qt5/qt5base/qt5base.mk |  9 +--------
 3 files changed, 17 insertions(+), 8 deletions(-)
package/pkg-qmake.mk +1 -0
index 53ac3e4a1c..3aa0dd7101 100644
@@ -46,6 +46,7 @@ $(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
 #
 ifndef $(2)_CONFIGURE_CMDS
 define $(2)_CONFIGURE_CMDS
+	$$(QT5_QT_CONF_FIXUP)
 	cd $$($(2)_BUILDDIR) && \
 	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
 endef
package/qt5/qt5.mk +15 -0
index d94d9cc99f..eb2a749678 100644
@@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
 
 include $(sort $(wildcard package/qt5/*/*.mk))
 
+# The file "qt.conf" can be used to override the hard-coded paths that are
+# compiled into the Qt library. We need it to make "qmake" relocatable and
+# tweak the per-package install pathes
+define QT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf && \
+	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
+		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
+endef
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5_QT_CONF_FIXUP
+        $(QT5_INSTALL_QT_CONF)
+endef
+endif
+
 # Variable for other Qt applications to use
 QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
package/qt5/qt5base/qt5base.mk +1 -8
index 03f984ef8c..960a802b3b 100644
@@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-# The file "qt.conf" can be used to override the hard-coded paths that are
-# compiled into the Qt library. We need it to make "qmake" relocatable.
-define QT5BASE_INSTALL_QT_CONF
-	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
-		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
-endef
-
-QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
 $(eval $(qmake-package))
Signature · 6 lines
2.25.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#70 lore raw

PATCH v6 19/28 core/pkg-infra: Add per-package support in qmake infra

In reply to Andreas Naumann
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andreas" == Andreas Naumann <[email protected]> writes:

Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot pathes set during configuration/building of qt5base for their install destinations.
For the per-package host/staging infrastructure, this causes non-qt5base packages to litter the qt5base folders. In addition, buildroots target-install step subsequently fails because the respective files are missing from the per-package sysroot of the package itself.

Quoted 7 lines

Fortunately, qmake's built-in pathes can be overridden by placing a custom qt.conf next to the qmake binary. This is already used to facilitate SDK relocation. So for per-package path manipulation we can reuse that method, but need to change the host/sysroot values according to each per-package path.

Committed to 2020.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#71 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

In reply to Andreas Naumann

Per default qmake uses the pkg-config binary and search path detected by qt5base and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

---
 package/qt5/qt5.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/qt5/qt5.mk +3 -1
index eb2a749678..c3b9f69c3f 100644
@@ -33,4 +33,6 @@ endef
 endif
 
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
Signature · 1 line
2.25.0
#72 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Quoted 16 lines · Andreas Naumann

Per default qmake uses the pkg-config binary and search path detected by qt5base and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

---
  package/qt5/qt5.mk | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
package/qt5/qt5.mk +0 -0
index eb2a749678..c3b9f69c3f 100644

package/qt5/qt5.mk endef · line 38

Quoted 7 lines
package/qt5/qt5.mk +3 -1
@@ -33,4 +33,6 @@ endef
  endif
 
  # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig

Andreas, all,

I attached 2 additional patches, that fix compile issue on x86 platform (see
http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based my work on top of 2020.05 tag, plus:

- [v6,19/28] core/pkg-infra: Add per-package support in qmake infra
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-20-anaumann at ultratronik.de/)
- [v6,20/28] qt5: Fix pkgconfig search path for per-package
infrastructure
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-21-anaumann at ultratronik.de/)

Description of my patches:

1. The first one is fixing the absolute path added in .pri and .pc files when building qt5base. When using sysroot, thos abolute path are breaking the compilation because they are pointing to directories outside the sysroot.

2. The second one is fixing .cmake files that also contains absolute paths after qt5base installation

I'm now able to use full parallel build with per-package with Qt5.

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-core-pkg-infra-Fix-pkg-config-and-.pri-absolute-path.patch
Type: text/x-patch
Size: 1889 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200619/9c71f155/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-package-qt5base-fix-absolute-path-generated-in-.cmak.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200619/9c71f155/attachment-0001.bin>

#73 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Louis-Paul, Andreas, All,

Thank you both for working on this difficult topic. :-)

(removing Julien C., as his email is hitting a closed door..)

On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:

Quoted 11 lines · Andreas Naumann
Quoted 10 lines

Per default qmake uses the pkg-config binary and search path detected by qt5base and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

---
 package/qt5/qt5.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 15 lines

package/qt5/qt5.mk endef · line 38

Quoted 12 lines
package/qt5/qt5.mk +3 -1
index eb2a749678..c3b9f69c3f 100644
@@ -33,4 +33,6 @@ endef
 endif
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
 

I attached 2 additional patches, that fix compile issue on x86 platform (see
http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based my work on top of 2020.05 tag [...]

[--SNIP--]

Quoted 4 lines

1. The first one is fixing the absolute path added in .pri and .pc files when building qt5base. When using sysroot, thos abolute path are breaking the compilation because they are pointing to directories outside the sysroot.

As I read that description, I can see that some keywords are matching with the original commit mesage.

Most notabley, the originalcommit states "mkspecs/qconfig.pri" while your are talking about "absolute path added in .pri [..] files".

So, am I allowed to take the following shortcut :

the patch from Louis-Paul supersedes the one from Andreas, as it fixes the issue at the root, rther than work around it
?

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324

So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

Also, please see a little comment below...

Quoted 2 lines

2. The second one is fixing .cmake files that also contains absolute paths after qt5base installation

Ditto, maybe all .cmake files should be fixed, not just the ones by Qt5, no?

Quoted 1 line

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Would you be willing to do that, please?

Regards,
Yann E. MORIN.

Quoted 44 lines

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER

From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 11:01:21 +0200
Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path

---
 package/pkg-qmake.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/pkg-qmake.mk +16 -0
index 27727119d7..49fe185d4a 100644
@@ -20,6 +20,22 @@
 #
 ################################################################################
 
+# When per-package is enabled, and qmake project is configured to generate 
+# pkg-config compatible package, absolute path are generated for "prefix" field 
+# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
+# needed to remove those absolute path. Same apply for mkspecs files.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
+	| xargs --no-run-if-empty \
+	$(SED) "s:$(STAGING_DIR)::g"
+
+	$(Q)find $(HOST_DIR)/ -name "*.pri" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
+endef
+endif
+
 ################################################################################
 # inner-qmake-package -- defines how the configuration, compilation and
 # installation of a qmake package should be done, implements a few hooks

package/pkg-qmake.mk define $(2)_BUILD_CMDS · line 85

Quoted 4 lines
package/pkg-qmake.mk +1 -0
@@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
 endef
 endif
 
+

Spurious empty line.

Quoted 57 lines
package/pkg-qmake.mk +2 -0
 #
 # Staging installation step. Only define it if not already defined by
 # the package .mk file.
@@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
 endef
 endif
 
+$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+
 #
 # Target installation step. Only define it if not already defined by
 # the package .mk file.
Signature · 13 lines
2.26.2


From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 12:05:19 +0200
Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
 config files

Signed-off-by: Louis-Paul Cordier <[email protected]>
---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/qt5/qt5base/qt5base.mk +13 -0
index ec56287ed0..3d30c41d0e 100644
@@ -310,4 +310,17 @@ endef
 
 QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
+
+# CMake config files generated by Qt5 might break per-package isolation because
+# of absolute path generated.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5BASE_CMAKECONFIG_FIXUP
+	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR)::g"
+endef
+endif
+
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
+
 $(eval $(qmake-package))
Signature · 7 lines
2.26.2


_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#74 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Louis-Paul, Andeas, All,

On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:

Quoted 36 lines

On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:

Quoted 11 lines · Andreas Naumann
Quoted 10 lines

Per default qmake uses the pkg-config binary and search path detected by qt5base and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

---
 package/qt5/qt5.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 15 lines

package/qt5/qt5.mk endef · line 38

Quoted 12 lines
package/qt5/qt5.mk +3 -1
index eb2a749678..c3b9f69c3f 100644
@@ -33,4 +33,6 @@ endef
 endif
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
 

I attached 2 additional patches, that fix compile issue on x86 platform (see
http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based my work on top of 2020.05 tag [...]

[--SNIP--]

Quoted 4 lines

1. The first one is fixing the absolute path added in .pri and .pc files when building qt5base. When using sysroot, thos abolute path are breaking the compilation because they are pointing to directories outside the sysroot.

As I read that description, I can see that some keywords are matching with the original commit mesage.

Quoted 8 lines

Most notabley, the originalcommit states "mkspecs/qconfig.pri" while your are talking about "absolute path added in .pri [..] files".

So, am I allowed to take the following shortcut :

the patch from Louis-Paul supersedes the one from Andreas, as it fixes the issue at the root, rther than work around it
?

So, patch 19 in the series is in master now, but patch 20 (this one) not yet. So, on master, I did a build with PPD, and right after qt5base, was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD directory read-only, and built qt5declarative. It worked. :-)

    $ make qt5base-depends
    $ sed magic from L-P's patch
    $ chmod -R a-w per-package/qt5base/
    $ make qt5dceclarative

Woot! :-)

So, yeath it looks like this patch 20 is not needed if the .pri and .pc (and .cmake) are properly fixed.

Still, I'll let you guys validate that point, and maybe repost the agregated series.

Thanks again! :-)

[0] I did not apply the patch from Louis-Paul, because I wanted to observe the build step by step, and see how the files were before/after the fixes.

Regards,
Yann E. MORIN.

Quoted 149 lines

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324

So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

Also, please see a little comment below...

Quoted 2 lines

2. The second one is fixing .cmake files that also contains absolute paths after qt5base installation

Ditto, maybe all .cmake files should be fixed, not just the ones by Qt5, no?

Quoted 1 line

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Would you be willing to do that, please?

Regards,
Yann E. MORIN.

Quoted 44 lines

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER

From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 11:01:21 +0200
Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path

---
 package/pkg-qmake.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/pkg-qmake.mk +16 -0
index 27727119d7..49fe185d4a 100644
@@ -20,6 +20,22 @@
 #
 ################################################################################
 
+# When per-package is enabled, and qmake project is configured to generate 
+# pkg-config compatible package, absolute path are generated for "prefix" field 
+# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
+# needed to remove those absolute path. Same apply for mkspecs files.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
+	| xargs --no-run-if-empty \
+	$(SED) "s:$(STAGING_DIR)::g"
+
+	$(Q)find $(HOST_DIR)/ -name "*.pri" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
+endef
+endif
+
 ################################################################################
 # inner-qmake-package -- defines how the configuration, compilation and
 # installation of a qmake package should be done, implements a few hooks

package/pkg-qmake.mk define $(2)_BUILD_CMDS · line 85

Quoted 4 lines
package/pkg-qmake.mk +1 -0
@@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
 endef
 endif
 
+

Spurious empty line.

Quoted 57 lines
package/pkg-qmake.mk +2 -0
 #
 # Staging installation step. Only define it if not already defined by
 # the package .mk file.
@@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
 endef
 endif
 
+$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+
 #
 # Target installation step. Only define it if not already defined by
 # the package .mk file.
Signature · 13 lines
2.26.2


From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 12:05:19 +0200
Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
 config files

Signed-off-by: Louis-Paul Cordier <[email protected]>
---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/qt5/qt5base/qt5base.mk +13 -0
index ec56287ed0..3d30c41d0e 100644
@@ -310,4 +310,17 @@ endef
 
 QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
+
+# CMake config files generated by Qt5 might break per-package isolation because
+# of absolute path generated.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5BASE_CMAKECONFIG_FIXUP
+	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR)::g"
+endef
+endif
+
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
+
 $(eval $(qmake-package))
Signature · 7 lines
2.26.2


_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#75 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Louis-Paul, Andreas, All,

On 2020-07-01 23:54 +0200, Yann E. MORIN spake thusly:

Quoted 1 line

On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:

[--SNIP--]

Quoted 11 lines

So, patch 19 in the series is in master now, but patch 20 (this one) not yet. So, on master, I did a build with PPD, and right after qt5base, was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD directory read-only, and built qt5declarative. It worked. :-)

    $ make qt5base-depends
    $ sed magic from L-P's patch
    $ chmod -R a-w per-package/qt5base/
    $ make qt5dceclarative

Woot! :-)

So I was a bit too tired yesterday evening. This chmod can't work, otherwise the per-package directory for qt5declarative would also be read-only.

And it worked because I had a hack that restores the +w on the current per-package directory. And since this is a rsync --link-dest, then we only have hard-links, and thus the ppd of dependencies are turned back to read-write...

Damn...

Still this is a nice set of patches.

That gave me an idea for a paranoid PPD, though... hack-hack-hack...

Regards,
Yann E. MORIN.

Quoted 176 lines

So, yeath it looks like this patch 20 is not needed if the .pri and .pc (and .cmake) are properly fixed.

Still, I'll let you guys validate that point, and maybe repost the agregated series.

Thanks again! :-)

[0] I did not apply the patch from Louis-Paul, because I wanted to observe the build step by step, and see how the files were before/after the fixes.

Regards,
Yann E. MORIN.

Quoted 149 lines

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324

So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

Also, please see a little comment below...

Quoted 2 lines

2. The second one is fixing .cmake files that also contains absolute paths after qt5base installation

Ditto, maybe all .cmake files should be fixed, not just the ones by Qt5, no?

Quoted 1 line

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Would you be willing to do that, please?

Regards,
Yann E. MORIN.

Quoted 44 lines

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER

From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 11:01:21 +0200
Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path

---
 package/pkg-qmake.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/pkg-qmake.mk +16 -0
index 27727119d7..49fe185d4a 100644
@@ -20,6 +20,22 @@
 #
 ################################################################################
 
+# When per-package is enabled, and qmake project is configured to generate 
+# pkg-config compatible package, absolute path are generated for "prefix" field 
+# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
+# needed to remove those absolute path. Same apply for mkspecs files.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
+	| xargs --no-run-if-empty \
+	$(SED) "s:$(STAGING_DIR)::g"
+
+	$(Q)find $(HOST_DIR)/ -name "*.pri" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
+endef
+endif
+
 ################################################################################
 # inner-qmake-package -- defines how the configuration, compilation and
 # installation of a qmake package should be done, implements a few hooks

package/pkg-qmake.mk define $(2)_BUILD_CMDS · line 85

Quoted 4 lines
package/pkg-qmake.mk +1 -0
@@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
 endef
 endif
 
+

Spurious empty line.

Quoted 57 lines
package/pkg-qmake.mk +2 -0
 #
 # Staging installation step. Only define it if not already defined by
 # the package .mk file.
@@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
 endef
 endif
 
+$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+
 #
 # Target installation step. Only define it if not already defined by
 # the package .mk file.
Signature · 13 lines
2.26.2


From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 12:05:19 +0200
Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
 config files

Signed-off-by: Louis-Paul Cordier <[email protected]>
---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/qt5/qt5base/qt5base.mk +13 -0
index ec56287ed0..3d30c41d0e 100644
@@ -310,4 +310,17 @@ endef
 
 QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
+
+# CMake config files generated by Qt5 might break per-package isolation because
+# of absolute path generated.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5BASE_CMAKECONFIG_FIXUP
+	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR)::g"
+endef
+endif
+
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
+
 $(eval $(qmake-package))
Signature · 7 lines
2.26.2


_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#76 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

In reply to Yann E. MORIN

Hi all,

I'm very glad that this serie has finally ended. Thank you very much Andreas for the serie.

I'm still experiencing some issues while compiling Buildroot with Centos devtoolset 7 and I need to investigate further (qmake-pkg mode of buildroot seems to honor devtoolset compiler instead of the cross-compile toolchain for an x86 build)

Quoted 72 lines · Yann E. MORIN

Louis-Paul, Andeas, All,

On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:

Quoted 42 lines

On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:

Quoted 2 lines · Andreas Naumann
Quoted 1 line

Per default qmake uses the pkg-config binary and search path

detected by qt5base

Quoted 1 line
Quoted 1 line

and set in mkspecs/qconfig.pri. For per-package infra, this leads

to packages

Quoted 8 lines
Quoted 8 lines

not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

---
 package/qt5/qt5.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 9 lines

package/qt5/qt5.mk endef · line 35

Quoted 9 lines
package/qt5/qt5.mk +1 -1
index eb2a749678..c3b9f69c3f 100644
@@ -33,4 +33,6 @@ endef
 endif
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec

devices/linux-buildroot-g++ \

Quoted 4 lines

package/qt5/qt5.mk endef

Quoted 3 lines
package/qt5/qt5.mk +2 -0
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
 

I attached 2 additional patches, that fix compile issue on x86

platform (see

Quoted 1 line

http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html).
I based

Quoted 1 line

my work on top of 2020.05 tag [...]

[--SNIP--]

Quoted 4 lines

1. The first one is fixing the absolute path added in .pri and .pc files when building qt5base. When using sysroot, thos abolute path are breaking the compilation because they are pointing to directories outside the sysroot.

As I read that description, I can see that some keywords are matching with the original commit mesage.

Quoted 8 lines

Most notabley, the originalcommit states "mkspecs/qconfig.pri" while your are talking about "absolute path added in .pri [..] files".

So, am I allowed to take the following shortcut :

the patch from Louis-Paul supersedes the one from Andreas, as it fixes the issue at the root, rther than work around it
?

So, patch 19 in the series is in master now, but patch 20 (this one) not yet. So, on master, I did a build with PPD, and right after qt5base, was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD directory read-only, and built qt5declarative. It worked. :-)

   $ make qt5base-depends
   $ sed magic from L-P's patch
   $ chmod -R a-w per-package/qt5base/
   $ make qt5dceclarative

Woot! :-)

So, yeath it looks like this patch 20 is not needed if the .pri and .pc (and .cmake) are properly fixed.

Still, I'll let you guys validate that point, and maybe repost the agregated series.

Quoted 16 lines

Thanks again! :-)

[0] I did not apply the patch from Louis-Paul, because I wanted to observe the build step by step, and see how the files were before/after the fixes.

Regards,
Yann E. MORIN.

Quoted 7 lines

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324

So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

I totally agree with this. I can add this on my todo list if you wish.

Quoted 8 lines
Quoted 8 lines

Also, please see a little comment below...

Quoted 1 line

2. The second one is fixing .cmake files that also contains

absolute paths

Quoted 1 line

after qt5base installation

Ditto, maybe all .cmake files should be fixed, not just the ones by Qt5, no?

See my comment above.

Quoted 10 lines
Quoted 10 lines
Quoted 2 lines

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Would you be willing to do that, please?

I'm really crowded under the snow those days (you know, when you come back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or Discord). I spent way too much of my personal time to fix Qt5 parallel build.

Quoted 153 lines
Quoted 136 lines

Regards,
Yann E. MORIN.

Quoted 10 lines

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER

From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 11:01:21 +0200
Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri

absolute path

Quoted 11 lines
---
 package/pkg-qmake.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/pkg-qmake.mk +0 -0
index 27727119d7..49fe185d4a 100644

package/pkg-qmake.mk line 23

Quoted 4 lines
package/pkg-qmake.mk +1 -0
@@ -20,6 +20,22 @@
 #
 ################################################################################
 
+# When per-package is enabled, and qmake project is configured to

generate

package/pkg-qmake.mk line 24

Quoted 1 line
package/pkg-qmake.mk +1 -0
+# pkg-config compatible package, absolute path are generated for

"prefix" field

package/pkg-qmake.mk line 25

Quoted 1 line
package/pkg-qmake.mk +1 -0
+# of .pc files. In order to keep per-package isolation with

sysroot'in, it is

Quoted 5 lines
package/pkg-qmake.mk +5 -0
+# needed to remove those absolute path. Same apply for mkspecs files.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
+	| xargs --no-run-if-empty \

package/pkg-qmake.mk line 40

Quoted 10 lines
package/pkg-qmake.mk +8 -0
+	$(SED) "s:$(STAGING_DIR)::g"
+
+	$(Q)find $(HOST_DIR)/ -name "*.pri" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
+endef
+endif
+
 ################################################################################
 # inner-qmake-package -- defines how the configuration,

compilation and

package/pkg-qmake.mk define $(2)_BUILD_CMDS · line 85

Quoted 6 lines
package/pkg-qmake.mk +1 -0
 # installation of a qmake package should be done, implements a few hooks
@@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
 endef
 endif
 
+

Spurious empty line.

Quoted 20 lines
package/pkg-qmake.mk +2 -0
 #
 # Staging installation step. Only define it if not already defined by
 # the package .mk file.
@@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
 endef
 endif
 
+$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+
 #
 # Target installation step. Only define it if not already defined by
 # the package .mk file.
Signature · 7 lines
2.26.2


From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
From: Louis-Paul Cordier <[email protected]>
Date: Fri, 19 Jun 2020 12:05:19 +0200
Subject: [PATCH 2/2] package/qt5base: fix absolute path generated

in .cmake

Quoted 12 lines

config files

---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/qt5/qt5base/qt5base.mk +0 -0
index ec56287ed0..3d30c41d0e 100644

package/qt5/qt5base/qt5base.mk endef · line 314

Quoted 5 lines
package/qt5/qt5base/qt5base.mk +2 -0
@@ -310,4 +310,17 @@ endef
 
 QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
+
+# CMake config files generated by Qt5 might break per-package

isolation because

Quoted 20 lines
package/qt5/qt5base/qt5base.mk +11 -0
+# of absolute path generated.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5BASE_CMAKECONFIG_FIXUP
+	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
+		| xargs --no-run-if-empty \
+		$(SED) "s:$(STAGING_DIR)::g"
+endef
+endif
+
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
+
 $(eval $(qmake-package))
Signature · 7 lines
2.26.2


_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 14 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___     
         |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/ 
There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v  
conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 14 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___      
        |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/ 
There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v  
conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#77 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Louis-Paul, All,

On 2020-07-22 21:48 +0200, LP C spake thusly:

Quoted 1 line

I'm very glad that this serie has finally ended.

Oh, no, no! The series is not applied to master at all!

I've just provided some feedback while trying your patches. The original patches from 20 onward have not been applied...

[--SNIP--]

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324
So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

I totally agree with this. I can add this on my todo list if you wish.

I'd like to, please.

[--SNIP--]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Would you be willing to do that, please?

I'm really crowded under the snow those days (you know, when you come back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or Discord).

Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to ~22:00+0200, and Thomas has similar presence. Not sure about Andreas and Peter, though...

Quoted 1 line

I spent way too much of my personal time to fix Qt5 parallel build.

I know this can be a lot of work, and that people have a life outside of Buildroot (and even outside of computers, amazing! ;-] ), but having people, like you, who understand what is going on, and are interested in fixing the issue, is the only way to make progress on such topics.

By the way, we're having a virtual developper day next Monday, 2020-07-27, the whole day. If you are willing to join:
https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#78 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Hi Yann, Louis-Paul, all

first of all sorry for not responding for such a long time. There are just too many things on my table and yes, I also have a life outside the computer (kids, bees, wife should probably come first ...).

However, I'm still interested in the set and veeery happy that #19 was finally merged. Thanks everyone for reviewing and testing!

So Louis Paul, would it be possible you send your fix as a separate patch and once this is in, I resend what's left from the series?

If IRC is needed for further coordination i can join, but I'm a bit hesitant because I can hardly handle the four different messengers that I'm using already.

regards,
Andreas

Quoted 53 lines · Yann E. MORIN

Louis-Paul, All,

On 2020-07-22 21:48 +0200, LP C spake thusly:

Quoted 1 line

I'm very glad that this serie has finally ended.

Oh, no, no! The series is not applied to master at all!

I've just provided some feedback while trying your patches. The original patches from 20 onward have not been applied...

[--SNIP--]

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

As for the .pc files, I think the fix should be generalised out of the Qt world, maybe... Fopr example, we already fix the /la files in package/pkg-generic at 324
So, as far as I can see (which can be quite short, in some cases), we should introduce a similar generic .pc fixup.

I totally agree with this. I can add this on my todo list if you wish.

I'd like to, please.

[--SNIP--]

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line

I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see an updated and consolidated series reposted to the list, that aggregates both your developments.

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Would you be willing to do that, please?

I'm really crowded under the snow those days (you know, when you come back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or Discord).

Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to ~22:00+0200, and Thomas has similar presence. Not sure about Andreas and Peter, though...

Quoted 1 line

I spent way too much of my personal time to fix Qt5 parallel build.

I know this can be a lot of work, and that people have a life outside of Buildroot (and even outside of computers, amazing! ;-] ), but having people, like you, who understand what is going on, and are interested in fixing the issue, is the only way to make progress on such topics.

By the way, we're having a virtual developper day next Monday, 2020-07-27, the whole day. If you are willing to join:
https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020

Regards,
Yann E. MORIN.

#79 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Andreas, All,

On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:

Quoted 3 lines

first of all sorry for not responding for such a long time. There are just too many things on my table and yes, I also have a life outside the computer (kids, bees, wife should probably come first ...).

Yes, this is perfectly understandable. :-)
(my comment was just a joke; a bad one, I agree.)

Quoted 5 lines

However, I'm still interested in the set and veeery happy that #19 was finally merged. Thanks everyone for reviewing and testing!

So Louis Paul, would it be possible you send your fix as a separate patch and once this is in, I resend what's left from the series?

Yes, we can address it in smaller, independent pieces, as long as they make sense on their own.

I think there were two major thinks in the orioginal series:

- making the qmake infra parallel-safe

- fixing individual packages that are not using the qmake infra

Maybe we can first concentrate on fixing the infra, and then handle packages.

Quoted 3 lines

If IRC is needed for further coordination i can join, but I'm a bit hesitant because I can hardly handle the four different messengers that I'm using already.

Well, IRC is mostly for quick back-n-forth discussions to clarify things, and to organise the work. It's not mandatory to join.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#80 lore raw

PATCH v6 20/28 qt5: Fix pkgconfig search path for per-package infrastructure

Hi,

Quoted 19 lines · Yann E. MORIN

Andreas, All,

On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:

Quoted 3 lines

first of all sorry for not responding for such a long time. There are just too many things on my table and yes, I also have a life outside the computer (kids, bees, wife should probably come first ...).

Yes, this is perfectly understandable. :-)
(my comment was just a joke; a bad one, I agree.)

Quoted 5 lines

However, I'm still interested in the set and veeery happy that #19 was finally merged. Thanks everyone for reviewing and testing!

So Louis Paul, would it be possible you send your fix as a separate patch and once this is in, I resend what's left from the series?

Yes, we can address it in smaller, independent pieces, as long as they make sense on their own.

Quoted 8 lines

I think there were two major thinks in the orioginal series:

- making the qmake infra parallel-safe

- fixing individual packages that are not using the qmake infra

Maybe we can first concentrate on fixing the infra, and then handle packages.

I guess #20 is the last generic one, the rework from Louis Paul being even more generic.

The individual ones #24-#28 are probably still applicable. If somebody wants to have a look at it...

For some of the other ones I owe a response or have already agreed on a rework.

Quoted 7 lines
Quoted 4 lines

If IRC is needed for further coordination i can join, but I'm a bit hesitant because I can hardly handle the four different messengers that I'm using already.

Well, IRC is mostly for quick back-n-forth discussions to clarify things, and to organise the work. It's not mandatory to join.

Yes of course. I see how it goes.

regards,
Andreas

Quoted 4 lines

Regards,
Yann E. MORIN.

#81 lore raw

PATCH v6 21/28 package/python-sip: Fix qmake usage for per-package build

In reply to Andreas Naumann

Since python-sip is not built by the qmake infra, we need to explicitly integrate the qt.conf fixup needed for successful per-package build and consistently use qmake via QT5_QMAKE variable.

---
 package/python-sip/python-sip.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/python-sip/python-sip.mk +2 -1
index 1d6c205396..7ae2d43e1e 100644
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
 endef
 
 define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
 			--bindir $(TARGET_DIR)/usr/bin \
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
 			--sipdir $(TARGET_DIR)/usr/share/sip \
 			--sysroot $(STAGING_DIR)/usr \
 			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))
 endef
 
 define PYTHON_SIP_BUILD_CMDS
Signature · 1 line
2.25.0
#82 lore raw

PATCH v6 21/28 package/python-sip: Fix qmake usage for per-package build

Hello,

Quoted 22 lines · On Mon, 17 Feb 2020 22:23:43 +0100 Andreas Naumann <[email protected]>…

Since python-sip is not built by the qmake infra, we need to explicitly integrate the qt.conf fixup needed for successful per-package build and consistently use qmake via QT5_QMAKE variable.

---
 package/python-sip/python-sip.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/python-sip/python-sip.mk +1 -0
index 1d6c205396..7ae2d43e1e 100644
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
 endef
 
 define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
 			--bindir $(TARGET_DIR)/usr/bin \

package/python-sip/python-sip.mk define PYTHON_SIP_CONFIGURE_CMDS · line 50

Quoted 5 lines
package/python-sip/python-sip.mk +1 -1
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
 			--sipdir $(TARGET_DIR)/usr/share/sip \
 			--sysroot $(STAGING_DIR)/usr \
 			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))

Isn't this change a fix, independent from the per-package support ?

QT5_QMAKE is defined as follows:

QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++

So it means that python-sip was not using the devices/linux-buildroot-g++ spec file ? If that's the case, then this is something that should be fixed separately from the per-package support I believe.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#83 lore raw

PATCH v6 21/28 package/python-sip: Fix qmake usage for per-package build

Hi Thomas,

Quoted 21 lines · Thomas Petazzoni

Hello,

Quoted 16 lines · On Mon, 17 Feb 2020 22:23:43 +0100 Andreas Naumann <[email protected]>…

Since python-sip is not built by the qmake infra, we need to explicitly integrate the qt.conf fixup needed for successful per-package build and consistently use qmake via QT5_QMAKE variable.

---
  package/python-sip/python-sip.mk | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
package/python-sip/python-sip.mk +0 -0
index 1d6c205396..7ae2d43e1e 100644
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
  endef
 
Quoted 13 lines

package/python-sip/python-sip.mk define PYTHON_SIP_CONFIGURE_CMDS · line 50

Quoted 11 lines
package/python-sip/python-sip.mk +2 -1
  define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QT_CONF_FIXUP)
  	(cd $(@D); \
  		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
  			--bindir $(TARGET_DIR)/usr/bin \
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
  			--sipdir $(TARGET_DIR)/usr/share/sip \
  			--sysroot $(STAGING_DIR)/usr \
  			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))

Isn't this change a fix, independent from the per-package support ?

The QT5_QT_CONF_FIXUP is needed so python-sip doesnt litter qt5base during install, see patch 19. So no, this is per-package specific.

Quoted 7 lines

QT5_QMAKE is defined as follows:

QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++

So it means that python-sip was not using the devices/linux-buildroot-g++ spec file ? If that's the case, then this

Well, our qmake QMAKE_XSPEC is set to devices/linux-buildroot-g++ per default anyway so there was no problem in not explicitly setting it. We do however need to use QT5_QMAKE to fix the problems described in patch 20.

best regards,
Andreas

Quoted 7 lines

is something that should be fixed separately from the per-package support I believe.

Best regards,

Thomas

#84 lore raw

PATCH v6 21/28 package/python-sip: Fix qmake usage for per-package build

In reply to Andreas Naumann

Andreas, All,

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:

Quoted 3 lines

Since python-sip is not built by the qmake infra, we need to explicitly integrate the qt.conf fixup needed for successful per-package build and consistently use qmake via QT5_QMAKE variable.

And why can't we make it use the qmake infra now that we have it?

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/python-sip/python-sip.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/python-sip/python-sip.mk +2 -1
index 1d6c205396..7ae2d43e1e 100644
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
 endef
 
 define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
 			--bindir $(TARGET_DIR)/usr/bin \
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
 			--sipdir $(TARGET_DIR)/usr/share/sip \
 			--sysroot $(STAGING_DIR)/usr \
 			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))
 endef
 
 define PYTHON_SIP_BUILD_CMDS
Signature · 6 lines
2.25.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#85 lore raw

PATCH v6 22/28 package/python-pyqt5: Fix qmake usage for per-package build

In reply to Andreas Naumann

Since python-pyqt5 is not built by the qmake infra, we need to explicitly integrate the qt.conf fixup needed for successful per-package build.

Note:
Calling qmake via the QT5_QMAKE variable can not be done because it includes parameters which the python configure script does not accept. However, at the moment these parameters are only important for modifiying the per-package pkg-config pathes. This is assumed to be correctly done because the correct per-package sysroot path is supplied to the python configure script.

---
 package/python-pyqt5/python-pyqt5.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-pyqt5/python-pyqt5.mk +1 -0
index 260a93af9c..60828fce1a 100644
@@ -161,6 +161,7 @@ PYTHON_PYQT5_CONF_OPTS = \
 
 define PYTHON_PYQT5_CONFIGURE_CMDS
 	$(call PYTHON_PYQT5_GENERATE_QTDETAIL,$(@D))
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) \
 		$(TARGET_CONFIGURE_OPTS) \
Signature · 1 line
2.25.0
#86 lore raw

PATCH v6 23/28 package/qt5webengine: add libXdamage as XCB dependency

In reply to Andreas Naumann

Fixes a build failure.

---
 package/qt5/qt5webengine/Config.in       | 1 +
 package/qt5/qt5webengine/qt5webengine.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/qt5/qt5webengine/Config.in +1 -0
index 0e776ecb61..f98530fa4d 100644
@@ -59,6 +59,7 @@ config BR2_PACKAGE_QT5WEBENGINE
 	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_QT5BASE_XCB
 	select BR2_PACKAGE_XLIB_LIBXSCRNSAVER if BR2_PACKAGE_QT5BASE_XCB
 	select BR2_PACKAGE_XLIB_LIBXTST if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_QT5BASE_XCB
 	help
 	  The Qt WebEngine module provides a web browser engine that
 	  makes it easy to embed content from the World Wide Web into
package/qt5/qt5webengine/qt5webengine.mk +1 -1
index 798b777df0..cd7a0ba81c 100644
@@ -23,7 +23,7 @@ QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
 
 ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
 QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
-	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst
+	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst xlib_libXdamage
 endif
 
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
Signature · 1 line
2.25.0
#87 lore raw

PATCH v6 23/28 package/qt5webengine: add libXdamage as XCB dependency

Quoted 3 lines · On Mon, 17 Feb 2020 22:23:45 +0100 Andreas Naumann <[email protected]>…

Fixes a build failure.

Could you provide the Buildroot configuration that exhibits the issue? I've been trying to create a configuration that builds qt5webengine with X.org enabled, and no matter what I do, the OpenGL provider I use selects libxdamage, so I don't have a configuration that combines qt5webengine and X.org, but without having libxdamage.

Also, what was the build failure ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#88 lore raw

PATCH v6 23/28 package/qt5webengine: add libXdamage as XCB dependency

Hi,

Quoted 8 lines · Thomas Petazzoni
Quoted 3 lines · On Mon, 17 Feb 2020 22:23:45 +0100 Andreas Naumann <[email protected]>…

Fixes a build failure.

Could you provide the Buildroot configuration that exhibits the issue?

it was imx6-sabresd_qt5_defconfig plus everything Qt I could find. See cover letter near the end.

Quoted 4 lines

I've been trying to create a configuration that builds qt5webengine with X.org enabled, and no matter what I do, the OpenGL provider I use selects libxdamage, so I don't have a configuration that combines qt5webengine and X.org, but without having libxdamage.

Maybe this was fixed with e79ee3b, I will try again.

regards,
Andreas

Quoted 7 lines

Also, what was the build failure ?

Thanks!

Thomas

#89 lore raw

PATCH v6 23/28 package/qt5webengine: add libXdamage as XCB dependency

Hi Thomas,

Quoted 6 lines · Andreas Naumann

Hi,

Quoted 3 lines · Thomas Petazzoni

On Mon, 17 Feb 2020 22:23:45 +0100
Andreas Naumann <[email protected]> wrote:

Quoted 13 lines
Quoted 5 lines
Quoted 3 lines

Fixes a build failure.

Could you provide the Buildroot configuration that exhibits the issue?

it was imx6-sabresd_qt5_defconfig plus everything Qt I could find. See cover letter near the end.

Quoted 4 lines

I've been trying to create a configuration that builds qt5webengine with X.org enabled, and no matter what I do, the OpenGL provider I use selects libxdamage, so I don't have a configuration that combines qt5webengine and X.org, but without having libxdamage.

I now realize my configuration had mesa3d without BR2_PACKAGE_MESA3D_OPENGL_GLX. Once selected, it pulls in libxdamage and it gets build before mesa. So the first part of my patch might really not be needed.

The second part (the dependency) however is needed because otherwise it wont be available in the per-package sysroot of qt5webengine. I guess I should have pointed that out in the commit message. Do you want me to resend?

Quoted 2 lines

Maybe this was fixed with e79ee3b, I will try again.

So no, this was another issue.

regards,
Andreas

Quoted 16 lines

regards,
Andreas

Quoted 7 lines

Also, what was the build failure ?

Thanks!

Thomas

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#90 lore raw

PATCH v6 23/28 package/qt5webengine: add libXdamage as XCB dependency

Quoted 9 lines · On Sun, 22 Mar 2020 22:58:19 +0100 Andreas Naumann <[email protected]> wrote:

I now realize my configuration had mesa3d without BR2_PACKAGE_MESA3D_OPENGL_GLX. Once selected, it pulls in libxdamage and it gets build before mesa. So the first part of my patch might really not be needed.

The second part (the dependency) however is needed because otherwise it wont be available in the per-package sysroot of qt5webengine. I guess I should have pointed that out in the commit message. Do you want me to resend?

Yes, please. Could you also include in the commit log the defconfig that allows to reproduce the issue ?

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#91 lore raw

PATCH v6 24/28 package/qt5webengine: Add optional dependency on qt5quickcontrols2

In reply to Andreas Naumann

The recipebrowser example depends on qt5quickcontrols2.

---
 package/qt5/qt5webengine/qt5webengine.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/qt5/qt5webengine/qt5webengine.mk +4 -0
index cd7a0ba81c..c27bf85908 100644
@@ -42,6 +42,10 @@ else
 QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
 endif
 
+ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
+QT5WEBENGINE_DEPENDENCIES += qt5quickcontrols2
+endif
+
 # QtWebengine's build system uses python, but only supports python2. We work
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
Signature · 1 line
2.25.0
#92 lore raw

PATCH v6 25/28 package/qt5webengine: Add optional dependency on qt5location

In reply to Andreas Naumann

the webenginewidgets maps example depends on it

---
 package/qt5/qt5webengine/qt5webengine.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/qt5/qt5webengine/qt5webengine.mk +5 -0
index c27bf85908..e0b39c354f 100644
@@ -46,6 +46,11 @@ ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
 QT5WEBENGINE_DEPENDENCIES += qt5quickcontrols2
 endif
 
+ifeq ($(BR2_PACKAGE_QT5LOCATION),y)
+QT5WEBENGINE_DEPENDENCIES += qt5location
+endif
+
+
 # QtWebengine's build system uses python, but only supports python2. We work
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
Signature · 1 line
2.25.0
#93 lore raw

PATCH v6 26/28 package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2

In reply to Andreas Naumann

The basic example depends on qt5quickcontrols2.

---
 package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk +4 -0
index 162ed88c8c..ea41b5ff86 100644
@@ -15,6 +15,10 @@ QT5VIRTUALKEYBOARD_SOURCE = qtvirtualkeyboard-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5
 QT5VIRTUALKEYBOARD_DEPENDENCIES = qt5base qt5declarative qt5svg
 QT5VIRTUALKEYBOARD_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
+QT5VIRTUALKEYBOARD_DEPENDENCIES += qt5quickcontrols2
+endif
+
 QT5VIRTUALKEYBOARD_LICENSE = GPL-3.0
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES = LICENSE.GPL3
Signature · 1 line
2.25.0
#94 lore raw

PATCH v6 27/28 package/qt53d: Add optional dependency on qt5multimedia

In reply to Andreas Naumann

The audio-visualizer-qml example depends on it.

---
 package/qt5/qt53d/qt53d.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/qt5/qt53d/qt53d.mk +4 -0
index eeb1b3644c..c9db7cd0d7 100644
@@ -10,6 +10,10 @@ QT53D_SOURCE = qt3d-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT53D_VERSION).tar.xz
 QT53D_DEPENDENCIES = qt5base qt5declarative
 QT53D_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_QT5MULTIMEDIA),y)
+QT53D_DEPENDENCIES += qt5multimedia
+endif
+
 ifeq ($(BR2_PACKAGE_ASSIMP),y)
 QT53D_DEPENDENCIES += assimp
 endif
Signature · 1 line
2.25.0
#95 lore raw

PATCH v6 28/28 package/qt5charts: Add optional dependency on qt5multimedia

In reply to Andreas Naumann

The audio example depends on it.

---
 package/qt5/qt5charts/qt5charts.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/qt5/qt5charts/qt5charts.mk +4 -0
index 40f5efc2da..478cf9d6d8 100644
@@ -24,4 +24,8 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5CHARTS_DEPENDENCIES += qt5declarative
 endif
 
+ifeq ($(BR2_PACKAGE_QT5MULTIMEDIA),y)
+QT5CHARTS_DEPENDENCIES += qt5multimedia
+endif
+
 $(eval $(qmake-package))
Signature · 1 line
2.25.0
#96 lore raw

v6 cover Qt5 qmake infra and per-package compatibility

In reply to Andreas Naumann

Hello Andreas,

Quoted 2 lines · Andreas Naumann

- qtwebengine locales appear in usr/translations/qtwebengine_locales/ instead of usr/translations/qtwebengine_locales/qtwebengine_locales/

And this perfect as the qtwebengine searches for locales *.pak files exactly under this location e.g.:

/usr/translations/qtwebengine_locales/en-US.pak

The double path is a buildroot qt5webengine package install mistake..., patch fixing this will follow soon...

Regards,
Peter

#97 lore raw

v6 cover Qt5 qmake infra and per-package compatibility

Hi Peter,

Am 18.02.20 um 22:33 schrieb Peter Seiderer:

Quoted 8 lines

Hello Andreas,

Quoted 2 lines · Andreas Naumann

- qtwebengine locales appear in usr/translations/qtwebengine_locales/ instead of usr/translations/qtwebengine_locales/qtwebengine_locales/

Quoted 6 lines

And this perfect as the qtwebengine searches for locales *.pak files exactly under this location e.g.:

/usr/translations/qtwebengine_locales/en-US.pak

The double path is a buildroot qt5webengine package install mistake...,

That's what I'm saying. And the generic qmake infra would fix it.

regards,
Andreas

Quoted 9 lines

patch fixing this will follow soon...

Regards,
Peter
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot