Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 681870 - www-client/chromium - ld: obj/third_party/angle/libANGLE/validationES3.o: in function `gl::ValidateSamplerParameterfv(gl::Context*, unsigned int, unsigned int, float const*)': validationES3.cpp:(.text+0x878f): undefined reference to `bool gl:
Summary: www-client/chromium - ld: obj/third_party/angle/libANGLE/validationES3.o: in ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-03-27 17:40 UTC by Aliaksei Urbanski
Modified: 2019-06-25 14:58 UTC (History)
1 user (show)

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


Attachments
Build log [73.0.3683.86] (build [73.0.3683.86].log.xz,88.15 KB, application/x-xz)
2019-03-27 17:40 UTC, Aliaksei Urbanski
Details
Build log [74.0.3729.169] (build [74.0.3729.169].log.xz,116.88 KB, application/x-xz)
2019-06-09 21:53 UTC, Aliaksei Urbanski
Details
Build log [75.0.3770.80] (build [75.0.3770.80].log.xz,119.45 KB, application/x-xz)
2019-06-15 21:54 UTC, Aliaksei Urbanski
Details
Build log [76.0.3809.36] (build [76.0.3809.36].log.xz,129.46 KB, application/x-xz)
2019-06-21 08:34 UTC, Aliaksei Urbanski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aliaksei Urbanski 2019-03-27 17:40:55 UTC
Created attachment 570936 [details]
Build log [73.0.3683.86]

Hello everyone,


I can not build chromium.

Here is the error:

