Skip to contentSkip to conversation

qt5base: use system/buildroot provided freetype

PATCH Superseded Peter Seiderer 2 participants 8 messages Feb 9, 2017 – Feb 11, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 qt5base: use system/buildroot provided freetype

Fixes [1]:

Project ERROR: Library 'libpng' is not defined. make[3]: *** [sub-3rdparty-freetype-make_first] Error 3

[1] http://autobuild.buildroot.net/results/219162ba616289f799a5053c4dcc6b8574284283

---
 package/qt5/qt5base/Config.in  | 1 +
 package/qt5/qt5base/qt5base.mk | 2 ++
 2 files changed, 3 insertions(+)
package/qt5/qt5base/Config.in +1 -0
index f22e034b3..337dcf245 100644
@@ -128,6 +128,7 @@ config BR2_PACKAGE_QT5BASE_XML
 
 config BR2_PACKAGE_QT5BASE_GUI
 	bool "gui module"
+	select BR2_PACKAGE_FREETYPE
 	# At least one graphic backend must be enabled, so enable
 	# linuxfb if nothing is enabled.
 	select BR2_PACKAGE_QT5BASE_LINUXFB if \
package/qt5/qt5base/qt5base.mk +2 -0
index 2cf0331b0..07803e776 100644
@@ -100,6 +100,8 @@ endif
 # We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
 # is to add a link against the "inuxfb" library.
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-system-freetype,-no-freetype)
+QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_GUI),freetype)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 WIP: qt5base: use system/buildroot provided harfbuzz

---
Missing BR2_TOOLCHAIN_HAS_SYNC_4 dependecy propagation from harfbuzz.

---
 package/qt5/qt5base/Config.in  | 1 +
 package/qt5/qt5base/qt5base.mk | 2 ++
 2 files changed, 3 insertions(+)
package/qt5/qt5base/Config.in +1 -0
index 337dcf245..9cfbd10ab 100644
@@ -129,6 +129,7 @@ config BR2_PACKAGE_QT5BASE_XML
 config BR2_PACKAGE_QT5BASE_GUI
 	bool "gui module"
 	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_HARFBUZZ
 	# At least one graphic backend must be enabled, so enable
 	# linuxfb if nothing is enabled.
 	select BR2_PACKAGE_QT5BASE_LINUXFB if \
package/qt5/qt5base/qt5base.mk +2 -0
index 07803e776..5c17c649d 100644
@@ -102,6 +102,8 @@ endif
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-system-freetype,-no-freetype)
 QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_GUI),freetype)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-system-harfbuzz,-no-harfbuzz)
+QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_GUI),harfbuzz)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 WIP: qt5base: use system/buildroot provided harfbuzz

Hello,

Quoted 3 lines · Peter Seiderer

---
Missing BR2_TOOLCHAIN_HAS_SYNC_4 dependecy propagation from harfbuzz.

Qt5 does not (yet) have the dependency on BR2_TOOLCHAIN_HAS_SYNC_4 (but seems to compile fine with the bundled version of harfbuzz), is this because (the existing) dependency on BR2_TOOLCHAIN_HAS_THREADS_NPTL is 'stronger' than BR2_TOOLCHAIN_HAS_SYNC_4 (or is this complete unrelated)?

Regards,
Peter

Quoted 30 lines
---
 package/qt5/qt5base/Config.in  | 1 +
 package/qt5/qt5base/qt5base.mk | 2 ++
 2 files changed, 3 insertions(+)
package/qt5/qt5base/Config.in +1 -0
index 337dcf245..9cfbd10ab 100644
@@ -129,6 +129,7 @@ config BR2_PACKAGE_QT5BASE_XML
 config BR2_PACKAGE_QT5BASE_GUI
 	bool "gui module"
 	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_HARFBUZZ
 	# At least one graphic backend must be enabled, so enable
 	# linuxfb if nothing is enabled.
 	select BR2_PACKAGE_QT5BASE_LINUXFB if \
package/qt5/qt5base/qt5base.mk +2 -0
index 07803e776..5c17c649d 100644
@@ -102,6 +102,8 @@ endif
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-system-freetype,-no-freetype)
 QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_GUI),freetype)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-system-harfbuzz,-no-harfbuzz)
+QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_GUI),harfbuzz)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
#3 lore raw

PATCH 2/2 WIP: qt5base: use system/buildroot provided harfbuzz

Hello,

Quoted 4 lines · Peter Seiderer

Qt5 does not (yet) have the dependency on BR2_TOOLCHAIN_HAS_SYNC_4 (but seems to compile fine with the bundled version of harfbuzz), is this because (the existing) dependency on BR2_TOOLCHAIN_HAS_THREADS_NPTL is 'stronger' than BR2_TOOLCHAIN_HAS_SYNC_4 (or is this complete unrelated)?

These are completely unrelated. For example, SPARC has NPTL, but not BR2_TOOLCHAIN_HAS_SYNC_4.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 2/2 WIP: qt5base: use system/buildroot provided harfbuzz

Hello Thomas,

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · Peter Seiderer

Qt5 does not (yet) have the dependency on BR2_TOOLCHAIN_HAS_SYNC_4 (but seems to compile fine with the bundled version of harfbuzz), is this because (the existing) dependency on BR2_TOOLCHAIN_HAS_THREADS_NPTL is 'stronger' than BR2_TOOLCHAIN_HAS_SYNC_4 (or is this complete unrelated)?

These are completely unrelated. For example, SPARC has NPTL, but not BR2_TOOLCHAIN_HAS_SYNC_4.

Thanks for the answer...

Found the trick of the Qt built-in harfbuzz, they use the QAtomicPointer implementation instead of the default harfbuzz provided for hb_atomic_int_impl_add, hb_atomic_ptr_impl_get and hb_atomic_ptr_impl_cmpexch (see qtbase-opensource-src-5.8.0/src/3rdparty/harfbuzz-ng/config.h).

What should we do for the !BR2_TOOLCHAIN_HAS_SYNC_4 case:

- fall back to qt built-in harfbuzz
- disable harfbuzz support

Regards,
Peter

Quoted 2 lines

Thomas

#5 lore raw

PATCH 1/2 qt5base: use system/buildroot provided freetype

In reply to Peter Seiderer

Hello,

Quoted 8 lines · Peter Seiderer

Fixes [1]:

Project ERROR: Library 'libpng' is not defined. make[3]: *** [sub-3rdparty-freetype-make_first] Error 3

[1] http://autobuild.buildroot.net/results/219162ba616289f799a5053c4dcc6b8574284283

So since Qt 5.8, both freetype and harfbuzz are mandatory for the GUI support ?

Should we make these additional dependencies only exist for the Qt latest version (they were not needed for Qt 5.6) ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#6 lore raw

PATCH 1/2 qt5base: use system/buildroot provided freetype

Hello Thomas,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Peter Seiderer

Fixes [1]:

Project ERROR: Library 'libpng' is not defined. make[3]: *** [sub-3rdparty-freetype-make_first] Error 3

Quoted 6 lines
Quoted 3 lines

[1] http://autobuild.buildroot.net/results/219162ba616289f799a5053c4dcc6b8574284283

So since Qt 5.8, both freetype and harfbuzz are mandatory for the GUI support ?

Do not know if 'mandatory', but at the moment qt-provided/built-in freetype/harfbuzz are used by both versions (5.6/5.8) in case GUI is enabled...

I can try without freetype/harfbuzz but I think this will lead to no/very poor font support (maybe bitmap fonts?)...

Quoted 3 lines

Should we make these additional dependencies only exist for the Qt latest version (they were not needed for Qt 5.6) ?

If using the system/buildroot provided libraries is preferred it should be done for both versions...

Regards,
Peter

Quoted 4 lines

Thanks!

Thomas

#7 lore raw

PATCH 1/2 qt5base: use system/buildroot provided freetype

Hello,

Quoted 9 lines · Peter Seiderer
Quoted 2 lines

So since Qt 5.8, both freetype and harfbuzz are mandatory for the GUI support ?

Do not know if 'mandatory', but at the moment qt-provided/built-in freetype/harfbuzz are used by both versions (5.6/5.8) in case GUI is enabled...

I can try without freetype/harfbuzz but I think this will lead to no/very poor font support (maybe bitmap fonts?)...

OK. If you feel like they are technically not mandatory, but in practice quite needed to get a decent functionality, then OK to have them enabled.

Quoted 5 lines
Quoted 2 lines

Should we make these additional dependencies only exist for the Qt latest version (they were not needed for Qt 5.6) ?

If using the system/buildroot provided libraries is preferred it should be done for both versions...

System/buildroot provided libraries are definitely preferred. That's why we're using -system-<foo> all over the place in qt5base.mk.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com