Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/qt5/qt53d: fix compilation error
@ 2024-07-23 10:32 Simon Ruepp via buildroot
  2024-07-23 12:27 ` Thomas Petazzoni via buildroot
  2024-07-24  8:54 ` [Buildroot] [PATCH v2] " Simon Ruepp via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Ruepp via buildroot @ 2024-07-23 10:32 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Julien Corjon, Thomas Petazzoni, Simon Ruepp

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 <ruepp.simon@mailbox.org>
---
 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

diff --git a/package/qt5/Config.in b/package/qt5/Config.in
index f1b16ff39b..879378e057 100644
--- a/package/qt5/Config.in
+++ b/package/qt5/Config.in
@@ -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"
diff --git a/package/qt5/qt53d-assimp/Config.in b/package/qt5/qt53d-assimp/Config.in
new file mode 100644
index 0000000000..421e424f8d
--- /dev/null
+++ b/package/qt5/qt53d-assimp/Config.in
@@ -0,0 +1,4 @@
+# Not user-selectable, it is only needed to be copied
+# into the qt53d source tree.
+config QT53D_ASSIMP
+	bool
diff --git a/package/qt5/qt53d-assimp/qt53d-assimp.hash b/package/qt5/qt53d-assimp/qt53d-assimp.hash
new file mode 100644
index 0000000000..43f36f7f5c
--- /dev/null
+++ b/package/qt5/qt53d-assimp/qt53d-assimp.hash
@@ -0,0 +1,5 @@
+# Locally calculated:
+sha256  00ec879857f511bed0c8b04ea4e7882a282051ec299245af487183c790e65539  qt3d-assimp-8f0c6b04b2257a520aaab38421b2e090204b69df.tar.bz2
+
+# Hashes for license files:
+sha256  a26ccc3dbf2f58ea99c100945a8a126fa0f9f4d7fd2b49aa8bdb8e09355864d8  LICENSE
diff --git a/package/qt5/qt53d-assimp/qt53d-assimp.mk b/package/qt5/qt53d-assimp/qt53d-assimp.mk
new file mode 100644
index 0000000000..c5211fdd5c
--- /dev/null
+++ b/package/qt5/qt53d-assimp/qt53d-assimp.mk
@@ -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))
diff --git a/package/qt5/qt53d/Config.in b/package/qt5/qt53d/Config.in
index 9187bee82b..805dfa2d94 100644
--- a/package/qt5/qt53d/Config.in
+++ b/package/qt5/qt53d/Config.in
@@ -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++.
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index 8d9babd704..54f8191fb5 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -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))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/qt5/qt53d: fix compilation error
  2024-07-23 10:32 [Buildroot] [PATCH 1/1] package/qt5/qt53d: fix compilation error Simon Ruepp via buildroot
@ 2024-07-23 12:27 ` Thomas Petazzoni via buildroot
  2024-07-24  8:54 ` [Buildroot] [PATCH v2] " Simon Ruepp via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-23 12:27 UTC (permalink / raw)
  To: Simon Ruepp via buildroot; +Cc: Giulio Benetti, Julien Corjon, Simon Ruepp

Hello Simon,

On Tue, 23 Jul 2024 12:32:40 +0200
Simon Ruepp via buildroot <buildroot@buildroot.org> wrote:

> 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 <ruepp.simon@mailbox.org>

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH v2] package/qt5/qt53d: fix compilation error
  2024-07-23 10:32 [Buildroot] [PATCH 1/1] package/qt5/qt53d: fix compilation error Simon Ruepp via buildroot
  2024-07-23 12:27 ` Thomas Petazzoni via buildroot
@ 2024-07-24  8:54 ` Simon Ruepp via buildroot
  2024-07-24 20:21   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Ruepp via buildroot @ 2024-07-24  8:54 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Julien Corjon, Thomas Petazzoni, Simon Ruepp

Compiling 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.

Signed-off-by: Simon Ruepp <ruepp.simon@mailbox.org>
---
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(+)

