Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 640628

Summary: dev-qt/qtwebengine-5.9.3 with media-video/ffmpeg-3.5 - ffmpeg_audio_decoder.cc:56:35: error: ‘CODEC_CAP_DR1’ was not declared in this scope
Product: Gentoo Linux Reporter: iGentoo <AlphatPC>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: qtwebengine-5.9.3-build.log.xz
patch to fix ffmpeg macros

Description iGentoo 2017-12-10 20:53:58 UTC
Created attachment 509294 [details]
qtwebengine-5.9.3-build.log.xz

FAILED: obj/media/media/ffmpeg_audio_decoder.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/media/ffmpeg_audio_decoder.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DMEDIA_IMPLEMENTATION -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DUSE_SYSTEM_FFMPEG=1 -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -I../../3rdparty/chromium/media -Igen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/libwebm/source -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Igen -Igen -I../../3rdparty/chromium/third_party/khronos -I../../3rdparty/chromium/gpu -Igen -Igen -Igen -Igen -Igen -Igen -Igen -Igen -Igen -I/usr/include/opus -I../../3rdparty/chromium/third_party/ced/src -I../../3rdparty/chromium/third_party/boringssl/src/include -I/usr/include/nss -I/usr/include/nspr -I../../3rdparty/chromium/skia/config -I../../3rdparty/chromium/skia/ext -I../../3rdparty/chromium/third_party/skia/include/c -I../../3rdparty/chromium/third_party/skia/include/config -I../../3rdparty/chromium/third_party/skia/include/core -I../../3rdparty/chromium/third_party/skia/include/effects -I../../3rdparty/chromium/third_party/skia/include/images -I../../3rdparty/chromium/third_party/skia/include/lazy -I../../3rdparty/chromium/third_party/skia/include/pathops -I../../3rdparty/chromium/third_party/skia/include/pdf -I../../3rdparty/chromium/third_party/skia/include/pipe -I../../3rdparty/chromium/third_party/skia/include/ports -I../../3rdparty/chromium/third_party/skia/include/utils -I../../3rdparty/chromium/third_party/skia/include/gpu -I../../3rdparty/chromium/third_party/skia/src/gpu -I../../3rdparty/chromium/third_party/skia/src/sksl -I../../3rdparty/chromium/third_party/libyuv/include -I../../3rdparty/chromium/third_party/mesa/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-delete-null-pointer-checks -Wno-narrowing -fno-rtti -fno-exceptions -c ../../3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -o obj/media/media/ffmpeg_audio_decoder.o
In file included from ../../3rdparty/chromium/base/memory/ref_counted.h:17:0,
                 from ../../3rdparty/chromium/base/callback_internal.h:15,
                 from ../../3rdparty/chromium/base/callback.h:9,
                 from ../../3rdparty/chromium/media/filters/ffmpeg_audio_decoder.h:11,
                 from ../../3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc:5:
../../3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc: In function ‘int media::GetAudioBuffer(AVCodecContext*, AVFrame*, int)’:
../../3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc:56:35: error: ‘CODEC_CAP_DR1’ was not declared in this scope
   DCHECK(s->codec->capabilities & CODEC_CAP_DR1);
                                   ^




Portage 2.3.17 (python 3.6.3-final-0, default/linux/amd64/17.0, gcc-7.2.0, glibc-2.26-r3, 4.14.4-gentoo.x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.14.4-gentoo.x86_64-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.4.1
KiB Mem:     6117556 total,    597556 free
KiB Swap:    6291452 total,   6280880 free
Head commit of repository gentoo: c1dd842d0104a10bfe6778597676aaa139f8d360

sh dash 0.5.9.1-r3
ld GNU gold (Gentoo 2.29.1 p3 2.29.1) 1.14
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.6.3-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.10.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            7.2.0::gentoo
sys-devel/gcc-config:     1.9.0-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.14::local-repo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/gentoo.git
    sync-user: portage
    priority: -1000
    eclass-overrides: local-repo

local-repo
    location: /usr/local/portage
    masters: gentoo

Installed sets: @local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Wall -march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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="-Wall -march=native -O2 -pipe -frecord-gcc-switches"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--color=n --keep-going --oneshot"
FCFLAGS="-Wall -march=native -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-Wall -march=native -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
MAKEOPTS="V=1 -j5"
PKGDIR="/var/portage/packages"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9T0"
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 amd64 audit berkdb bzip2 cli cracklib crypt cxx dbus dri egl fortran gdbm gles2 iconv icu ipv6 jpeg modules multilib ncurses nls nptl opengl openmp pam pax_kernel pcre pic png policykit pulseaudio readline seccomp session ssl systemd tcpd unicode vdpau vim-syntax wayland xattr zlib" ABI_X86="64 32 x32" ALSA_CARDS="hda-intel" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="zh_CN" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-qt/qtwebengine-5.9.3::gentoo was built with the following:
USE="pax_kernel pulseaudio system-ffmpeg system-icu widgets -alsa -bindist -debug -geolocation -test" ABI_X86="64"


media-video/ffmpeg-9999::local-repo was built with the following:
USE="X bzip2 encode gpl hardcoded-tables iconv mp3 network opengl opus pic postproc pulseaudio threads truetype vdpau vorbis vpx x264 x265 xvid zlib -alsa (-altivec) -amr -amrenc -bluray -bs2b -cdio -celt -chromaprint -chromium -cpudetection -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libass -libcaca -libilbc -librtmp -libsoxr -libv4l -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openal -openh264 -openssl -oss -rubberband -samba -sdl -snappy -speex -ssh -static-libs -svg -test -theora -twolame -v4l -vaapi -wavpack -webp -xcb -zeromq -zimg -zvbi" ABI_X86="32 64 x32" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -sse4_2 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"
Comment 2 Martin DiViaio 2018-02-10 11:58:34 UTC
See https://bugreports.qt.io/browse/QTBUG-65086

qtwebengine is using deprecated macros that are removed in the latest ffmpeg.

I have a patch that fixes this in qtwebengine-5.9.3 and may work for qtwebengine-5.9.4 (the patch applies to 5.9.4, not sure if it compiles, yet.)

Right now I have a custom ebuild that applies the patch but isn't this something that should get fixed upstream?

Thanks.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2018-02-10 12:43:21 UTC
Yep, this should definitely be fixed upstream (which in this case looks like chromium).

Do you mind to attach your local patch here?
Comment 4 Martin DiViaio 2018-02-10 13:58:49 UTC
Created attachment 518946 [details, diff]
patch to fix ffmpeg macros

This fixes the deprecated ffmpeg macros for qtwebengine-5.9.3 and maybe 5.9.4.

The deprecation notice for CODEC_FLAG_EMU_EDGE says to not set this from code so I just comment out the line that uses it.

Other than that this is just a bunch of renames.

Thanks.
Comment 5 Martin DiViaio 2018-02-10 14:08:51 UTC
(In reply to Michael Palimaka (kensington) from comment #3)
> Yep, this should definitely be fixed upstream (which in this case looks like
> chromium).
> 
> Do you mind to attach your local patch here?

I've attached the patch. Do I have to point out that this is "use at your own risk?" I'm not a dev for either ffmpeg or qt.

Thanks.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2018-02-11 00:37:34 UTC
This is fixed in qtwebengine-chromium 65-based, which will likely be released in 5.11
Comment 7 Michael Palimaka (kensington) gentoo-dev 2019-04-18 09:59:26 UTC
(In reply to Michael Palimaka (kensington) from comment #6)
> This is fixed in qtwebengine-chromium 65-based, which will likely be
> released in 5.11

This turned out to be true, so this is has been fixed in gentoo.git for some time.