Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893410 - =sys-devel/gcc-12.2.1_p20230204, =sys-devel/gcc-13.0.1_pre20230205: can't build media-libs/harfbuzz-6.0.0 (hb-ot-cff2-table.cc.o (error: hb-map.hh:292:5: error: no match for ‘operator|’ [...])
Summary: =sys-devel/gcc-12.2.1_p20230204, =sys-devel/gcc-13.0.1_pre20230205: can't bui...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-13
  Show dependency tree
 
Reported: 2023-02-06 15:53 UTC by HougeLangley
Modified: 2023-02-06 18:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Full-Build-Log (harfbuzz-6.0.0-build-log.log,961.22 KB, text/plain)
2023-02-06 15:54 UTC, HougeLangley
Details
emerge-info (harfbuzz-6.0.0-emerge-info.log,6.53 KB, text/plain)
2023-02-06 15:56 UTC, HougeLangley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2023-02-06 15:53:32 UTC
FAILED: src/libharfbuzz.so.0.60000.0.p/hb-font.cc.o 
loongarch64-unknown-linux-gnu-g++ -Isrc/libharfbuzz.so.0.60000.0.p -Isrc -I../harfbuzz-6.0.0/src -I. -I../harfbuzz-6.0.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -fno-rtti -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DU_DISABLE_RENAMING=1 -DHAVE_CONFIG_H -O2 -pipe -DHB_NDEBUG -fPIC -pthread -Wno-non-virtual-dtor -MD -MQ src/libharfbuzz.so.0.60000.0.p/hb-font.cc.o -MF src/libharfbuzz.so.0.60000.0.p/hb-font.cc.o.d -o src/libharfbuzz.so.0.60000.0.p/hb-font.cc.o -c ../harfbuzz-6.0.0/src/hb-font.cc
In file included from ../harfbuzz-6.0.0/src/hb-ot-var-common.hh:29,
                 from ../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh:31,
                 from ../harfbuzz-6.0.0/src/hb-font.cc:37:
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh: In member function ‘void OT::Script::prune_langsys(OT::hb_prune_langsys_context_t*, unsigned int) const’:
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1158:24: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 1158 |         const LangSys& l = this+_.second.offset;
      |                        ^
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1158:42: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const Script*>(((const OT::Script*)this), _.hb_pair_t<unsigned int, const OT::Record<OT::LangSys>&>::second.OT::Record<OT::LangSys>::offset)’
 1158 |         const LangSys& l = this+_.second.offset;
      |                                          ^~~~~~
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1170:24: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 1170 |         const LangSys& l = this+_.second.offset;
      |                        ^
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1170:42: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const Script*>(((const OT::Script*)this), _.hb_pair_t<unsigned int, const OT::Record<OT::LangSys>&>::second.OT::Record<OT::LangSys>::offset)’
 1170 |         const LangSys& l = this+_.second.offset;
      |                                          ^~~~~~
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh: In member function ‘bool OT::Script::subset(hb_subset_context_t*, OT::hb_subset_layout_context_t*, const OT::Tag*) const’:
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1194:22: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 1194 |       const LangSys& ls = this+defaultLangSys;
      |                      ^~
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:1194:32: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const Script*>(((const OT::Script*)this), ((const OT::Script*)this)->OT::Script::defaultLangSys)’
 1194 |       const LangSys& ls = this+defaultLangSys;
      |                                ^~~~~~~~~~~~~~
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh: In member function ‘OT::VariationStore::cache_t* OT::VariationStore::create_cache() const’:
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:2677:11: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 2677 |     auto &r = this+regions;
      |           ^
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:2677:20: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const VariationStore*>(((const OT::VariationStore*)this), ((const OT::VariationStore*)this)->OT::VariationStore::regions)’
 2677 |     auto &r = this+regions;
      |                    ^~~~~~~
../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh: In member function ‘void OT::avar::map_coords(int*, unsigned int) const’:
../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh:194:17: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  194 |     const auto &varidx_map = this+v2.varIdxMap;
      |                 ^~~~~~~~~~
../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh:194:38: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const avar*>(((const OT::avar*)this), v2.OT::avarV2Tail::varIdxMap)’
  194 |     const auto &varidx_map = this+v2.varIdxMap;
      |                                      ^~~~~~~~~
../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh:195:17: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  195 |     const auto &var_store = this+v2.varStore;
      |                 ^~~~~~~~~
../harfbuzz-6.0.0/src/hb-ot-var-avar-table.hh:195:37: note: the temporary was destroyed at the end of the full expression ‘OT::operator+<const avar*>(((const OT::avar*)this), v2.OT::avarV2Tail::varStore)’
  195 |     const auto &var_store = this+v2.varStore;
      |                                     ^~~~~~~~
In file included from ../harfbuzz-6.0.0/src/hb-serialize.hh:36,
                 from ../harfbuzz-6.0.0/src/hb-machinery.hh:37,
                 from ../harfbuzz-6.0.0/src/hb-shaper.hh:31,
                 from ../harfbuzz-6.0.0/src/hb-face.hh:34,
                 from ../harfbuzz-6.0.0/src/hb-font.hh:34,
                 from ../harfbuzz-6.0.0/src/hb-font.cc:31:

Reproducible: Always
Comment 1 HougeLangley 2023-02-06 15:54:01 UTC
Created attachment 850006 [details]
Full-Build-Log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-06 15:56:00 UTC
Hit this myself. Thanks for testing this out, it's a big help. Last week's GCC is fine (13.0.1_pre20230129-r1), but this week's is not (13.0.1_pre20230205). Bisecting now.

```
../harfbuzz-6.0.0/src/hb-map.hh: In instantiation of ‘uint32_t hb_hashmap_t<K, V, minus_one>::hash() const [with K = unsigned int; V = unsigned int; bool minus_one = true; uint32_t = unsigned int]’:
../harfbuzz-6.0.0/src/hb-algs.hh:237:43:   required from ‘constexpr hb_head_t<unsigned int, decltype (hb_deref(v).hash())><unnamed struct>::impl(const T&, hb_priority<1>) const [with T = hb::shared_ptr<hb_map_t>; hb_head_t<unsigned int, decltype (hb_deref(v).hash())> = unsigned int; decltype (hb_deref(v).hash()) = unsigned int]’
../harfbuzz-6.0.0/src/hb-algs.hh:245:34:   required from ‘bool hb_hashmap_t<K, V, minus_one>::has(K, VV**) const [with VV = unsigned int; K = hb::shared_ptr<hb_map_t>; V = unsigned int; bool minus_one = false]’
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:3034:34:   required from here
../harfbuzz-6.0.0/src/hb-map.hh:292:5: error: no match for ‘operator|’ (operand types are ‘hb_filter_iter_t<hb_array_t<hb_hashmap_t<unsigned int, unsigned int, true>::item_t>, bool (hb_hashmap_t<unsigned int, unsigned int, true>::item_t::*)() const, const<unnamed struct>&, 0>’ and ‘hb_reduce_t<hb_hashmap_t<unsigned int, unsigned int, true>::hash() const::<lambda(uint32_t, const hb_hashmap_t<unsigned int, unsigned int, true>::item_t&)>, unsigned int>’)
  291 |     + iter_items ()
      |     ~~~~~~~~~~~~~~~
  292 |     | hb_reduce ([] (uint32_t h, const item_t &_) { return h ^ _.total_hash (); }, (uint32_t) 0u)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../harfbuzz-6.0.0/src/hb.hh:481,
                 from ../harfbuzz-6.0.0/src/hb-font.cc:29:
../harfbuzz-6.0.0/src/hb-iter.hh:352:1: note: candidate: ‘template<class Lhs, class Rhs, typename hb_enable_if<hb_is_iterator_of<Lhs, typename Lhs::item_t>::value>::type* <anonymous> > decltype (forward<Rhs>(rhs)(forward<Lhs>(lhs))) operator|(Lhs&&, Rhs&&)’
  352 | operator | (Lhs&& lhs, Rhs&& rhs) HB_AUTO_RETURN (std::forward<Rhs> (rhs) (std::forward<Lhs> (lhs)))
      | ^~~~~~~~
../harfbuzz-6.0.0/src/hb-iter.hh:352:1: note:   template argument deduction/substitution failed:
In file included from ../harfbuzz-6.0.0/src/hb.hh:475:
../harfbuzz-6.0.0/src/hb-iter.hh: In substitution of ‘template<class Lhs, class Rhs, typename hb_enable_if<hb_is_iterator_of<Lhs, typename Lhs::item_t>::value>::type* <anonymous> > decltype (forward<Rhs>(rhs)(forward<Lhs>(lhs))) operator|(Lhs&&, Rhs&&) [with Lhs = hb_filter_iter_t<hb_array_t<hb_hashmap_t<unsigned int, unsigned int, true>::item_t>, bool (hb_hashmap_t<unsigned int, unsigned int, true>::item_t::*)() const, const<unnamed struct>&, 0>; Rhs = hb_reduce_t<hb_hashmap_t<unsigned int, unsigned int, true>::hash() const::<lambda(uint32_t, const hb_hashmap_t<unsigned int, unsigned int, true>::item_t&)>, unsigned int>; typename hb_enable_if<hb_is_iterator_of<Lhs, typename Lhs::item_t>::value>::type* <anonymous> = 0]’:
../harfbuzz-6.0.0/src/hb-map.hh:292:5:   required from ‘uint32_t hb_hashmap_t<K, V, minus_one>::hash() const [with K = unsigned int; V = unsigned int; bool minus_one = true; uint32_t = unsigned int]’
../harfbuzz-6.0.0/src/hb-algs.hh:237:43:   required from ‘constexpr hb_head_t<unsigned int, decltype (hb_deref(v).hash())><unnamed struct>::impl(const T&, hb_priority<1>) const [with T = hb::shared_ptr<hb_map_t>; hb_head_t<unsigned int, decltype (hb_deref(v).hash())> = unsigned int; decltype (hb_deref(v).hash()) = unsigned int]’
../harfbuzz-6.0.0/src/hb-algs.hh:245:34:   required from ‘bool hb_hashmap_t<K, V, minus_one>::has(K, VV**) const [with VV = unsigned int; K = hb::shared_ptr<hb_map_t>; V = unsigned int; bool minus_one = false]’
../harfbuzz-6.0.0/src/hb-ot-layout-common.hh:3034:34:   required from here
../harfbuzz-6.0.0/src/hb-iter.hh:352:75: error: no match for call to ‘(hb_reduce_t<hb_hashmap_t<unsigned int, unsigned int, true>::hash() const::<lambda(uint32_t, const hb_hashmap_t<unsigned int, unsigned int, true>::item_t&)>, unsigned int>) (hb_filter_iter_t<hb_array_t<hb_hashmap_t<unsigned int, unsigned int, true>::item_t>, bool (hb_hashmap_t<unsigned int, unsigned int, true>::item_t::*)() const, const<unnamed struct>&, 0>)’
  352 | operator | (Lhs&& lhs, Rhs&& rhs) HB_AUTO_RETURN (std::forward<Rhs> (rhs) (std::forward<Lhs> (lhs)))
../harfbuzz-6.0.0/src/hb-meta.hh:76:41: note: in definition of macro ‘HB_AUTO_RETURN’
   76 | #define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); }
      |                                         ^
../harfbuzz-6.0.0/src/hb-iter.hh:490:3: note: candidate: ‘template<class Iter, typename hb_enable_if<hb_is_iterator_of<Lhs, typename Lhs::item_t>::value>::type* <anonymous>, class AccuT> AccuT hb_reduce_t<Redu, InitT>::operator()(Iter) [with typename hb_enable_if<hb_is_iterator_of<Iter, typename Iter::item_t>::value>::type* <anonymous> = Iter; AccuT = <anonymous>; Redu = hb_hashmap_t<unsigned int, unsigned int, true>::hash() const::<lambda(uint32_t, const hb_hashmap_t<unsigned int, unsigned int, true>::item_t&)>; InitT = unsigned int]’
  490 |   operator () (Iter it)
      |   ^~~~~~~~
../harfbuzz-6.0.0/src/hb-iter.hh:490:3: note:   template argument deduction/substitution failed:
../harfbuzz-6.0.0/src/hb-meta.hh:90:38: error: no match for call to ‘(hb_bit_page_t::hash() const::<lambda(uint32_t, const hb_bit_page_t::elt_t&)>) (unsigned int, hb_hashmap_t<unsigned int, unsigned int, true>::item_t&)’
   90 | #define hb_declval(T) (hb_declval<T> ())
      |                       ~~~~~~~~~~~~~~~^~~
```
Comment 3 HougeLangley 2023-02-06 15:56:40 UTC
Created attachment 850008 [details]
emerge-info
Comment 4 HougeLangley 2023-02-06 15:58:24 UTC
It's my pleasure.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-06 16:06:42 UTC
(In reply to HougeLangley from comment #4)
> It's my pleasure.

<3

It's especially helpful that I assume like me you're doing -e after each, because it means we can catch regressions quickly. I honestly thought I was maybe wasting my time doing it, but then 2 changes popped out today.. (busybox failed for me too with FORTIFY_SOURCE, need to look at that).
Comment 6 HougeLangley 2023-02-06 16:23:51 UTC
I do think -e is very helpful and useful for all the people using opensource's operating system. 

The mere formulation of a problem is far more essential than its solution. 

——Albert Einstein

(In reply to Sam James from comment #5)
> (In reply to HougeLangley from comment #4)
> > It's my pleasure.
> 
> <3
> 
> It's especially helpful that I assume like me you're doing -e after each,
> because it means we can catch regressions quickly. I honestly thought I was
> maybe wasting my time doing it, but then 2 changes popped out today..
> (busybox failed for me too with FORTIFY_SOURCE, need to look at that).
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-06 17:05:54 UTC
Bisected to https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=59e0376f607805ef9b67fd7b0a4a3084ab3571a5:
```
From 59e0376f607805ef9b67fd7b0a4a3084ab3571a5 Mon Sep 17 00:00:00 2001
From: Patrick Palka <ppalka@redhat.com>
Date: Fri, 3 Feb 2023 09:41:10 -0500
Subject: [PATCH] c++: unexpected ADDR_EXPR after overload set pruning
 [PR107461]
```

There's a followup in https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=31924665c86d47af6b1f22a74f594f2e1dc0ed2d too.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-06 17:11:51 UTC
(In reply to Sam James from comment #7)
> Bisected to
> https://gcc.gnu.org/git/?p=gcc.git;a=patch;
> h=59e0376f607805ef9b67fd7b0a4a3084ab3571a5:
> ```
> From 59e0376f607805ef9b67fd7b0a4a3084ab3571a5 Mon Sep 17 00:00:00 2001
> From: Patrick Palka <ppalka@redhat.com>
> Date: Fri, 3 Feb 2023 09:41:10 -0500
> Subject: [PATCH] c++: unexpected ADDR_EXPR after overload set pruning
>  [PR107461]
> ```
> 
> There's a followup in
> https://gcc.gnu.org/git/?p=gcc.git;a=patch;
> h=31924665c86d47af6b1f22a74f594f2e1dc0ed2d too.

I'm testing the patches now then will backport. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107461#c6.
Comment 9 Larry the Git Cow gentoo-dev 2023-02-06 17:40:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6d368fffaa25908cf25836feb5ab660d8d0a3d58

commit 6d368fffaa25908cf25836feb5ab660d8d0a3d58
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-06 17:38:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-06 17:38:17 +0000

    12.2.0: add 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
    
    Bug: https://bugs.gentoo.org/893410
    Signed-off-by: Sam James <sam@gentoo.org>

 ...07461_cxx_equivalence_non_dependent_calls.patch | 204 +++++++++++++++++++++
 12.2.0/gentoo/README.history                       |   9 +-
 2 files changed, 210 insertions(+), 3 deletions(-)

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3f8fa89d582a0d56ab4eac414552aed99cec6751

commit 3f8fa89d582a0d56ab4eac414552aed99cec6751
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-06 17:32:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-06 17:32:01 +0000

    13.1.0: add 75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
    
    Bug: https://bugs.gentoo.org/893410
    Signed-off-by: Sam James <sam@gentoo.org>

 ...07461_cxx_equivalence_non_dependent_calls.patch | 174 +++++++++++++++++++++
 13.1.0/gentoo/README.history                       |   3 +
 2 files changed, 177 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2023-02-06 17:44:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91fabe3c33e397ef63cbb6f94d61b900dd654049

commit 91fabe3c33e397ef63cbb6f94d61b900dd654049
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-06 17:39:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-06 17:43:56 +0000

    sys-devel/gcc: backport Harfbuzz build fix
    
    Only affects last snapshots (12.2.1_p20230204, 13.0.1_pre20230205).
    
    Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107461
    Closes: https://bugs.gentoo.org/893410
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                         |  2 +
 sys-devel/gcc/gcc-12.2.1_p20230204-r1.ebuild   | 52 +++++++++++++++++++++++++
 sys-devel/gcc/gcc-13.0.1_pre20230205-r1.ebuild | 54 ++++++++++++++++++++++++++
 3 files changed, 108 insertions(+)