Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782991 - www-client/chromium-89.0.4389.128: multiple definition of 'enum _VA_TEE_EXEC_FUNCTION_ID'
Summary: www-client/chromium-89.0.4389.128: multiple definition of 'enum _VA_TEE_EXEC_...
Status: RESOLVED OBSOLETE
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:
Depends on:
Blocks:
 
Reported: 2021-04-15 08:46 UTC by Alexander Sergeyev
Modified: 2021-04-19 13:07 UTC (History)
1 user (show)

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


Attachments
build.log (build.log.bzip2,354.52 KB, application/x-bzip)
2021-04-15 08:49 UTC, Alexander Sergeyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sergeyev 2021-04-15 08:46:43 UTC
Chromium has failed to compile with errors citing libva headers. The installed version of libva is 2.11.0. Filing this bug against chromium since its build is failing.

Reproducible: Always

Steps to Reproduce:
1. Install x11-libs/libva-2.11.0.
2. Try to build www-client/chromium-89.0.4389.128.
Actual Results:  
The build is failing.

Expected Results:  
The build is succeeding.

$ env FMT="<category>/<name>-<version> <use*>\n" eix -* --format '<installedversions:FMT>' -I libva
media-video/libva-utils-2.11.1 X drm vainfo -examples -putsurface -test -test-va-api -wayland
x11-libs/libva-2.11.0 X drm opengl utils vdpau -wayland ABI_MIPS="-n32 -n64 -o32"
x11-libs/libva-intel-driver-2.4.1 X -abi_riscv_lp64 -abi_riscv_lp64d -wayland
x11-libs/libva-vdpau-driver-0.7.4-r5 opengl -abi_riscv_lp64 -abi_riscv_lp64d -debug

Chromium use flags:
cups custom-cflags pic proprietary-codecs tcmalloc vaapi -component-build -hangouts -headless -js-type-check -kerberos -official -pulseaudio -screencast -selinux -suid -system-ffmpeg -system-icu -wayland -widevine


Emerge --info:

Portage 3.0.18 (python 3.8.9-final-0, default/linux/amd64/17.1/no-multilib, gcc-10.3.0, glibc-2.32-r7, 5.11.13-gentoo x86_64)
=================================================================
System uname: Linux-5.11.13-gentoo-x86_64-Intel-R-_Core-TM-_i5-6300HQ_CPU_@_2.30GHz-with-glibc2.2.5
KiB Mem:    32753064 total,  13226764 free
KiB Swap:          0 total,         0 free
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p8::gentoo, 3.8.9::gentoo
dev-lang/rust:            1.51.0::gentoo
dev-util/cmake:           3.20.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.3.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -m64 -ggdb2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -m64 -ggdb2"
EMERGE_DEFAULT_OPTS="--nospinner --backtrack=4000 --verbose-conflicts --tree --unordered-display --changed-deps-report --with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 binpkg-multi-instance cgroup collision-protect 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 qa-unresolved-soname-deps sandbox sfperms splitdebug strict suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
INSTALL_MASK="/usr/lib64/firefox/gmp-clearkey /etc/systemd /usr/lib/systemd /usr/share/man/!(man*) /etc/cups"
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=""
MAKEOPTS="-j5"
PORTAGE_CONFIGROOT="/"
RUSTFLAGS="-C target-cpu=native -C debuginfo=1"
USE="amd64 libglvnd split-usr" ABI_X86="64" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="luajit" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CC, CPPFLAGS, CTARGET, CXX, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alexander Sergeyev 2021-04-15 08:49:11 UTC
Created attachment 699993 [details]
build.log
Comment 2 Alexander Sergeyev 2021-04-15 08:56:54 UTC
Excerpt from build log for one of errors:

In file included from ../../media/gpu/vaapi/vaapi_video_decoder_delegate.h:23,
                 from ../../media/gpu/vaapi/h264_vaapi_video_decoder_delegate.h:12,
                 from ../../media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc:5:
../../third_party/libva_protected_content/va_protected_content.h:136:14: error: multiple definition of 'enum _VA_TEE_EXEC_FUNCTION_ID'
  136 | typedef enum _VA_TEE_EXEC_FUNCTION_ID {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/va/va.h:5139,
                 from ../../third_party/libva_protected_content/va_protected_content.h:37,
                 from ../../media/gpu/vaapi/vaapi_video_decoder_delegate.h:23,
                 from ../../media/gpu/vaapi/h264_vaapi_video_decoder_delegate.h:12,
                 from ../../media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc:5:
/usr/include/va/va_prot.h:405:14: note: previous definition here
  405 | typedef enum _VA_TEE_EXEC_FUNCTION_ID {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~

Seemingly the problem is not from a new libva version, but likely a collision between system libva and chromium-vendored libva.
Comment 3 Stephan Hartmann (RETIRED) gentoo-dev 2021-04-15 09:34:07 UTC
Can you try with chromium-90? We won't stabilize chromium-89.0.4389.128, but go directly for chromium-90.
Comment 4 Alexander Sergeyev 2021-04-15 10:53:28 UTC
(In reply to Stephan Hartmann from comment #3)
> Can you try with chromium-90? We won't stabilize chromium-89.0.4389.128, but
> go directly for chromium-90.

Yes, no problem. I'll go for 90.0.4430.70, but chromium tends to take time to build.

As a side note -- after downgrading to x11-libs/libva-2.10.0, the source file which caused problem before was successfully compiled (chromium-89.0.4389.128).
Comment 5 Alexander Sergeyev 2021-04-15 12:04:01 UTC
While the build is going, I've briefly looked into the source code and my understanding is:
1) chromium does not vendor libva itself;
2) chromium adds a particular functionality to be used with libva (that is, protected content/drm);
3) this functionality was moved from chromium code base into libva (libva-2.11.0).

So, looks like <www-client/chromium-90 should depend on <x11-libs/libva-2.11.0.

References:
https://github.com/intel/libva/commit/0dd8d8af3980c0958b64cbad2ac1b2874f69f60e
https://github.com/chromium/chromium/commit/e0b362edd9b49143b89fc76c4a31dd5603b6fbd0
Comment 6 Alexander Sergeyev 2021-04-15 12:07:00 UTC
> So, looks like <www-client/chromium-90 should depend on <x11-libs/libva-2.11.0.

And (if the understanding is correct) in other direction as well: >=www-client/chromium-90 should depend on >=x11-libs/libva-2.11.0
Comment 7 Stephan Hartmann (RETIRED) gentoo-dev 2021-04-15 13:03:04 UTC
(In reply to Alexander Sergeyev from comment #6)
> > So, looks like <www-client/chromium-90 should depend on <x11-libs/libva-2.11.0.
> 
> And (if the understanding is correct) in other direction as well:
> >=www-client/chromium-90 should depend on >=x11-libs/libva-2.11.0

The encrypted VA-API stuff is only used in ChromeOS.
Comment 8 Alexander Sergeyev 2021-04-15 13:12:31 UTC
(In reply to Stephan Hartmann from comment #7)
> The encrypted VA-API stuff is only used in ChromeOS.

Does it make sense to drop "third_party/libva_protected_content" from keeplibs in the ebuild? One of the structs defined there is used only under IS_CHROMEOS_ASH build flag. By no means not a thorough check.

https://github.com/chromium/chromium/search?q=VACencSliceParameterBufferH264
https://github.com/chromium/chromium/blob/d7da0240cae77824d1eda25745c4022757499131/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc#L273
Comment 9 Alexander Sergeyev 2021-04-15 13:14:27 UTC
(In reply to Alexander Sergeyev from comment #8)
> By no means not a thorough check.

(I meant only a partial check there)
Comment 10 Stephan Hartmann (RETIRED) gentoo-dev 2021-04-15 20:31:58 UTC
(In reply to Alexander Sergeyev from comment #8)
> (In reply to Stephan Hartmann from comment #7)
> > The encrypted VA-API stuff is only used in ChromeOS.
> 
> Does it make sense to drop "third_party/libva_protected_content" from
> keeplibs in the ebuild? One of the structs defined there is used only under
> IS_CHROMEOS_ASH build flag. By no means not a thorough check.
> 
> https://github.com/chromium/chromium/search?q=VACencSliceParameterBufferH264
> https://github.com/chromium/chromium/blob/
> d7da0240cae77824d1eda25745c4022757499131/media/gpu/vaapi/
> h264_vaapi_video_decoder_delegate.cc#L273

There are dependencies in the build system on "third_party/libva_protected_content" that we would need to patch out. Anyways, chromium-90 compiles with libva-2.10 and libva-2.11.
Comment 11 Alexander Sergeyev 2021-04-16 06:34:52 UTC
(In reply to Stephan Hartmann from comment #10)
> Anyways, chromium-90 compiles with libva-2.10 and libva-2.11.

The build has completed overnight, no problems with the browser so far.