diff --git a/package/qt5/qt53d/qt53d.hash b/package/qt5/qt53d/qt53d.hash
index 65e6e8e380..49d6048eb0 100644
--- a/package/qt5/qt53d/qt53d.hash
+++ b/package/qt5/qt53d/qt53d.hash
@@ -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
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index 8d9babd704..61e90b9360 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -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
-- 
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v2] package/qt5/qt53d: fix compilation error
  2024-07-24  8:54 ` [Buildroot] [PATCH v2] " Simon Ruepp via buildroot
@ 2024-07-24 20:21   ` Thomas Petazzoni via buildroot
  2024-08-02 17:18     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-24 20:21 UTC (permalink / raw)
  To: Simon Ruepp via buildroot; +Cc: Giulio Benetti, Julien Corjon, Simon Ruepp

Hello Simon,

On Wed, 24 Jul 2024 10:54:44 +0200
Simon Ruepp via buildroot <buildroot@buildroot.org> wrote:

> Compiling 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.
> 
> Signed-off-by: Simon Ruepp <ruepp.simon@mailbox.org>

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v2] package/qt5/qt53d: fix compilation error
  2024-07-24 20:21   ` Thomas Petazzoni via buildroot
@ 2024-08-02 17:18     ` Thomas Petazzoni via buildroot
  2024-08-04  9:12       ` Simon Ruepp via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-02 17:18 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot, Simon Ruepp
  Cc: Giulio Benetti, Julien Corjon, Thomas Petazzoni

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

On Wed, 24 Jul 2024 22:21:44 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> Hello Simon,
> 
> On Wed, 24 Jul 2024 10:54:44 +0200
> Simon Ruepp via buildroot <buildroot@buildroot.org> wrote:
> 
> > Compiling 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.
> > 
> > Signed-off-by: Simon Ruepp <ruepp.simon@mailbox.org>  
> 
> 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



-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v2] package/qt5/qt53d: fix compilation error
  2024-08-02 17:18     ` Thomas Petazzoni via buildroot
@ 2024-08-04  9:12       ` Simon Ruepp via buildroot
  2024-09-13  9:26         ` Simon Ruepp via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Ruepp via buildroot @ 2024-08-04  9:12 UTC (permalink / raw)
  To: Thomas Petazzoni, Thomas Petazzoni via buildroot
  Cc: Giulio Benetti, Julien Corjon, Simon Ruepp

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

> Thomas Petazzoni <thomas.petazzoni@bootlin.com> 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
> 
> On Wed, 24 Jul 2024 22:21:44 +0200
> Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> 
> > Hello Simon,
> > 
> > On Wed, 24 Jul 2024 10:54:44 +0200
> > Simon Ruepp via buildroot <buildroot@buildroot.org> wrote:
> > 
> > > Compiling 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.
> > > 
> > > Signed-off-by: Simon Ruepp <ruepp.simon@mailbox.org>  
> > 
> > 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
> 
> 
> 
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v2] package/qt5/qt53d: fix compilation error
  2024-08-04  9:12       ` Simon Ruepp via buildroot
@ 2024-09-13  9:26         ` Simon Ruepp via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Ruepp via buildroot @ 2024-09-13  9:26 UTC (permalink / raw)
  To: Thomas Petazzoni, Thomas Petazzoni via buildroot
  Cc: Giulio Benetti, Julien Corjon

Hello Thomas, 

I did some further research and can now answer your remaining questions:

> 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 += assimp
QT53D_CONF_OPTS += -system-assimp
else
QT53D_POST_EXTRACT_HOOKS += QT53D_ASSIMP_EXTRACT
QT53D_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.

> 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-13  9:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 10:32 [Buildroot] [PATCH 1/1] package/qt5/qt53d: fix compilation error Simon Ruepp via buildroot
2024-07-23 12:27 ` Thomas Petazzoni via buildroot
2024-07-24  8:54 ` [Buildroot] [PATCH v2] " Simon Ruepp via buildroot
2024-07-24 20:21   ` Thomas Petazzoni via buildroot
2024-08-02 17:18     ` Thomas Petazzoni via buildroot
2024-08-04  9:12       ` Simon Ruepp via buildroot
2024-09-13  9:26         ` Simon Ruepp via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox