Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] assimp: new package
@ 2015-12-06 22:17 Peter Seiderer
  2015-12-06 22:17 ` [Buildroot] [PATCH v2] qt53d: enabled assimpsceneparser plugin Peter Seiderer
  2015-12-13 13:07 ` [Buildroot] [PATCH v2] assimp: new package Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Seiderer @ 2015-12-06 22:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
Changes v1 -> v2:
  - use github helper (thanks to J?rg Krause)
---
 package/Config.in        |  1 +
 package/assimp/Config.in |  9 +++++++++
 package/assimp/assimp.mk | 15 +++++++++++++++
 3 files changed, 25 insertions(+)
 create mode 100644 package/assimp/Config.in
 create mode 100644 package/assimp/assimp.mk

diff --git a/package/Config.in b/package/Config.in
index bdc3063..b8e13e0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -796,6 +796,7 @@ menu "Filesystem"
 endmenu
 
 menu "Graphics"
+	source "package/assimp/Config.in"
 	source "package/atk/Config.in"
 	source "package/bullet/Config.in"
 	source "package/cairo/Config.in"
diff --git a/package/assimp/Config.in b/package/assimp/Config.in
new file mode 100644
index 0000000..183e73e
--- /dev/null
+++ b/package/assimp/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ASSIMP
+	bool "assimp"
+	help
+	  Open Asset Import Library (assimp) is a portable Open Source
+	  library to import various well-known 3D model formats in a uniform
+	  manner. The most recent version also knows how to export 3d files
+	  and is therefore suitable as a general-purpose 3D model converter.
+
+	  http://www.assimp.org
diff --git a/package/assimp/assimp.mk b/package/assimp/assimp.mk
new file mode 100644
index 0000000..696ec43
--- /dev/null
+++ b/package/assimp/assimp.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# assimp
+#
+################################################################################
+
+ASSIMP_VERSION = v3.2
+ASSIMP_SITE = $(call github,assimp,assimp,$(ASSIMP_VERSION))
+ASSIMP_LICENSE = BSD-3c
+ASSIMP_LICENSE_FILES = LICENSE
+ASSIMP_INSTALL_STAGING = YES
+
+ASSIMP_CONF_OPTS += -DASSIMP_BUILD_TESTS=OFF
+
+$(eval $(cmake-package))
-- 
2.1.4

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

* [Buildroot] [PATCH v2] qt53d: enabled assimpsceneparser plugin
  2015-12-06 22:17 [Buildroot] [PATCH v2] assimp: new package Peter Seiderer
@ 2015-12-06 22:17 ` Peter Seiderer
  2015-12-13 13:07 ` [Buildroot] [PATCH v2] assimp: new package Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2015-12-06 22:17 UTC (permalink / raw)
  To: buildroot

- select assimp package
- copy enabled assimpsceneparser plugin

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Depends on '[PATCH v2] qt5/qt53d: new package' (see [1]).

[1] https://patchwork.ozlabs.org/patch/552897

Changes v1 -> v2:
  - no changes
---
 package/qt5/qt53d/Config.in | 1 +
 package/qt5/qt53d/qt53d.mk  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/qt5/qt53d/Config.in b/package/qt5/qt53d/Config.in
index d350922..6c09358 100644
--- a/package/qt5/qt53d/Config.in
+++ b/package/qt5/qt53d/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_QT53D
 	bool "qt53d"
+	select BR2_PACKAGE_ASSIMP
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5BASE_GUI
 	select BR2_PACKAGE_QT5DECLARATIVE
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index 810242b..15d8999 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -7,7 +7,7 @@
 QT53D_VERSION = $(QT5_VERSION)
 QT53D_SITE = $(QT5_SITE)
 QT53D_SOURCE = qt3d-opensource-src-$(QT5SVG_VERSION).tar.xz
-QT53D_DEPENDENCIES = qt5base qt5declarative
+QT53D_DEPENDENCIES = assimp qt5base qt5declarative
 QT53D_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
@@ -34,6 +34,7 @@ endef
 ifeq ($(BR2_STATIC_LIBS),)
 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
 endef
 endif
-- 
2.1.4

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

* [Buildroot] [PATCH v2] assimp: new package
  2015-12-06 22:17 [Buildroot] [PATCH v2] assimp: new package Peter Seiderer
  2015-12-06 22:17 ` [Buildroot] [PATCH v2] qt53d: enabled assimpsceneparser plugin Peter Seiderer
@ 2015-12-13 13:07 ` Thomas Petazzoni
  2015-12-17 22:17   ` Peter Seiderer
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-12-13 13:07 UTC (permalink / raw)
  To: buildroot

Peter,

On Sun,  6 Dec 2015 23:17:55 +0100, Peter Seiderer wrote:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ----
> Changes v1 -> v2:
>   - use github helper (thanks to J?rg Krause)

It seems that it needs a C++ compiler, so you need to add this
dependency, otherwise the build fails with:

CMake Error at CMakeLists.txt:3 (PROJECT):
  The CMAKE_CXX_COMPILER:

    /home/thomas/projets/outputs/assimp-minimal/host/usr/bin/arm-linux-g++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

Also, it fails to build with musl, with the following error:

In file included from /home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrXML.cpp:10:0:
/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrString.h: In member function ?irr::core::string<char_type> irr::io::CXMLReaderImpl<char_type, superclass>::replaceSpecialCharacters(irr::core::string<char_type>&) [with char_type = char; superclass = irr::io::IXMLBase]?:
/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrString.h:639:3: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
   if (allocated < used)
   ^
[ 96%] Linking CXX shared library ../lib/libassimp.so
/home/thomas/projets/outputs/assimp-musl/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux-musleabihf/bin/ld: ../lib/libzlibstatic.a(compress.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../lib/libzlibstatic.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
code/CMakeFiles/assimp.dir/build.make:4307: recipe for target 'lib/libassimp.so.3.2.0' failed
make[4]: *** [lib/libassimp.so.3.2.0] Error 1
CMakeFiles/Makefile2:172: recipe for target 'code/CMakeFiles/assimp.dir/all' failed
make[3]: *** [code/CMakeFiles/assimp.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make[2]: *** [all] Error 2
package/pkg-generic.mk:196: recipe for target '/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/.stamp_built' failed
make[1]: *** [/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/.stamp_built] Error 2
Makefile:16: recipe for target '_all' failed
make: *** [_all] Error 2

Defconfig to reproduce:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_EABIHF=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-cortex-a9-musl-2015.11-rc1-71-g90d1299.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_ASSIMP=y
# BR2_TARGET_ROOTFS_TAR is not set

Can you look into these issues and send an updated version?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2] assimp: new package
  2015-12-13 13:07 ` [Buildroot] [PATCH v2] assimp: new package Thomas Petazzoni
@ 2015-12-17 22:17   ` Peter Seiderer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2015-12-17 22:17 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sun, 13 Dec 2015 14:07:30 +0100, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Peter,
> 
> On Sun,  6 Dec 2015 23:17:55 +0100, Peter Seiderer wrote:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ----
> > Changes v1 -> v2:
> >   - use github helper (thanks to J?rg Krause)
> 
> It seems that it needs a C++ compiler, so you need to add this
> dependency, otherwise the build fails with:
> 
> CMake Error at CMakeLists.txt:3 (PROJECT):
>   The CMAKE_CXX_COMPILER:
> 
>     /home/thomas/projets/outputs/assimp-minimal/host/usr/bin/arm-linux-g++
> 
>   is not a full path to an existing compiler tool.
> 
>   Tell CMake where to find the compiler by setting either the environment
>   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
>   to the compiler, or to the compiler name if it is in the PATH.
> 

Ups, missed this one, fixed in next patch version...

> Also, it fails to build with musl, with the following error:
> 
> In file included from /home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrXML.cpp:10:0:
> /home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrString.h: In member function ?irr::core::string<char_type> irr::io::CXMLReaderImpl<char_type, superclass>::replaceSpecialCharacters(irr::core::string<char_type>&) [with char_type = char; superclass = irr::io::IXMLBase]?:
> /home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/contrib/irrXML/irrString.h:639:3: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
>    if (allocated < used)
>    ^
> [ 96%] Linking CXX shared library ../lib/libassimp.so
> /home/thomas/projets/outputs/assimp-musl/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux-musleabihf/bin/ld: ../lib/libzlibstatic.a(compress.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
> ../lib/libzlibstatic.a: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> code/CMakeFiles/assimp.dir/build.make:4307: recipe for target 'lib/libassimp.so.3.2.0' failed
> make[4]: *** [lib/libassimp.so.3.2.0] Error 1
> CMakeFiles/Makefile2:172: recipe for target 'code/CMakeFiles/assimp.dir/all' failed
> make[3]: *** [code/CMakeFiles/assimp.dir/all] Error 2
> Makefile:127: recipe for target 'all' failed
> make[2]: *** [all] Error 2
> package/pkg-generic.mk:196: recipe for target '/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/.stamp_built' failed
> make[1]: *** [/home/thomas/projets/outputs/assimp-musl/build/assimp-v3.2/.stamp_built] Error 2
> Makefile:16: recipe for target '_all' failed
> make: *** [_all] Error 2
> 

Seems to be a problem with the built-in zlib (built static without -fPIC) and
linking into libassimp.so (object files built with -fPIC), see e.g. [1],
simple workaround is to select buildroot zlib package...

Updated patch follows soon...

Regards,
Peter

[1] https://cmake.org/pipermail/cmake/2006-March/008482.html


> Defconfig to reproduce:
> 
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_EABIHF=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-cortex-a9-musl-2015.11-rc1-71-g90d1299.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_ASSIMP=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> Can you look into these issues and send an updated version?
> 
> Thanks!
> 
> Thomas

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

end of thread, other threads:[~2015-12-17 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-06 22:17 [Buildroot] [PATCH v2] assimp: new package Peter Seiderer
2015-12-06 22:17 ` [Buildroot] [PATCH v2] qt53d: enabled assimpsceneparser plugin Peter Seiderer
2015-12-13 13:07 ` [Buildroot] [PATCH v2] assimp: new package Thomas Petazzoni
2015-12-17 22:17   ` Peter Seiderer

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