package/qt5/qt53d: fix compilation error
PATCH 1/1 package/qt5/qt53d: fix compilation error
Currently when building the qt3d package it errors out the following message:
make[5]: *** No rule to make target '/home/sr20608/src/buildroot/output/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/src/3rdparty/assimp/src/code/Common/Assimp.cpp', needed by '.obj/Assimp.o'. Stop.
This is because the assimp source files are missing which where previously part of the qt3d package.
Because of this, the new package qt53d-assimp is introduced to separately download these files which are then copied into the qt3d sources, similar on how its done with the qt5webengine and the qt5webengine-chromium.
--- package/qt5/Config.in | 1 + package/qt5/qt53d-assimp/Config.in | 4 ++++ package/qt5/qt53d-assimp/qt53d-assimp.hash | 5 +++++ package/qt5/qt53d-assimp/qt53d-assimp.mk | 15 +++++++++++++++ package/qt5/qt53d/Config.in | 1 + package/qt5/qt53d/qt53d.mk | 8 +++++++- 6 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 package/qt5/qt53d-assimp/Config.in create mode 100644 package/qt5/qt53d-assimp/qt53d-assimp.hash create mode 100644 package/qt5/qt53d-assimp/qt53d-assimp.mk
package/qt5/Config.in +1 -0
@@ -35,6 +35,7 @@ menuconfig BR2_PACKAGE_QT5 if BR2_PACKAGE_QT5 source "package/qt5/qt53d/Config.in" +source "package/qt5/qt53d-assimp/Config.in" source "package/qt5/qt5base/Config.in" source "package/qt5/qt5charts/Config.in" source "package/qt5/qt5coap/Config.in"
package/qt5/qt53d-assimp/Config.in new file +4 -0
@@ -0,0 +1,4 @@ +# Not user-selectable, it is only needed to be copied +# into the qt53d source tree. +config QT53D_ASSIMP + bool
package/qt5/qt53d-assimp/qt53d-assimp.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated: +sha256 00ec879857f511bed0c8b04ea4e7882a282051ec299245af487183c790e65539 qt3d-assimp-8f0c6b04b2257a520aaab38421b2e090204b69df.tar.bz2 + +# Hashes for license files: +sha256 a26ccc3dbf2f58ea99c100945a8a126fa0f9f4d7fd2b49aa8bdb8e09355864d8 LICENSE
package/qt5/qt53d-assimp/qt53d-assimp.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# qt53d-assimp +# +################################################################################ + +QT53D_ASSIMP_VERSION = 8f0c6b04b2257a520aaab38421b2e090204b69df +QT53D_ASSIMP_SITE = $(QT5_SITE)/qtquick3d-assimp/-/archive/$(QT53D_ASSIMP_VERSION) +QT53D_ASSIMP_SOURCE = qt3d-assimp-$(QT53D_ASSIMP_VERSION).tar.bz2 +QT53D_ASSIMP_INSTALL_TARGET = NO + +QT53D_ASSIMP_LICENSE = BSD-3-Clause +QT53D_ASSIMP_LICENSE_FILES = LICENSE + +$(eval $(generic-package))
package/qt5/qt53d/Config.in +1 -0
@@ -5,6 +5,7 @@ config BR2_PACKAGE_QT53D select BR2_PACKAGE_QT5BASE_GUI select BR2_PACKAGE_QT5DECLARATIVE select BR2_PACKAGE_QT5DECLARATIVE_QUICK + select BR2_PACKAGE_QT53D_ASSIMP help Qt is a cross-platform application and UI framework for developers using C++.
package/qt5/qt53d/qt53d.mk +7 -1
@@ -7,7 +7,7 @@ QT53D_VERSION = 9bf4d03e2515f7c454647d54542330b6e90f8191 QT53D_SITE = $(QT5_SITE)/qt3d/-/archive/$(QT53D_VERSION) QT53D_SOURCE = qt3d-$(QT53D_VERSION).tar.bz2 -QT53D_DEPENDENCIES = qt5declarative +QT53D_DEPENDENCIES = qt5declarative qt53d-assimp QT53D_INSTALL_STAGING = YES QT53D_SYNC_QT_HEADERS = YES
@@ -18,4 +18,10 @@ 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_COPY_ASSIMP + rm -rf $(@D)/src/3rdparty/assimp/src + cp -a $(QT53D_ASSIMP_DIR) $(@D)/src/3rdparty/assimp/src +endef +QT53D_POST_PATCH_HOOKS += QT53D_COPY_ASSIMP + $(eval $(qmake-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Simon,
Quoted 10 lines · On Tue, 23 Jul 2024 12:32:40 +0200 Simon Ruepp via buildroot…
Currently when building the qt3d package it errors out the following message:
make[5]: *** No rule to make target '/home/sr20608/src/buildroot/output/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/src/3rdparty/assimp/src/code/Common/Assimp.cpp', needed by '.obj/Assimp.o'. Stop.This is because the assimp source files are missing which where previously part of the qt3d package.
Because of this, the new package qt53d-assimp is introduced to separately download these files which are then copied into the qt3d sources, similar on how its done with the qt5webengine and the qt5webengine-chromium.Signed-off-by Simon Ruepp <[email protected]>
Thanks a lot for the patch! However I think this would be better served with QT53D_EXTRA_DOWNLOADS pointing to the assimp tarball, and some post-extract hook of qt53d extracting the tarball in the right place.
You can for example have a look at how things are done in package/perl/perl.mk, with <pkg>_EXTRA_DOWNLOADS being used to download the perl-cross stuff.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/qt5/qt53d: fix compilation error
In reply to Simon Ruepp via buildrootCompiling the qt53d package currently fails since the required source files of the assimp library are missing. Because of this, QT53D_EXTRA_DOWNLOADS along with a post extract hook is used to separately download and extract the missing files.
---
Changes v1 -> v2:
- Use QT53D_EXTRA_DOWNLOADS and a post extract hook instead of adding a new package to fix the problem (suggested by Thomas)
package/qt5/qt53d/qt53d.hash | 1 + package/qt5/qt53d/qt53d.mk | 10 ++++++++++ 2 files changed, 11 insertions(+)
package/qt5/qt53d/qt53d.hash +1 -0
@@ -1,5 +1,6 @@ # Locally calculated sha256 31b3e52fb0b28f1e99dd25342a0204d239f7f42bcb25fb56393956904ef412ea qt3d-9bf4d03e2515f7c454647d54542330b6e90f8191.tar.bz2 +sha256 00ec879857f511bed0c8b04ea4e7882a282051ec299245af487183c790e65539 qtquick3d-assimp-8f0c6b04b2257a520aaab38421b2e090204b69df.tar.bz2 # Hashes for license files: sha256 edfe70e99be2a7c109d860b19204609e582720b211c50caedac729da372a1253 LICENSE.GPL
package/qt5/qt53d/qt53d.mk +10 -0
@@ -11,6 +11,16 @@ QT53D_DEPENDENCIES = qt5declarative QT53D_INSTALL_STAGING = YES QT53D_SYNC_QT_HEADERS = YES +QT53D_ASSIMP_VERSION = 8f0c6b04b2257a520aaab38421b2e090204b69df +QT53D_ASSIMP_SOURCE = qtquick3d-assimp-$(QT53D_ASSIMP_VERSION).tar.bz2 +QT53D_EXTRA_DOWNLOADS = $(QT5_SITE)/qtquick3d-assimp/-/archive/$(QT53D_ASSIMP_VERSION)/$(QT53D_ASSIMP_SOURCE) + +define QT53D_ASSIMP_EXTRACT + $(call suitable-extractor,$(QT53D_ASSIMP_SOURCE)) $(QT53D_DL_DIR)/$(QT53D_ASSIMP_SOURCE) | \ + $(TAR) --strip-components=1 -C $(@D)/src/3rdparty/assimp/src $(TAR_OPTIONS) - +endef +QT53D_POST_EXTRACT_HOOKS += QT53D_ASSIMP_EXTRACT + ifeq ($(BR2_PACKAGE_ASSIMP),y) QT53D_DEPENDENCIES += assimp endif
Signature · 5 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Simon,
Quoted 6 lines · On Wed, 24 Jul 2024 10:54:44 +0200 Simon Ruepp via buildroot…
Compiling the qt53d package currently fails since the required source files of the assimp library are missing. Because of this,
QT53D_EXTRA_DOWNLOADSalong with a post extract hook is used to separately download and extract the missing files.Signed-off-by Simon Ruepp <[email protected]>
Thanks for the patch. Could you document since when this is failing, i.e which Buildroot commit introduced this regression?
Also, could you comment on how this will interact with:
ifeq ($(BR2_PACKAGE_ASSIMP),y)QT53D_DEPENDENCIES += assimp
endif
that we have in qt53.mk. It seems like qt53d can use a system-provided assimp instead of a bundled copy of assimp:
!ios:!tvos:!qcc:qtConfig(assimp):if(qtConfig(system-assimp)|android-clang|clang|win32-msvc|gcc) {
SUBDIRS += assimp
}(from src/plugins/sceneparsers/sceneparsers.pro). There is apparently a -assimp config option that allows to chose between "system", "qt" and "no".
Also, I see that src/3rdparty/patches/ has a bunch of patches for assimp. Should these patches be applied? Are they important?
Thanks a lot for your additional investigations :-)
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Simon,
Gentle ping on the below questions, in order to be able to move forward with resolving this qt53d build issue.
Thanks a lot for your contribution!
Thomas
Quoted 38 lines · On Wed, 24 Jul 2024 22:21:44 +0200 Thomas Petazzoni via buildroot…
Hello Simon,
Quoted 6 lines · On Wed, 24 Jul 2024 10:54:44 +0200 Simon Ruepp via buildroot…
Compiling the qt53d package currently fails since the required source files of the assimp library are missing. Because of this,
QT53D_EXTRA_DOWNLOADSalong with a post extract hook is used to separately download and extract the missing files.Signed-off-by Simon Ruepp <[email protected]>Thanks for the patch. Could you document since when this is failing, i.e which Buildroot commit introduced this regression?
Also, could you comment on how this will interact with:
ifeq ($(BR2_PACKAGE_ASSIMP),y)
QT53D_DEPENDENCIES+= assimp
endifthat we have in qt53.mk. It seems like qt53d can use a system-provided assimp instead of a bundled copy of assimp:
!ios:!tvos:!qcc:qtConfig(assimp):if(qtConfig(system-assimp)|android-clang|clang|win32-msvc|gcc) { SUBDIRS += assimp }(from src/plugins/sceneparsers/sceneparsers.pro). There is apparently a -assimp config option that allows to chose between "system", "qt" and "no".
Also, I see that src/3rdparty/patches/ has a bunch of patches for assimp. Should these patches be applied? Are they important?
Thanks a lot for your additional investigations :-)
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
this fails since commit ca9e08277c473de1d0119768661ce0ba96559a7a.
I am currently on vacation and will be back in three weeks. During that period I unfortunately don't have the time to look into the problem any further.
Maybe someone can help me out?
Best regards
Simon
Quoted 47 lines
Thomas Petazzoni <[email protected]> hat am 02.08.2024 19:18 CEST geschrieben:
Hello Simon,
Gentle ping on the below questions, in order to be able to move forward with resolving this qt53d build issue.
Thanks a lot for your contribution!
Thomas
Quoted 32 lines · On Wed, 24 Jul 2024 22:21:44 +0200 Thomas Petazzoni via buildroot…
Hello Simon,
Quoted 6 lines · On Wed, 24 Jul 2024 10:54:44 +0200 Simon Ruepp via buildroot…
Compiling the qt53d package currently fails since the required source files of the assimp library are missing. Because of this,
QT53D_EXTRA_DOWNLOADSalong with a post extract hook is used to separately download and extract the missing files.Signed-off-by Simon Ruepp <[email protected]>Thanks for the patch. Could you document since when this is failing, i.e which Buildroot commit introduced this regression?
Also, could you comment on how this will interact with:
ifeq ($(BR2_PACKAGE_ASSIMP),y)
QT53D_DEPENDENCIES+= assimp
endifthat we have in qt53.mk. It seems like qt53d can use a system-provided assimp instead of a bundled copy of assimp:
!ios:!tvos:!qcc:qtConfig(assimp):if(qtConfig(system-assimp)|android-clang|clang|win32-msvc|gcc) { SUBDIRS += assimp }(from src/plugins/sceneparsers/sceneparsers.pro). There is apparently a -assimp config option that allows to chose between "system", "qt" and "no".
Quoted 13 lines
Quoted 6 lines
Also, I see that src/3rdparty/patches/ has a bunch of patches for assimp. Should these patches be applied? Are they important?
Thanks a lot for your additional investigations :-)
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
I did some further research and can now answer your remaining questions:
Quoted 10 lines
It seems like qt53d can use a system-provided
assimp instead of a bundled copy of assimp:!ios:!tvos:!qcc:qtConfig(assimp):if(qtConfig(system-assimp)|android-clang|clang|win32-msvc|gcc) { SUBDIRS += assimp }(from src/plugins/sceneparsers/sceneparsers.pro). There is apparently a -assimp config option that allows to chose between "system", "qt" and "no".
I found the options you mentioned in the "config_help.txt" file located in the qt53d build directory and integrated them in the qt53d.mk with:
ifeq ($(BR2_PACKAGE_ASSIMP),y)QT53D_DEPENDENCIES += assimpQT53D_CONF_OPTS += -system-assimp
elseQT53D_POST_EXTRACT_HOOKS += QT53D_ASSIMP_EXTRACTQT53D_CONF_OPTS += -qt-assimp
endif
But the build still fails when trying to use the system-provided version:
make[4]: *** No rule to make target '/home/sr20608/src/buildroot/output/build/qt53d-9bf4d03e2515f7c454647d54542330b6e90f8191/src/3rdparty/assimp/src/code/Common/Assimp.cpp', needed by '.obj/Assimp.o'. Stop.
Quoted 2 lines
Also, I see that src/3rdparty/patches/ has a bunch of patches for assimp. Should these patches be applied? Are they important?
These patches don't seem to be important anymore since they already have been applied.
Best regards
Simon
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Simon,
Quoted 2 lines · Simon Ruepp
Compiling the qt53d package currently fails since the required source files of the assimp library are missing.
I think this patch can be dropped. The build failure was fixed another
way: qt53d now always builds without assimp support, in 11e380fb03 ("package/qt5/qt53d: always disable assimp support"), after bc1a1dfece and 79b13f6e67 found that neither Buildroot's assimp nor the bundled one built.
With assimp disabled, the extra download is not used.
Not Applicable: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot