All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/harfbuzz: fix build with gcc < 7
@ 2022-07-20 17:17 Bernd Kuhls
  2022-07-20 23:21 ` Giulio Benetti
  2022-07-22 17:24 ` Arnout Vandecappelle
  0 siblings, 2 replies; 7+ messages in thread
From: Bernd Kuhls @ 2022-07-20 17:17 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

Fixes various build errors

In file included from ../src/hb-kern.hh:32:0,
                 from ../src/hb-ot-shape-fallback.cc:32:
../src/hb-ot-layout-gpos-table.hh:50:117: error: specialization of 'template<class context_t> static typename context_t::return_t OT::Layout::GPOS_impl::PosLookup::dispatch_recurse_func(context_t*, unsigned int)' in different namespace [-fpermissive]

introduced by bumping harfbuzz to 4.4.1 in
03022329e02332c22f44e0e0a9b17d8454ba26ae

The build error was not yet caught by the autobuilders but can be
reproduced using this defconfig:
http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 .../0004-GPOS-Fix-build-on-GCC-7.patch        | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch

diff --git a/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
new file mode 100644
index 0000000000..ead6fc024f
--- /dev/null
+++ b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
@@ -0,0 +1,97 @@
+From 3238cb744bb570a75326ab4438968c59069e9af2 Mon Sep 17 00:00:00 2001
+From: Kleis Auke Wolthuizen <github@kleisauke.nl>
+Date: Wed, 6 Jul 2022 13:18:14 +0200
+Subject: [PATCH] [GPOS] Fix build on GCC < 7
+
+[Retrieved (and backported) from:
+https://github.com/harfbuzz/harfbuzz/commit/3238cb744bb570a75326ab4438968c59069e9af2]
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ src/OT/Layout/GPOS/GPOS.hh     | 17 ++++++++++-------
+ src/hb-ot-layout-gpos-table.hh |  6 ++++--
+ 2 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/src/OT/Layout/GPOS/GPOS.hh b/src/OT/Layout/GPOS/GPOS.hh
+index 7fb97d7568..23b0b090a2 100644
+--- a/src/OT/Layout/GPOS.hh
++++ b/src/OT/Layout/GPOS.hh
+@@ -7,6 +7,9 @@
+ #include "GPOS/PosLookup.hh"
+ 
+ namespace OT {
++
++using Layout::GPOS_impl::PosLookup;
++
+ namespace Layout {
+ 
+ static void
+@@ -25,10 +28,10 @@ struct GPOS : GSUBGPOS
+ {
+   static constexpr hb_tag_t tableTag = HB_OT_TAG_GPOS;
+ 
+-  using Lookup = GPOS_impl::PosLookup;
++  using Lookup = PosLookup;
+ 
+-  const GPOS_impl::PosLookup& get_lookup (unsigned int i) const
+-  { return static_cast<const GPOS_impl::PosLookup &> (GSUBGPOS::get_lookup (i)); }
++  const PosLookup& get_lookup (unsigned int i) const
++  { return static_cast<const PosLookup &> (GSUBGPOS::get_lookup (i)); }
+ 
+   static inline void position_start (hb_font_t *font, hb_buffer_t *buffer);
+   static inline void position_finish_advances (hb_font_t *font, hb_buffer_t *buffer);
+@@ -37,11 +40,11 @@ struct GPOS : GSUBGPOS
+   bool subset (hb_subset_context_t *c) const
+   {
+     hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_langsys, c->plan->gpos_features);
+-    return GSUBGPOS::subset<GPOS_impl::PosLookup> (&l);
++    return GSUBGPOS::subset<PosLookup> (&l);
+   }
+ 
+   bool sanitize (hb_sanitize_context_t *c) const
+-  { return GSUBGPOS::sanitize<GPOS_impl::PosLookup> (c); }
++  { return GSUBGPOS::sanitize<PosLookup> (c); }
+ 
+   HB_INTERNAL bool is_blocklisted (hb_blob_t *blob,
+                                    hb_face_t *face) const;
+@@ -51,7 +54,7 @@ struct GPOS : GSUBGPOS
+     for (unsigned i = 0; i < GSUBGPOS::get_lookup_count (); i++)
+     {
+       if (!c->gpos_lookups->has (i)) continue;
+-      const GPOS_impl::PosLookup &l = get_lookup (i);
++      const PosLookup &l = get_lookup (i);
+       l.dispatch (c);
+     }
+   }
+@@ -59,7 +62,7 @@ struct GPOS : GSUBGPOS
+   void closure_lookups (hb_face_t      *face,
+                         const hb_set_t *glyphs,
+                         hb_set_t       *lookup_indexes /* IN/OUT */) const
+-  { GSUBGPOS::closure_lookups<GPOS_impl::PosLookup> (face, glyphs, lookup_indexes); }
++  { GSUBGPOS::closure_lookups<PosLookup> (face, glyphs, lookup_indexes); }
+ 
+   typedef GSUBGPOS::accelerator_t<GPOS> accelerator_t;
+ };
+diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
+index f5059cfa83..8fe987fc50 100644
+--- a/src/hb-ot-layout-gpos-table.hh
++++ b/src/hb-ot-layout-gpos-table.hh
+@@ -32,8 +32,8 @@
+ #include "OT/Layout/GPOS.hh"
+ 
+ namespace OT {
+-
+-using Layout::GPOS_impl::PosLookup;
++namespace Layout {
++namespace GPOS_impl {
+ 
+ // TODO(garretrieger): Move into new layout directory.
+ /* Out-of-class implementation for methods recursing */
+@@ -68,6 +68,8 @@ inline bool PosLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply
+ }
+ #endif
+ 
++} /* namespace GPOS_impl */
++} /* namespace Layout */
+ } /* namespace OT */
+ 
+ 
-- 
2.30.2

_______________________________________________
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/harfbuzz: fix build with gcc < 7
  2022-07-20 17:17 [Buildroot] [PATCH 1/1] package/harfbuzz: fix build with gcc < 7 Bernd Kuhls
@ 2022-07-20 23:21 ` Giulio Benetti
  2022-07-22 17:24 ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Giulio Benetti @ 2022-07-20 23:21 UTC (permalink / raw)
  To: Bernd Kuhls, buildroot

Hi Bernd,

On 20/07/22 19:17, Bernd Kuhls wrote:
> Fixes various build errors
> 
> In file included from ../src/hb-kern.hh:32:0,
>                   from ../src/hb-ot-shape-fallback.cc:32:
> ../src/hb-ot-layout-gpos-table.hh:50:117: error: specialization of 'template<class context_t> static typename context_t::return_t OT::Layout::GPOS_impl::PosLookup::dispatch_recurse_func(context_t*, unsigned int)' in different namespace [-fpermissive]
> 
> introduced by bumping harfbuzz to 4.4.1 in
> 03022329e02332c22f44e0e0a9b17d8454ba26ae
> 
> The build error was not yet caught by the autobuilders but can be
> reproduced using this defconfig:
> http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Thank you for the patch. I've confused the your patch(GPOS) with already
committed patch(GSUB). I've reproduced the bug and with this patch it's 
fixed, so:

Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards!
-- 
Giulio Benetti
Benetti Engineering sas

> ---
>   .../0004-GPOS-Fix-build-on-GCC-7.patch        | 97 +++++++++++++++++++
>   1 file changed, 97 insertions(+)
>   create mode 100644 package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> 
> diff --git a/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> new file mode 100644
> index 0000000000..ead6fc024f
> --- /dev/null
> +++ b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> @@ -0,0 +1,97 @@
> +From 3238cb744bb570a75326ab4438968c59069e9af2 Mon Sep 17 00:00:00 2001
> +From: Kleis Auke Wolthuizen <github@kleisauke.nl>
> +Date: Wed, 6 Jul 2022 13:18:14 +0200
> +Subject: [PATCH] [GPOS] Fix build on GCC < 7
> +
> +[Retrieved (and backported) from:
> +https://github.com/harfbuzz/harfbuzz/commit/3238cb744bb570a75326ab4438968c59069e9af2]
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + src/OT/Layout/GPOS/GPOS.hh     | 17 ++++++++++-------
> + src/hb-ot-layout-gpos-table.hh |  6 ++++--
> + 2 files changed, 14 insertions(+), 9 deletions(-)
> +
> +diff --git a/src/OT/Layout/GPOS/GPOS.hh b/src/OT/Layout/GPOS/GPOS.hh
> +index 7fb97d7568..23b0b090a2 100644
> +--- a/src/OT/Layout/GPOS.hh
> ++++ b/src/OT/Layout/GPOS.hh
> +@@ -7,6 +7,9 @@
> + #include "GPOS/PosLookup.hh"
> +
> + namespace OT {
> ++
> ++using Layout::GPOS_impl::PosLookup;
> ++
> + namespace Layout {
> +
> + static void
> +@@ -25,10 +28,10 @@ struct GPOS : GSUBGPOS
> + {
> +   static constexpr hb_tag_t tableTag = HB_OT_TAG_GPOS;
> +
> +-  using Lookup = GPOS_impl::PosLookup;
> ++  using Lookup = PosLookup;
> +
> +-  const GPOS_impl::PosLookup& get_lookup (unsigned int i) const
> +-  { return static_cast<const GPOS_impl::PosLookup &> (GSUBGPOS::get_lookup (i)); }
> ++  const PosLookup& get_lookup (unsigned int i) const
> ++  { return static_cast<const PosLookup &> (GSUBGPOS::get_lookup (i)); }
> +
> +   static inline void position_start (hb_font_t *font, hb_buffer_t *buffer);
> +   static inline void position_finish_advances (hb_font_t *font, hb_buffer_t *buffer);
> +@@ -37,11 +40,11 @@ struct GPOS : GSUBGPOS
> +   bool subset (hb_subset_context_t *c) const
> +   {
> +     hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_langsys, c->plan->gpos_features);
> +-    return GSUBGPOS::subset<GPOS_impl::PosLookup> (&l);
> ++    return GSUBGPOS::subset<PosLookup> (&l);
> +   }
> +
> +   bool sanitize (hb_sanitize_context_t *c) const
> +-  { return GSUBGPOS::sanitize<GPOS_impl::PosLookup> (c); }
> ++  { return GSUBGPOS::sanitize<PosLookup> (c); }
> +
> +   HB_INTERNAL bool is_blocklisted (hb_blob_t *blob,
> +                                    hb_face_t *face) const;
> +@@ -51,7 +54,7 @@ struct GPOS : GSUBGPOS
> +     for (unsigned i = 0; i < GSUBGPOS::get_lookup_count (); i++)
> +     {
> +       if (!c->gpos_lookups->has (i)) continue;
> +-      const GPOS_impl::PosLookup &l = get_lookup (i);
> ++      const PosLookup &l = get_lookup (i);
> +       l.dispatch (c);
> +     }
> +   }
> +@@ -59,7 +62,7 @@ struct GPOS : GSUBGPOS
> +   void closure_lookups (hb_face_t      *face,
> +                         const hb_set_t *glyphs,
> +                         hb_set_t       *lookup_indexes /* IN/OUT */) const
> +-  { GSUBGPOS::closure_lookups<GPOS_impl::PosLookup> (face, glyphs, lookup_indexes); }
> ++  { GSUBGPOS::closure_lookups<PosLookup> (face, glyphs, lookup_indexes); }
> +
> +   typedef GSUBGPOS::accelerator_t<GPOS> accelerator_t;
> + };
> +diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
> +index f5059cfa83..8fe987fc50 100644
> +--- a/src/hb-ot-layout-gpos-table.hh
> ++++ b/src/hb-ot-layout-gpos-table.hh
> +@@ -32,8 +32,8 @@
> + #include "OT/Layout/GPOS.hh"
> +
> + namespace OT {
> +-
> +-using Layout::GPOS_impl::PosLookup;
> ++namespace Layout {
> ++namespace GPOS_impl {
> +
> + // TODO(garretrieger): Move into new layout directory.
> + /* Out-of-class implementation for methods recursing */
> +@@ -68,6 +68,8 @@ inline bool PosLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply
> + }
> + #endif
> +
> ++} /* namespace GPOS_impl */
> ++} /* namespace Layout */
> + } /* namespace OT */
> +
> +

_______________________________________________
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 1/1] package/harfbuzz: fix build with gcc < 7
  2022-07-20 17:17 [Buildroot] [PATCH 1/1] package/harfbuzz: fix build with gcc < 7 Bernd Kuhls
  2022-07-20 23:21 ` Giulio Benetti
@ 2022-07-22 17:24 ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-07-22 17:24 UTC (permalink / raw)
  To: Bernd Kuhls, buildroot; +Cc: Giulio Benetti



On 20/07/2022 19:17, Bernd Kuhls wrote:
> Fixes various build errors
> 
> In file included from ../src/hb-kern.hh:32:0,
>                   from ../src/hb-ot-shape-fallback.cc:32:
> ../src/hb-ot-layout-gpos-table.hh:50:117: error: specialization of 'template<class context_t> static typename context_t::return_t OT::Layout::GPOS_impl::PosLookup::dispatch_recurse_func(context_t*, unsigned int)' in different namespace [-fpermissive]
> 
> introduced by bumping harfbuzz to 4.4.1 in
> 03022329e02332c22f44e0e0a9b17d8454ba26ae
> 
> The build error was not yet caught by the autobuilders but can be
> reproduced using this defconfig:
> http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   .../0004-GPOS-Fix-build-on-GCC-7.patch        | 97 +++++++++++++++++++
>   1 file changed, 97 insertions(+)
>   create mode 100644 package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> 
> diff --git a/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> new file mode 100644
> index 0000000000..ead6fc024f
> --- /dev/null
> +++ b/package/harfbuzz/0004-GPOS-Fix-build-on-GCC-7.patch
> @@ -0,0 +1,97 @@
> +From 3238cb744bb570a75326ab4438968c59069e9af2 Mon Sep 17 00:00:00 2001
> +From: Kleis Auke Wolthuizen <github@kleisauke.nl>
> +Date: Wed, 6 Jul 2022 13:18:14 +0200
> +Subject: [PATCH] [GPOS] Fix build on GCC < 7
> +
> +[Retrieved (and backported) from:
> +https://github.com/harfbuzz/harfbuzz/commit/3238cb744bb570a75326ab4438968c59069e9af2]
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + src/OT/Layout/GPOS/GPOS.hh     | 17 ++++++++++-------
> + src/hb-ot-layout-gpos-table.hh |  6 ++++--
> + 2 files changed, 14 insertions(+), 9 deletions(-)
> +
> +diff --git a/src/OT/Layout/GPOS/GPOS.hh b/src/OT/Layout/GPOS/GPOS.hh
> +index 7fb97d7568..23b0b090a2 100644
> +--- a/src/OT/Layout/GPOS.hh
> ++++ b/src/OT/Layout/GPOS.hh
> +@@ -7,6 +7,9 @@
> + #include "GPOS/PosLookup.hh"
> +
> + namespace OT {
> ++
> ++using Layout::GPOS_impl::PosLookup;
> ++
> + namespace Layout {
> +
> + static void
> +@@ -25,10 +28,10 @@ struct GPOS : GSUBGPOS
> + {
> +   static constexpr hb_tag_t tableTag = HB_OT_TAG_GPOS;
> +
> +-  using Lookup = GPOS_impl::PosLookup;
> ++  using Lookup = PosLookup;
> +
> +-  const GPOS_impl::PosLookup& get_lookup (unsigned int i) const
> +-  { return static_cast<const GPOS_impl::PosLookup &> (GSUBGPOS::get_lookup (i)); }
> ++  const PosLookup& get_lookup (unsigned int i) const
> ++  { return static_cast<const PosLookup &> (GSUBGPOS::get_lookup (i)); }
> +
> +   static inline void position_start (hb_font_t *font, hb_buffer_t *buffer);
> +   static inline void position_finish_advances (hb_font_t *font, hb_buffer_t *buffer);
> +@@ -37,11 +40,11 @@ struct GPOS : GSUBGPOS
> +   bool subset (hb_subset_context_t *c) const
> +   {
> +     hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_langsys, c->plan->gpos_features);
> +-    return GSUBGPOS::subset<GPOS_impl::PosLookup> (&l);
> ++    return GSUBGPOS::subset<PosLookup> (&l);
> +   }
> +
> +   bool sanitize (hb_sanitize_context_t *c) const
> +-  { return GSUBGPOS::sanitize<GPOS_impl::PosLookup> (c); }
> ++  { return GSUBGPOS::sanitize<PosLookup> (c); }
> +
> +   HB_INTERNAL bool is_blocklisted (hb_blob_t *blob,
> +                                    hb_face_t *face) const;
> +@@ -51,7 +54,7 @@ struct GPOS : GSUBGPOS
> +     for (unsigned i = 0; i < GSUBGPOS::get_lookup_count (); i++)
> +     {
> +       if (!c->gpos_lookups->has (i)) continue;
> +-      const GPOS_impl::PosLookup &l = get_lookup (i);
> ++      const PosLookup &l = get_lookup (i);
> +       l.dispatch (c);
> +     }
> +   }
> +@@ -59,7 +62,7 @@ struct GPOS : GSUBGPOS
> +   void closure_lookups (hb_face_t      *face,
> +                         const hb_set_t *glyphs,
> +                         hb_set_t       *lookup_indexes /* IN/OUT */) const
> +-  { GSUBGPOS::closure_lookups<GPOS_impl::PosLookup> (face, glyphs, lookup_indexes); }
> ++  { GSUBGPOS::closure_lookups<PosLookup> (face, glyphs, lookup_indexes); }
> +
> +   typedef GSUBGPOS::accelerator_t<GPOS> accelerator_t;
> + };
> +diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
> +index f5059cfa83..8fe987fc50 100644
> +--- a/src/hb-ot-layout-gpos-table.hh
> ++++ b/src/hb-ot-layout-gpos-table.hh
> +@@ -32,8 +32,8 @@
> + #include "OT/Layout/GPOS.hh"
> +
> + namespace OT {
> +-
> +-using Layout::GPOS_impl::PosLookup;
> ++namespace Layout {
> ++namespace GPOS_impl {
> +
> + // TODO(garretrieger): Move into new layout directory.
> + /* Out-of-class implementation for methods recursing */
> +@@ -68,6 +68,8 @@ inline bool PosLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply
> + }
> + #endif
> +
> ++} /* namespace GPOS_impl */
> ++} /* namespace Layout */
> + } /* namespace OT */
> +
> +
_______________________________________________
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 1/1] package/harfbuzz: fix build with gcc < 7
  2022-07-12 16:27 Fabrice Fontaine
  2022-07-12 21:08 ` Giulio Benetti
@ 2022-07-20 11:50 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-20 11:50 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Giulio Benetti, buildroot

On Tue, 12 Jul 2022 18:27:12 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure with gcc < 7 raised since bump to
> version 4.4.0 in commit e186b4d89dcd3eb9fae557959181d7176e7c873c:
> 
> In file included from ../src/hb.hh:473:0,
>                  from ../src/hb-buffer-verify.cc:27:
> ../src/hb-cplusplus.hh:170:13: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]
>  struct std::hash<hb::shared_ptr<T>>
>              ^
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0002-cplusplus-Fix-build-on-GCC-7.patch   | 50 +++++++++++++++++
>  .../0003-GSUB-Fix-build-on-GCC-7.patch        | 56 +++++++++++++++++++
>  2 files changed, 106 insertions(+)
>  create mode 100644 package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
>  create mode 100644 package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
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 1/1] package/harfbuzz: fix build with gcc < 7
       [not found] <20220712162712.1582871-1-fontaine.fabrice__39469.849776809$1657643442$gmane$org@gmail.com>
@ 2022-07-17 11:10 ` Bernd Kuhls
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Kuhls @ 2022-07-17 11:10 UTC (permalink / raw)
  To: buildroot

Am Tue, 12 Jul 2022 18:27:12 +0200 schrieb Fabrice Fontaine:

> Fix the following build failure with gcc < 7 raised since bump to
> version 4.4.0 in commit e186b4d89dcd3eb9fae557959181d7176e7c873c:

Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
(build-tested using x86_64-buildroot-linux-uclibc-gcc.br_real (Buildroot 
2022.05-482-gbfcae2469a) 4.9.4)

_______________________________________________
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 1/1] package/harfbuzz: fix build with gcc < 7
  2022-07-12 16:27 Fabrice Fontaine
@ 2022-07-12 21:08 ` Giulio Benetti
  2022-07-20 11:50 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Giulio Benetti @ 2022-07-12 21:08 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot

Hi Fabrice,

On 12/07/22 18:27, Fabrice Fontaine wrote:
> Fix the following build failure with gcc < 7 raised since bump to
> version 4.4.0 in commit e186b4d89dcd3eb9fae557959181d7176e7c873c:
> 
> In file included from ../src/hb.hh:473:0,
>                   from ../src/hb-buffer-verify.cc:27:
> ../src/hb-cplusplus.hh:170:13: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]
>   struct std::hash<hb::shared_ptr<T>>
>               ^
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

thank you for providing such fix.

Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
CTO/CEO@Benetti Engineering sas

> ---
>   .../0002-cplusplus-Fix-build-on-GCC-7.patch   | 50 +++++++++++++++++
>   .../0003-GSUB-Fix-build-on-GCC-7.patch        | 56 +++++++++++++++++++
>   2 files changed, 106 insertions(+)
>   create mode 100644 package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
>   create mode 100644 package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
> 
> diff --git a/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
> new file mode 100644
> index 0000000000..de2955d8b5
> --- /dev/null
> +++ b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
> @@ -0,0 +1,50 @@
> +From 7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927 Mon Sep 17 00:00:00 2001
> +From: Kleis Auke Wolthuizen <github@kleisauke.nl>
> +Date: Wed, 6 Jul 2022 12:58:15 +0200
> +Subject: [PATCH] [cplusplus] Fix build on GCC < 7
> +
> +[Retrieved from:
> +https://github.com/harfbuzz/harfbuzz/commit/7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/hb-cplusplus.hh | 12 ++++++++++--
> + 1 file changed, 10 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/hb-cplusplus.hh b/src/hb-cplusplus.hh
> +index 86d0452080..f06a32d912 100644
> +--- a/src/hb-cplusplus.hh
> ++++ b/src/hb-cplusplus.hh
> +@@ -166,8 +166,14 @@ HB_DEFINE_VTABLE (unicode_funcs);
> +
> + } // namespace hb
> +
> ++/* Workaround for GCC < 7, see:
> ++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
> ++ * https://stackoverflow.com/a/25594741 */
> ++namespace std {
> ++
> ++
> + template<typename T>
> +-struct std::hash<hb::shared_ptr<T>>
> ++struct hash<hb::shared_ptr<T>>
> + {
> +     std::size_t operator()(const hb::shared_ptr<T>& v) const noexcept
> +     {
> +@@ -177,7 +183,7 @@ struct std::hash<hb::shared_ptr<T>>
> + };
> +
> + template<typename T>
> +-struct std::hash<hb::unique_ptr<T>>
> ++struct hash<hb::unique_ptr<T>>
> + {
> +     std::size_t operator()(const hb::unique_ptr<T>& v) const noexcept
> +     {
> +@@ -187,6 +193,8 @@ struct std::hash<hb::unique_ptr<T>>
> + };
> +
> +
> ++} // namespace std
> ++
> + #endif /* __cplusplus */
> +
> + #endif /* HB_CPLUSPLUS_HH */
> diff --git a/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
> new file mode 100644
> index 0000000000..d3355443b7
> --- /dev/null
> +++ b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
> @@ -0,0 +1,56 @@
> +From 79eb0f74860fb6309e3162b4f17f98481c05a318 Mon Sep 17 00:00:00 2001
> +From: Kleis Auke Wolthuizen <github@kleisauke.nl>
> +Date: Wed, 6 Jul 2022 13:29:55 +0200
> +Subject: [PATCH] [GSUB] Fix build on GCC < 7
> +
> +[Retrieved (and backported) from:
> +https://github.com/harfbuzz/harfbuzz/commit/79eb0f74860fb6309e3162b4f17f98481c05a318]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/OT/Layout/GSUB/GSUB.hh     | 5 +++--
> + src/hb-ot-layout-gsub-table.hh | 8 ++++----
> + 2 files changed, 7 insertions(+), 6 deletions(-)
> +
> +diff --git a/src/OT/Layout/GSUB/GSUB.hh b/src/OT/Layout/GSUB/GSUB.hh
> +index 372862e2bb..750dca1da3 100644
> +--- a/src/OT/Layout/GSUB/GSUB.hh
> ++++ b/src/OT/Layout/GSUB/GSUB.hh
> +@@ -5,9 +5,10 @@
> + #include "Common.hh"
> + #include "SubstLookup.hh"
> +
> +-using OT::Layout::GSUB::SubstLookup;
> +-
> + namespace OT {
> ++
> ++using Layout::GSUB::SubstLookup;
> ++
> + namespace Layout {
> +
> + /*
> +diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
> +index 1eca613b6a..50301ff1d9 100644
> +--- a/src/hb-ot-layout-gsub-table.hh
> ++++ b/src/hb-ot-layout-gsub-table.hh
> +@@ -32,9 +32,8 @@
> + #include "OT/Layout/GSUB/GSUB.hh"
> +
> + namespace OT {
> +-
> +-using Layout::GSUB::SubstLookup;
> +-using Layout::GSUB::ExtensionSubst;
> ++namespace Layout {
> ++namespace GSUB {
> +
> + // TODO(garretrieger): Move into the new layout directory.
> + /* Out-of-class implementation for methods recursing */
> +@@ -82,7 +81,8 @@ inline bool SubstLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_app
> + }
> + #endif
> +
> +-
> ++} /* namespace GSUB */
> ++} /* namespace Layout */
> + } /* namespace OT */
> +
> +

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

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

* [Buildroot] [PATCH 1/1] package/harfbuzz: fix build with gcc < 7
@ 2022-07-12 16:27 Fabrice Fontaine
  2022-07-12 21:08 ` Giulio Benetti
  2022-07-20 11:50 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2022-07-12 16:27 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Fabrice Fontaine

Fix the following build failure with gcc < 7 raised since bump to
version 4.4.0 in commit e186b4d89dcd3eb9fae557959181d7176e7c873c:

In file included from ../src/hb.hh:473:0,
                 from ../src/hb-buffer-verify.cc:27:
../src/hb-cplusplus.hh:170:13: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]
 struct std::hash<hb::shared_ptr<T>>
             ^

Fixes:
 - http://autobuild.buildroot.org/results/3fe7526b685368007ae0f66e15ef2b27d30d5063

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0002-cplusplus-Fix-build-on-GCC-7.patch   | 50 +++++++++++++++++
 .../0003-GSUB-Fix-build-on-GCC-7.patch        | 56 +++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
 create mode 100644 package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch

diff --git a/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
new file mode 100644
index 0000000000..de2955d8b5
--- /dev/null
+++ b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch
@@ -0,0 +1,50 @@
+From 7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927 Mon Sep 17 00:00:00 2001
+From: Kleis Auke Wolthuizen <github@kleisauke.nl>
+Date: Wed, 6 Jul 2022 12:58:15 +0200
+Subject: [PATCH] [cplusplus] Fix build on GCC < 7
+
+[Retrieved from:
+https://github.com/harfbuzz/harfbuzz/commit/7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/hb-cplusplus.hh | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/hb-cplusplus.hh b/src/hb-cplusplus.hh
+index 86d0452080..f06a32d912 100644
+--- a/src/hb-cplusplus.hh
++++ b/src/hb-cplusplus.hh
+@@ -166,8 +166,14 @@ HB_DEFINE_VTABLE (unicode_funcs);
+ 
+ } // namespace hb
+ 
++/* Workaround for GCC < 7, see:
++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
++ * https://stackoverflow.com/a/25594741 */
++namespace std {
++
++
+ template<typename T>
+-struct std::hash<hb::shared_ptr<T>>
++struct hash<hb::shared_ptr<T>>
+ {
+     std::size_t operator()(const hb::shared_ptr<T>& v) const noexcept
+     {
+@@ -177,7 +183,7 @@ struct std::hash<hb::shared_ptr<T>>
+ };
+ 
+ template<typename T>
+-struct std::hash<hb::unique_ptr<T>>
++struct hash<hb::unique_ptr<T>>
+ {
+     std::size_t operator()(const hb::unique_ptr<T>& v) const noexcept
+     {
+@@ -187,6 +193,8 @@ struct std::hash<hb::unique_ptr<T>>
+ };
+ 
+ 
++} // namespace std
++
+ #endif /* __cplusplus */
+ 
+ #endif /* HB_CPLUSPLUS_HH */
diff --git a/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
new file mode 100644
index 0000000000..d3355443b7
--- /dev/null
+++ b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch
@@ -0,0 +1,56 @@
+From 79eb0f74860fb6309e3162b4f17f98481c05a318 Mon Sep 17 00:00:00 2001
+From: Kleis Auke Wolthuizen <github@kleisauke.nl>
+Date: Wed, 6 Jul 2022 13:29:55 +0200
+Subject: [PATCH] [GSUB] Fix build on GCC < 7
+
+[Retrieved (and backported) from:
+https://github.com/harfbuzz/harfbuzz/commit/79eb0f74860fb6309e3162b4f17f98481c05a318]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/OT/Layout/GSUB/GSUB.hh     | 5 +++--
+ src/hb-ot-layout-gsub-table.hh | 8 ++++----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/OT/Layout/GSUB/GSUB.hh b/src/OT/Layout/GSUB/GSUB.hh
+index 372862e2bb..750dca1da3 100644
+--- a/src/OT/Layout/GSUB/GSUB.hh
++++ b/src/OT/Layout/GSUB/GSUB.hh
+@@ -5,9 +5,10 @@
+ #include "Common.hh"
+ #include "SubstLookup.hh"
+ 
+-using OT::Layout::GSUB::SubstLookup;
+-
+ namespace OT {
++
++using Layout::GSUB::SubstLookup;
++
+ namespace Layout {
+ 
+ /*
+diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
+index 1eca613b6a..50301ff1d9 100644
+--- a/src/hb-ot-layout-gsub-table.hh
++++ b/src/hb-ot-layout-gsub-table.hh
+@@ -32,9 +32,8 @@
+ #include "OT/Layout/GSUB/GSUB.hh"
+ 
+ namespace OT {
+-
+-using Layout::GSUB::SubstLookup;
+-using Layout::GSUB::ExtensionSubst;
++namespace Layout {
++namespace GSUB {
+ 
+ // TODO(garretrieger): Move into the new layout directory.
+ /* Out-of-class implementation for methods recursing */
+@@ -82,7 +81,8 @@ inline bool SubstLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_app
+ }
+ #endif
+ 
+-
++} /* namespace GSUB */
++} /* namespace Layout */
+ } /* namespace OT */
+ 
+ 
-- 
2.35.1

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

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

end of thread, other threads:[~2022-07-22 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 17:17 [Buildroot] [PATCH 1/1] package/harfbuzz: fix build with gcc < 7 Bernd Kuhls
2022-07-20 23:21 ` Giulio Benetti
2022-07-22 17:24 ` Arnout Vandecappelle
     [not found] <20220712162712.1582871-1-fontaine.fabrice__39469.849776809$1657643442$gmane$org@gmail.com>
2022-07-17 11:10 ` Bernd Kuhls
  -- strict thread matches above, loose matches on Subject: below --
2022-07-12 16:27 Fabrice Fontaine
2022-07-12 21:08 ` Giulio Benetti
2022-07-20 11:50 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.