[3021/18155] python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="x86_64-pc-linux-gnu-nm" --sofile="./libGLESv2.so" --tocfile="./libGLESv2.so.TOC" --output="./libGLESv2.so" -- x86_64-pc-linux-gnu-g++ -shared -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -rdynamic -Wl,-O1 -Wl,--as-needed -o "./libGLESv2.so" -Wl,-soname="libGLESv2.so" @"./libGLESv2.so.rsp"
FAILED: libGLESv2.so libGLESv2.so.TOC 
python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="readelf" --nm="x86_64-pc-linux-gnu-nm" --sofile="./libGLESv2.so" --tocfile="./libGLESv2.so.TOC" --output="./libGLESv2.so" -- x86_64-pc-linux-gnu-g++ -shared -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -rdynamic -Wl,-O1 -Wl,--as-needed -o "./libGLESv2.so" -Wl,-soname="libGLESv2.so" @"./libGLESv2.so.rsp"
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/third_party/angle/libANGLE/validationES3.o: in function `gl::ValidateSamplerParameterfv(gl::Context*, unsigned int, unsigned int, float const*)':
validationES3.cpp:(.text+0x878f): undefined reference to `bool gl::ValidateSamplerParameterBase<float const>(gl::Context*, unsigned int, unsigned int, int, bool, float const*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/third_party/angle/libANGLE/validationES3.o: in function `gl::ValidateSamplerParameteriv(gl::Context*, unsigned int, unsigned int, int const*)':
validationES3.cpp:(.text+0x87cf): undefined reference to `bool gl::ValidateSamplerParameterBase<int const>(gl::Context*, unsigned int, unsigned int, int, bool, int const*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: obj/third_party/angle/libANGLE/validationES3.o: in function `gl::ValidateSamplerParameterIivOES(gl::Context*, unsigned int, unsigned int, int const*)':
validationES3.cpp:(.text+0x87f5): undefined reference to `bool gl::ValidateSamplerParameterBase<int const>(gl::Context*, unsigned int, unsigned int, int, bool, int const*)'
collect2: error: ld returned 1 exit status


emerge --info:

Portage 2.3.62 (python 3.7.2-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.28-r5, 5.0.4-gentoo x86_64)
=================================================================
System uname: Linux-5.0.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    32855828 total,  14254004 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 27 Mar 2019 14:00:01 +0000
Head commit of repository gentoo: e0981fa7fa69ca8b0fadb580df0b1a2f034ff239
sh bash 5.0_p3-r1
ld GNU ld (Gentoo 2.32 p1) 2.32.0
ccache version 3.6 [disabled]
app-shells/bash:          5.0_p3-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.5.7::gentoo, 3.6.8::gentoo, 3.7.2::gentoo
dev-util/ccache:          3.6::gentoo
dev-util/cmake:           3.14.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32::gentoo
sys-devel/gcc:            8.3.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

mim_overlay
    location: /usr/overlay
    masters: gentoo
    priority: 0

mva
    location: /var/lib/layman/mva
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.utf8"
LC_ALL="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru ru_RU"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb bzip2 cli crypt cxx dhcp directfb dri dri3 exif gdbm iconv icu javafx libtirpc multilib ncurses nls nptl nptlonly opengl openmp pam pcre ppp python readline seccomp shm sna ssl tcpd threads udev unicode uxa vaapi xattr xvmc zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext aes mabm mcx16 mlzcnt msahf popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 avx avx2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NGINX_MODULES_HTTP="v2 ssl uwsgi gzip proxy" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Is there any workaround?
Thanks!
Comment 1 Aliaksei Urbanski 2019-06-09 21:48:26 UTC
The issue is still there with www-client/chromium-74.0.3729.169
Comment 2 Aliaksei Urbanski 2019-06-09 21:53:37 UTC
Created attachment 579338 [details]
Build log [74.0.3729.169]
Comment 3 Aliaksei Urbanski 2019-06-15 21:47:29 UTC
www-client/chromium-75.0.3770.80 fails as well.
Comment 4 Aliaksei Urbanski 2019-06-15 21:54:58 UTC
Created attachment 579884 [details]
Build log [75.0.3770.80]
Comment 5 Mike Gilbert gentoo-dev 2019-06-16 01:02:14 UTC
I'm not able to reproduce this. There is likely something unique about your system or config that is causing it.
Comment 6 Aliaksei Urbanski 2019-06-21 08:34:07 UTC
Created attachment 580278 [details]
Build log [76.0.3809.36]
Comment 7 Stephan Hartmann (RETIRED) gentoo-dev 2019-06-21 10:52:54 UTC
(In reply to Aliaksei Urbanski from comment #6)
> Created attachment 580278 [details]
> Build log [76.0.3809.36]

I can reproduce this with USE=custom-cflags and -O3 in C{XX}FLAGS, however for me it fails at a different location (final link of mksnapshot). Can you try adding -fno-ipa-cp-clone to your CFLAGS/CXXFLAGS after -O3 and see if it fixes the build?
Comment 8 Aliaksei Urbanski 2019-06-21 18:36:05 UTC
Hello Stephan,

I've tried to add -fno-ipa-cp-clone to my CFLAGS/CXXFLAGS.
Unfortunately, it wasn't enough to avoid the issue.
The good new is, I've compiled Chromium with -O2 successfully.

Thank you!
Comment 9 Stephan Hartmann (RETIRED) gentoo-dev 2019-06-21 19:32:52 UTC
(In reply to Aliaksei Urbanski from comment #8)
> Hello Stephan,
> 
> I've tried to add -fno-ipa-cp-clone to my CFLAGS/CXXFLAGS.
> Unfortunately, it wasn't enough to avoid the issue.
> The good new is, I've compiled Chromium with -O2 successfully.
> 
> Thank you!

Thank you for testing, I was able to reproduce this now. I try to come up with a solution within next days.
Comment 10 Stephan Hartmann (RETIRED) gentoo-dev 2019-06-22 08:46:07 UTC
(In reply to Stephan Hartmann from comment #9)
> (In reply to Aliaksei Urbanski from comment #8)
> > Hello Stephan,
> > 
> > I've tried to add -fno-ipa-cp-clone to my CFLAGS/CXXFLAGS.
> > Unfortunately, it wasn't enough to avoid the issue.
> > The good new is, I've compiled Chromium with -O2 successfully.
> > 
> > Thank you!
> 
> Thank you for testing, I was able to reproduce this now. I try to come up
> with a solution within next days.

So ipa-cp-clone problem got fixed in gcc-9. The issue in this bug is caused by inlining functions. Adding -fno-inline-functions makes the problem go away for me. We could patch this by marking the functions noinline for gcc builds.
Comment 11 Larry the Git Cow gentoo-dev 2019-06-25 14:58:13 UTC
The bug has been closed via the following commit(s):

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

commit 327a53f1e9de14fe01ebc94b96f5fa6178dc3fbd
Author:     Stephan Hartmann <stha09@googlemail.com>
AuthorDate: 2019-06-23 16:07:39 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-06-25 14:57:18 +0000

    www-client/chromium: fix build with -O3
    
    In third_party/angle/src/libANGLE/validationES.cpp three specializations
    are declared for ValidateSamplerParameterBase(). Two implicit
    specializations are created in ValidateSamplerParameterfvRobustANGLE()
    and ValidateSamplerParameterIivRobustANGLE(). However, with
    -finline-functions (default enabled with -O3) those two implicit
    symbols are optimized out. In the end linking fails with
    unresolved references, because functions in
    third_party/angle/src/libANGLE/validationES3.cpp use both
    specializations.
    
    Closes: https://bugs.gentoo.org/681870
    Closes: https://github.com/gentoo/gentoo/pull/12312
    Package-Manager: Portage-2.3.66, Repoman-2.3.11
    Signed-off-by: Stephan Hartmann <stha09@googlemail.com>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 www-client/chromium/chromium-75.0.3770.100.ebuild  |  1 +
 www-client/chromium/chromium-76.0.3809.36.ebuild   |  1 +
 .../chromium/files/chromium-angle-inline.patch     | 26 ++++++++++++++++++++++
 3 files changed, 28 insertions(+)