Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661880 - www-client/chromium-75.0.3770.100[system-icu]: third_party/blink/renderer/platform/text/character.cc:67:55: error: no matching function for call to ‘size(const UChar32 [0])’
Summary: www-client/chromium-75.0.3770.100[system-icu]: third_party/blink/renderer/pla...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
: 662824 663246 663260 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-23 13:33 UTC by Mike Lothian
Modified: 2019-06-21 13:44 UTC (History)
24 users (show)

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


Attachments
build.log xz compressed (build.log.xz,617.17 KB, application/x-xz)
2018-07-23 13:33 UTC, Mike Lothian
Details
chromium-69-system-icu.patch (chromium-69-system-icu.patch,720 bytes, patch)
2018-08-06 19:29 UTC, Jouni Kosonen
Details | Diff
chromium-71.0.3559.6-system-icu.patch (chromium-71.0.3559.6-system-icu.patch,4.76 KB, patch)
2018-10-09 08:51 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
chromium-71.0.3559.6-system-icu.patch (chromium-71.0.3559.6-system-icu.patch,7.19 KB, patch)
2018-10-10 00:37 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
chromium-system_icu_array_size_calculation_minimalistic_fix.patch (chromium-system_icu_array_size_calculation_minimalistic_fix.patch,7.23 KB, patch)
2018-10-17 00:54 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
chromium-73.0.3683.86-system_icu_array_size_calculation_minimalistic_fix.patch (chromium-73.0.3683.86-system_icu_array_size_calculation_minimalistic_fix.patch,4.68 KB, patch)
2019-04-17 01:46 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
Patch (profiles.patch,1.13 KB, patch)
2019-06-20 16:05 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2018-07-23 13:33:19 UTC
Created attachment 540582 [details]
build.log xz compressed

www-client/chromium-69.0.3493.3 isn't building for me with clang-9999 (7) I'm retying with 6 in case it is a llvm/clang bug or an increased strictness
Comment 1 Andrew Waters 2018-07-23 17:41:07 UTC
gcc 7.3.0-r2 fails in exactly the same way.
Comment 2 Andrew Waters 2018-07-23 17:44:17 UTC
Not paying enough attention, clang++ is used for building this.

I meant clang++ 6.0.1.
Comment 3 Denis Descheneaux 2018-07-28 16:15:23 UTC
It is also failing the same way when forced to build with GCC 7.3

Would be nice if i did not have to custom edit chromium's ebuild to choose to build with GCC instead of with clang as i am unable to build chromium otherwise

src_configure() {
	# Calling this here supports resumption via FEATURES=keepwork
	python_setup

	local myconf_gn=""

	# Make sure the build system will use the right tools, bug #340795.
	tc-export AR CC CXX NM

#	if ! tc-is-clang; then
#		# Force clang since gcc is pretty broken at the moment.
#		CC=${CHOST}-clang
#		CXX=${CHOST}-clang++
#		strip-unsupported-flags
#	fi
Comment 4 Mike Lothian 2018-07-30 16:28:59 UTC
I'm rebuilding now with -fpermissive in my CXXFLAGS

This also effects www-client/chromium-69.0.3497.12
Comment 5 Mike Lothian 2018-07-30 20:55:52 UTC
Nope it still fails with that too

../../third_party/blink/renderer/platform/text/character.cc:126:3: error: no matching function for call to 'ArraySizeHelper'
  RETURN_HAS_PROPERTY(character, kIsHangul);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/text/character.cc:71:18: note: expanded from macro 'RETURN_HAS_PROPERTY'
    unicodeSet = CREATE_UNICODE_SET(name);      \
                 ^~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/text/character.cc:65:33: note: expanded from macro 'CREATE_UNICODE_SET'
  createUnicodeSet(name##Array, arraysize(name##Array), name##Ranges, \
                                ^~~~~~~~~~~~~~~~~~~~~~
../../base/macros.h:57:34: note: expanded from macro 'arraysize'
#define arraysize(array) (sizeof(ArraySizeHelper(array)))
                                 ^~~~~~~~~~~~~~~
../../base/macros.h:56:40: note: candidate template ignored: substitution failure [with T = const int, N = 0]: zero-length arrays are not permitted in C++
template <typename T, size_t N> char (&ArraySizeHelper(T (&array)[N]))[N];
                                       ^                               ~
1 error generated.
Comment 6 Denis Descheneaux 2018-07-31 16:07:02 UTC
is that happening to both versions:
69.0.3493.3
69.0.3497.12
Comment 7 Mike Lothian 2018-07-31 16:10:40 UTC
Yes
Comment 8 Denis Descheneaux 2018-08-01 15:20:39 UTC
also happening with 69.0.3497.12
Comment 9 Mike Lothian 2018-08-01 15:27:22 UTC
Compiling with -system-icu allows it to compile

Recommend masking system-icu for 69+ unless a proper solution can be found
Comment 10 Mike Gilbert gentoo-dev 2018-08-01 15:43:43 UTC
Which version of ICU were you compiling against?
Comment 11 Mike Lothian 2018-08-01 15:44:58 UTC
dev-libs/icu-62.1
Comment 12 Jouni Kosonen 2018-08-05 03:26:54 UTC
I'm now getting this with 
www-client/chromium-69.0.3497.23[jumbo-build,system-icu] and
dev-libs/icu-60.2 so it's not just the masked ICU.
Comment 13 Bernd Feige 2018-08-05 10:23:27 UTC
(In reply to Jouni Kosonen from comment #12)
> I'm now getting this with 
> www-client/chromium-69.0.3497.23[jumbo-build,system-icu] and
> dev-libs/icu-60.2 so it's not just the masked ICU.

Same here. dev-libs/icu-60.2, www-client/chromium-69.0.3497.23[system-icu] as per default failing to build (without jumbo-build).
Comment 14 Jouni Kosonen 2018-08-05 12:48:49 UTC
After the commit[0] introducing Character::IsHangulSlow I don't see any way that code compiles against any version of system ICU; kIsHangulArray is defined[1] as a zero-length array.

static const UChar32 kIsHangulArray[] = {};

Moving a character or two there from kIsHangulRanges might work.

[0]https://github.com/chromium/chromium/commit/224e825bba5d74418ac2d38cf2bea004dcd698ec
[1]https://github.com/chromium/chromium/blob/e462eb8ddfb40acce967019092319694a9daa246/third_party/blink/renderer/platform/text/character_property_data_generator.h#L250
Comment 15 Mike Gilbert gentoo-dev 2018-08-05 22:23:39 UTC
*** Bug 662824 has been marked as a duplicate of this bug. ***
Comment 16 Larry the Git Cow gentoo-dev 2018-08-05 22:28:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29e5a6abeb7781371ca19d0123c0041b3ca53c58

commit 29e5a6abeb7781371ca19d0123c0041b3ca53c58
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-08-05 22:27:24 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-08-05 22:28:12 +0000

    profiles: mask >=www-client/chromium-69[system-icu]
    
    Bug: https://bugs.gentoo.org/661880

 profiles/base/package.use.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 17 Hajo 2018-08-06 12:42:33 UTC
Ok, that fixes the blocker and it gets compiled.
But after that there is no sound in

[ebuild R ~] www-client / chromium-69.0.3497.23 :: gentoo USE = "cups hangouts jumbo-build (pic) proprietary-codecs pulseaudio suid -component-build -custom-cflags -gnome-keyring -kerberos (-neon ) (-selinux) (-system-ffmpeg) -system-icu (-system-libvpx) (-tcmalloc) -widevine "
Comment 18 Daniel Harding 2018-08-06 13:12:46 UTC
I've confirmed that my system has the fix from 29e5a6abeb7781371ca19d0123c0041b3ca53c58 but the flag isn't actually being masked:

[ebuild     U  ] www-client/chromium-69.0.3497.23::gentoo [68.0.3440.75::gentoo] USE="-component-build -cups -custom-cflags -gnome-keyring -hangouts -jumbo-build -kerberos (-neon) (pic) -proprietary-codecs pulseaudio (-selinux) -suid (-system-ffmpeg) system-icu (-system-libvpx) (-tcmalloc) -widevine" L10N="-am -ar -bg -bn -ca -cs -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" 0 KiB

I think it is due to the following line in profiles/release/17.0/package.use.mask:

>=www-client/chromium-62.0.3202.9 -system-icu
Comment 19 Hajo 2018-08-06 13:47:05 UTC
(In reply to Marlo from comment #17)
> Ok, that fixes the blocker and it gets compiled.
> But after that there is no sound in
> 
> [ebuild R ~] www-client / chromium-69.0.3497.23 :: gentoo USE = "cups
> hangouts jumbo-build (pic) proprietary-codecs pulseaudio suid
> -component-build -custom-cflags -gnome-keyring -kerberos (-neon ) (-selinux)
> (-system-ffmpeg) -system-icu (-system-libvpx) (-tcmalloc) -widevine "

Solved:
The sound must be set up in pavucontroll again.
Comment 20 Mike Gilbert gentoo-dev 2018-08-06 14:56:52 UTC
(In reply to Daniel Harding from comment #18)

Good catch; I'll have to put some thought into how to unravel this.
Comment 21 Jouni Kosonen 2018-08-06 19:29:45 UTC
Created attachment 542640 [details, diff]
chromium-69-system-icu.patch

(In reply to Jouni Kosonen from comment #14)
> static const UChar32 kIsHangulArray[] = {};
> 
> Moving a character or two there from kIsHangulRanges might work.
Followup on that: it does work. Not an ideal workaround, of course.
Comment 22 Jan Psota 2018-08-07 06:19:12 UTC
.23 not .3 and I confirm: compiling with clang-6 (gcc needs too much memory to try) fails on my system with the same error.
Comment 23 Mike Gilbert gentoo-dev 2018-08-09 19:46:29 UTC
*** Bug 663246 has been marked as a duplicate of this bug. ***
Comment 24 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-10 07:10:34 UTC
Updating the summary since it still fails.
Comment 25 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-10 20:18:36 UTC
*** Bug 663260 has been marked as a duplicate of this bug. ***
Comment 26 Larry the Git Cow gentoo-dev 2018-08-12 00:12:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=884afc996ce3fe86c5c0451d61aa6c0cc9de7dd5

commit 884afc996ce3fe86c5c0451d61aa6c0cc9de7dd5
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-08-12 00:10:45 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-08-12 00:10:45 +0000

    profiles: move www-client/chromium[system-icu] mask to 17.0 profile
    
    Bug: https://bugs.gentoo.org/661880

 profiles/base/package.use.mask          | 5 -----
 profiles/releases/17.0/package.use.mask | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
Comment 27 Arfrever Frehtes Taifersar Arahesis 2018-10-09 08:51:37 UTC
Created attachment 550198 [details, diff]
chromium-71.0.3559.6-system-icu.patch

I think that the proper solution is to migrate from arrays to a container type which is easy to use and supports zero-length objects, e.g. std::vector.

This patch implements this solution.
Comment 28 Bernd Feige 2018-10-09 11:50:35 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #27)
> Created attachment 550198 [details, diff] [details, diff]
> chromium-71.0.3559.6-system-icu.patch
> 
> I think that the proper solution is to migrate from arrays to a container
> type which is easy to use and supports zero-length objects, e.g. std::vector.
> 
> This patch implements this solution.

Thanks!
I can confirm that this works. system-icu must be unmasked however as compilation fails with -system-icu and this patch.
Comment 29 Arfrever Frehtes Taifersar Arahesis 2018-10-10 00:37:55 UTC
Created attachment 550316 [details, diff]
chromium-71.0.3559.6-system-icu.patch

Corrected patch, working with both USE="-system-icu" and USE="system-icu".
Comment 30 Jouni Kosonen 2018-10-10 16:44:01 UTC
I can confirm: the patch in comment 29 also applies cleanly to chromium-70.0.3538.45 and 69.0.3497.100.
Comment 31 Mike Gilbert gentoo-dev 2018-10-10 18:23:37 UTC
This is a fairly significant patch. Could you possible submit it upstream for review?

https://www.chromium.org/developers/contributing-code
Comment 32 Arfrever Frehtes Taifersar Arahesis 2018-10-17 00:54:17 UTC
Created attachment 551632 [details, diff]
chromium-system_icu_array_size_calculation_minimalistic_fix.patch

Alternative, minimalistic fix
Comment 33 Bernd Feige 2018-12-28 15:28:45 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #32)
> Created attachment 551632 [details, diff] [details, diff]
> chromium-system_icu_array_size_calculation_minimalistic_fix.patch
> 
> Alternative, minimalistic fix

Thanks, that fix also is needed to compile current chromium-72.0.3626.28-r1 with +system-icu, applies with offset and works!
Comment 34 Arfrever Frehtes Taifersar Arahesis 2019-04-17 01:46:21 UTC
Created attachment 573138 [details, diff]
chromium-73.0.3683.86-system_icu_array_size_calculation_minimalistic_fix.patch

Patch (minimalistic version) updated for www-client/chromium-73.0.3683.86
Comment 35 Jouni Kosonen 2019-06-16 20:45:06 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #34)
> Patch (minimalistic version) updated for www-client/chromium-73.0.3683.86

Also works for chromium-75.0.3770 – any chance of getting this upstream?
Comment 36 Arfrever Frehtes Taifersar Arahesis 2019-06-20 16:03:57 UTC
Patch fails to apply and is no longer needed in =www-client/chromium-76* since this refactoring:
https://chromium.googlesource.com/chromium/src/+/edf1c0e698954cd57525458c8289ab8281866fb0
https://chromium.googlesource.com/chromium/src/+/edf1c0e698954cd57525458c8289ab8281866fb0%5E%21/
Comment 37 Arfrever Frehtes Taifersar Arahesis 2019-06-20 16:05:09 UTC
Created attachment 580230 [details, diff]
Patch

This patch unmasks "system-icu" USE flag for >=www-client/chromium-76.
Comment 38 Larry the Git Cow gentoo-dev 2019-06-20 16:23:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a318f6b00d3806201dbcfa65092b6a4559b9a7

commit 64a318f6b00d3806201dbcfa65092b6a4559b9a7
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2019-06-20 16:01:21 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-06-20 16:22:47 +0000

    profiles: Restrict www-client/chromium[system-icu] mask to <76 versions.
    
    Fixes: https://bugs.gentoo.org/661880
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 profiles/releases/17.0/package.use.mask | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 39 Alexander Tsoy 2019-06-21 00:45:18 UTC
These two entries in profiles/releases/17.0/package.use.mask conflicts with each other:

>=www-client/chromium-62.0.3202.9 -system-icu
<www-client/chromium-76 system-icu

As a result system-icu USE-flag got unmasked for stable chromium:

$ emerge -qpv www-client/chromium                                                                                                                                                                                            
[ebuild   R   ] www-client/chromium-75.0.3770.90  USE="closure-compile cups gnome-keyring hangouts (pic) proprietary-codecs pulseaudio suid system-icu* tcmalloc -component-build -custom-cflags -jumbo-build -kerberos (-neon) (-selinux) (-system-ffmpeg) (-system-libvpx) -widevine" L10N="ru -am -ar -bg -bn -ca -cs -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW"
Comment 40 Larry the Git Cow gentoo-dev 2019-06-21 13:44:49 UTC
The bug has been referenced in the following commit(s):

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

commit b95c6a7c9ef650d846841fbbce68f2677f4366d2
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-06-21 13:41:24 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-06-21 13:44:19 +0000

    profiles: simplify www-client/chromium[system-icu] mask
    
    Bug: https://bugs.gentoo.org/661880
    Closes: https://bugs.gentoo.org/688424
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 profiles/base/package.use.mask          | 7 +++++--
 profiles/releases/17.0/package.use.mask | 6 ------
 2 files changed, 5 insertions(+), 8 deletions(-)