Bug 270827 - devel/electron22: build fails with icu 73.1
Summary: devel/electron22: build fails with icu 73.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks: 270422
  Show dependency treegraph
 
Reported: 2023-04-14 00:13 UTC by Stefan Ehmann
Modified: 2023-04-15 20:53 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (tagattie)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Ehmann 2023-04-14 00:13:43 UTC
After icu update in bug #270422 build fails in 13.1/amd64 poudriere with:

c++ -MMD -MF obj/base/base/time_exploded_icu.o.d -DBASE_IMPLEMENTATION -DSYSTEM_NATIVE_UTF8 -DUSE_SYMBOLIZE -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DUSE_SYSTEM_LIBEVENT=1 -DGLOG_EXPORT= -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -Wall -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -m64 -msse3 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare -Wexit-time-destructors -Wglobal-constructors -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -DPROTOBUF_ALLOW_DEPRECATED=1 -I/usr/local/include -I/usr/local/include -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -march=znver2 -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include  -c ../../base/time/time_exploded_icu.cc -o obj/base/base/time_exploded_icu.o
In file included from ../../base/time/time_exploded_icu.cc:14:
../../third_party/icu/source/common/unicode/locid.h:297:27: error: expected ';' at end of declaration list
    Locale(Locale&& other) U_NOEXCEPT;
                          ^
                          ;
../../third_party/icu/source/common/unicode/locid.h:323:38: error: expected ';' at end of declaration list
    Locale& operator=(Locale&& other) U_NOEXCEPT;
                                     ^
                                     ;
2 errors generated.
Comment 1 fgorter 2023-04-14 04:03:35 UTC
Having the same issues here:

In file included from ../../base/i18n/timezone.cc:10:
../../third_party/icu/source/common/unicode/unistr.h:1909:48: error: expected ';' at end of declaration list
  UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT;
                                               ^
                                               ;
../../third_party/icu/source/common/unicode/unistr.h:1916:34: error: expected ';' at end of declaration list
  void swap(UnicodeString &other) U_NOEXCEPT;
                                 ^
                                 ;
../../third_party/icu/source/common/unicode/unistr.h:1925:45: error: expected ';' at end of declaration list
  swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT {

<< **snip** >>
                                                    ;
../../third_party/icu/source/i18n/unicode/dtitvfmt.h:95:57: error: expected ';' at end of declaration list
    UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
                                                        ^
                                                        ;
../../third_party/icu/source/i18n/unicode/dtitvfmt.h:98:75: error: expected ';' at end of declaration list
    Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
                                                                          ^
                                                                          ;
../../third_party/icu/source/i18n/unicode/dtitvfmt.h:101:82: error: expected ';' at end of declaration list
    UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;





Seems to be identical issue with ICU not playing nice with the build environment.
There is an ICU fix already for Chromium / Iridium / Ungoogled-Chromium builds that suffered build failures due to pretty much the exact same reason.
THAT fix can be found here & I can confirm it works for the browsers:
https://reviews.freebsd.org/D39564

We need a similar patch that "translates" "U_FINAL=final" / "U_NOEXCEPT=noexcept" / "U_OVERRIDE=override"  etc and whatever else ICU fettles with.
Comment 2 Hiroki Tagato freebsd_committer freebsd_triage 2023-04-15 10:48:18 UTC
(In reply to fgorter from comment #1)

The patch at the URL is indeed applicable to devel/electron ports and fixes the build errors. I will update the ports accordingly.

Thanks for the information.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-15 14:22:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=db5bfb69f45bcea3c912553657cd5c72ac984254

commit db5bfb69f45bcea3c912553657cd5c72ac984254
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2023-04-15 14:18:26 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2023-04-15 14:22:21 +0000

    devel/electron{21,22}: fix build with icu 73

    PR:             270827
    Reported by:    shoesoft@gmx.net,
                    fgorter@gmail.com,
                    jonc@chen.org.nz (via ports),
                    jbeich (via ports),
                    david@catwhisker.org (via ports)
    Obtained from:  https://reviews.freebsd.org/D39564

 .../files/patch-build_linux_unbundle_icu.gn (new)      | 18 ++++++++++++++++++
 .../files/patch-build_linux_unbundle_icu.gn (new)      | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)
Comment 4 Hiroki Tagato freebsd_committer freebsd_triage 2023-04-15 14:26:00 UTC
Patch committed. Thanks for reporting!
Comment 5 fgorter 2023-04-15 20:53:21 UTC
(In reply to Hiroki Tagato from comment #2)

You're welcome!

(I had intended to sit down & figure it out myself... you've saved me from a headache!)