Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833821 - media-video/ffmpeg-4.4.1-r2: fails to compile (ERROR: chromaprint not found)
Summary: media-video/ffmpeg-4.4.1-r2: fails to compile (ERROR: chromaprint not found)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 08:01 UTC by ta2002
Modified: 2022-08-03 05:43 UTC (History)
3 users (show)

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


Attachments
work/ffmpeg-4.4.1-abi_x86_64.amd64/ffbuild/config.log (config.log,521.94 KB, text/plain)
2022-02-21 08:01 UTC, ta2002
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ta2002 2022-02-21 08:01:39 UTC
Created attachment 765538 [details]
work/ffmpeg-4.4.1-abi_x86_64.amd64/ffbuild/config.log

Yes, I saw 833775 (and no, ffmpeg still does not compile after the fix in that bug). This compiled absolutely fine the day before (upgrade from 4.4.1-r1 to 4.4.1-r2).

 * ffmpeg-4.4.1.tar.bz2 BLAKE2B SHA512 size ;-) ...                                                                          [ ok ]
>>> Unpacking source...
>>> Unpacking ffmpeg-4.4.1.tar.bz2 to /var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work
>>> Source unpacked in /var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work
>>> Preparing source in /var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work/ffmpeg-4.4.1 ...
 * Applying chromium-r1.patch ...                                                                                            [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work/ffmpeg-4.4.1 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_configure
/var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work/ffmpeg-4.4.1/configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-4.4.1-r2/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip --ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags=-O2 -pipe -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse --extra-libs= --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-optimizations --disable-libcelt --enable-nonfree --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt --disable-gnutls --enable-gmp --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-libxml2 --enable-lzma --enable-network --disable-opencl --enable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --enable-vaapi --disable-vdpau --enable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libgme --enable-libgsm --disable-libaribb24 --disable-mmal --disable-libmodplug --enable-libopus --disable-libilbc --disable-librtmp --disable-libssh --enable-libspeex --disable-libsrt --disable-librsvg --disable-ffnvcodec --enable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --enable-chromaprint --disable-cuda-llvm --disable-libflite --disable-frei0r --disable-libfribidi --enable-fontconfig --disable-ladspa --enable-libass --disable-libtesseract --disable-lv2 --enable-libfreetype --disable-libvidstab --disable-librubberband --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar --disable-libaom --disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 --enable-libtheora --disable-libtwolame --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-amf --disable-gnutls --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-avx2 --disable-fma3 --disable-fma4 --disable-xop --cpu=ivybridge --disable-doc --disable-htmlpages --enable-manpages
ERROR: chromaprint not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
 * ERROR: media-video/ffmpeg-4.4.1-r2::gentoo failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_configure
 *   environment, line 2543:  Called multilib-minimal_src_configure
 *   environment, line 1769:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *   environment, line 2019:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 1724:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 1722:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *   environment, line  795:  Called multilib-minimal_abi_src_configure
 *   environment, line 1763:  Called multilib_src_configure
 *   environment, line 2330:  Called die
 * The specific snippet of code:
 *       "${@}" || die;
 * 
 * If you need support, post the output of `emerge --info '=media-video/ffmpeg-4.4.1-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/ffmpeg-4.4.1-r2::gentoo'`.
 * The complete build log is located at '/var/log/portage/media-video:ffmpeg-4.4.1-r2:20220220-091917.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-video/ffmpeg-4.4.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/ffmpeg-4.4.1-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work/ffmpeg-4.4.1-abi_x86_64.amd64'
 * S: '/var/tmp/portage/media-video/ffmpeg-4.4.1-r2/work/ffmpeg-4.4.1'

>>> Failed to emerge media-video/ffmpeg-4.4.1-r2, Log file:

>>>  '/var/log/portage/media-video:ffmpeg-4.4.1-r2:20220220-091917.log'


Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/no-multilib, gcc-11.2.0, glibc-2.33-r7, 5.15.11-gentoo x86_64)
=================================================================
System uname: Linux-5.15.11-gentoo-x86_64-Intel-R-_Core-TM-_i5-3470_CPU_@_3.20GHz-with-glibc2.33
KiB Mem:    16280784 total,    961656 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 20 Feb 2022 08:30:01 +0000
Head commit of repository gentoo: 5a48ee50d19a4ed58b32bbe35b6246a1c295ae7e
Head commit of repository matrix: fa2603cc0f2f391c565a349d2364a2db75936a07

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           2.7.18_p13::gentoo, 3.9.9-r1::gentoo
dev-util/cmake:            3.22.2::gentoo
dev-util/meson:            0.60.3::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.25::gentoo
sys-devel/autoconf:        2.71-r1::gentoo
sys-devel/automake:        1.16.4::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/gcc:             11.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    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-max-age: 28
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--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 -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news pid-sandbox protect-owned qa-unresolved-soname-deps sandbox sfperms strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 --load-average=4"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/bash"
USE="10bit 64bit 8bit R X a52 aac aalib acoustid acpi additions adobe-cff aio alsa amd64 ap arcade arping asf asm audio audiofile avcodec avformat blake2 blksha1 bookmarks bwscheduler bzip2 cacert cairo caps cdda cdio cdr chm chromaprint chromium chroot classic cli client clock-panel-plugin concheck cpumining crypt cryptsetup css cups daemon dav1d dbus desktop-utils device-mapper dga directfb display-manager djvu downloadorder dri dri3 drm drop-root dvbpsi dvd dvdnav dvdr e2e ebook egl eigen encode epub espeak exceptions exif expat extra extra-filters fast-redirects fbcon fdt ffmpeg file-transfer filecaps flac fluidsynth fontconfig force fortran gallium gbm gcj gd ggi gif glass glib glibc-omitfp globalcfg gmp gpm gsm handbook hardcoded-tables hardlink harfbuzz hddtemp hpcups hpn hunspell iconv icu idea image-blocking imap imlib infowidget inotify iostats ipc ipfilter iptables ipv6 javafx jbig jit joystick jpeg jpeg2k jsbsim kdcraw kmod lame lcms less libass libglvnd libinput libkms libmpv libsamplerate libtirpc libwww live lm_sensors logger logviewer lto luajittex lzma mad matroska mbox mdns-bundled memlimit mesh midi mime minizip mmx mmxext mouse mp3 mp4 mpeg mta nas native-extensions native-symlinks ncurses net netifrc network nls no-old-linux nodrm npm nptl ntfsprogs ntp ocamlopt offlinehelp ofx ogg okular omemo opengl openmedia openmp openssl opus osdmenu p2p pango pcre pcre16 pdf pie pin-upstream-blobs pkcs11 pkg-config pm-utils png portmon postproc private-home ps qml quotes raptor readline real recursion-limit redland rsync-verify rtc rtmp savedconfig scanfolder scanner scp scrypt sdl search seccomp secure-delete security-key sensord shared-glapi shm silc slirp slit smbclient smtp snapshot sndfile sound speex spell spice split-usr sse sse2 sse2_4way sse2check sse4 ssl ssse3 standalone stats svc svg swscale sysfs syslog system-icu systray taglib tcmalloc tcpd test theora thin threads threadsafe tiff tinfo tls-heartbeat toolbar truetype udev unicode upower urandom usb usbredir userlocales userns utils uvm v4l2 vaapi vainfo vhost-net vhost-user-fs video vorbis vtv vulkan wav webdav-neon webp wg-quick whitelist widgets x264 x265 xattr xcb xinerama xkb xml xmp xscreensaver xslt xv xvfb xvid zlib zrtp zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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="sheets stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="i965 intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, L10N, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-21 19:34:34 UTC
Yeah, it's talking about chromaprint now.

Also:
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Comment 2 Ionen Wolkens gentoo-dev 2022-02-22 04:52:06 UTC
Unsure what exactly happened without config.log, but chromaprint is linked with ffmpeg (circular) and if system's ffmpeg is broken (e.g. soname changes or undefined symbols because ffmpeg needs a rebuild), it results in a test failure when configure checks for it.

For a dirty way to get issues, `emerge -1 chromaprint` then delete the system's /usr/lib*/libavcodec.* which results in a broken libchromaprint.so, then `USE=chromaprint emerge -1 ffmpeg`:

    /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../lib/libchromaprint.so: undefined reference to `av_rdft_calc@LIBAVCODEC_58'
    collect2: error: ld returned 1 exit status
    ERROR: chromaprint not found

I vaguely recall seeing this issue 1-2 years ago or so (maybe was on the forums), was due to dav1d soname change back then but it could be anything.

For working around, you can rebuild ffmpeg with USE=-chromaprint once, then re-enable it (or leave disabled if not something you needed).
Comment 3 Ionen Wolkens gentoo-dev 2022-02-22 05:00:06 UTC
(In reply to Ionen Wolkens from comment #2)
> I vaguely recall seeing this issue 1-2 years ago or so (maybe was on the
> forums), was due to dav1d soname change back then but it could be anything.
Or maybe wasn't a soname change (preserve-libs), forget what happened. Probably was some abi breakage.
Comment 4 Ionen Wolkens gentoo-dev 2022-02-22 06:07:16 UTC
(In reply to Sam James from comment #1)
> Also:
> Include the log file "ffbuild/config.log" produced by configure as this will
> help
> solve the problem.
I read this first before looking at attachments which made me think it wasn't there, but the config.log is already attached.

/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `x265_api_get_192'
collect2: error: ld returned 1 exit status
ERROR: chromaprint not found
Comment 5 ta2002 2022-02-22 06:23:56 UTC
(In reply to Ionen Wolkens from comment #2)
> For a dirty way to get issues, `emerge -1 chromaprint` then delete the
> system's /usr/lib*/libavcodec.* which results in a broken libchromaprint.so,
> then `USE=chromaprint emerge -1 ffmpeg`:

I tried this as the first step to soliving the problem, and media-libs/chromaprint-1.5.1 fails to compile with the same /usr/lib64/libavcodec.so: undefined reference to `x265_api_get_192' message.

[23/23] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse -Wall -Wl,-O1 -Wl,--as-needed    -rdynamic src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o -o src/cmd/fpcalc  -Wl,-rpath,/var/tmp/portage/media-libs/chromaprint-1.5.1/work/chromaprint-1.5.1_build-abi_x86_64.amd64/src:  -lm  src/libchromaprint.so.1.5.1  -lm  /usr/lib64/libavformat.so  /usr/lib64/libavcodec.so  /usr/lib64/libavutil.so  /usr/lib64/libswresample.so  -lpthread && :
FAILED: src/cmd/fpcalc 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -fomit-frame-pointer -march=ivybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mrdrnd -mf16c -mfsgsbase -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -fstack-protector-strong -mfpmath=sse -Wall -Wl,-O1 -Wl,--as-needed    -rdynamic src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o -o src/cmd/fpcalc  -Wl,-rpath,/var/tmp/portage/media-libs/chromaprint-1.5.1/work/chromaprint-1.5.1_build-abi_x86_64.amd64/src:  -lm  src/libchromaprint.so.1.5.1  -lm  /usr/lib64/libavformat.so  /usr/lib64/libavcodec.so  /usr/lib64/libavutil.so  /usr/lib64/libswresample.so  -lpthread && :
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libx265.so.192, needed by /usr/lib64/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so: undefined reference to `x265_api_get_192'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: media-libs/chromaprint-1.5.1::gentoo failed (compile phase):
 *   ninja -v -j4 -l4 failed
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 2452:  Called cmake-multilib_src_compile
 *   environment, line  697:  Called multilib-minimal_src_compile
 *   environment, line 1798:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2065:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 1758:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 1756:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  480:  Called multilib-minimal_abi_src_compile
 *   environment, line 1792:  Called multilib_src_compile
 *   environment, line 2277:  Called cmake_src_compile
 *   environment, line  808:  Called cmake_build
 *   environment, line  777:  Called eninja
 *   environment, line 1231:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=media-libs/chromaprint-1.5.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/chromaprint-1.5.1::gentoo'`.
 * The complete build log is located at '/var/log/portage/media-libs:chromaprint-1.5.1:20220222-061446.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-libs/chromaprint-1.5.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/chromaprint-1.5.1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/chromaprint-1.5.1/work/chromaprint-1.5.1_build-abi_x86_64.amd64'
 * S: '/var/tmp/portage/media-libs/chromaprint-1.5.1/work/chromaprint-1.5.1'

>>> Failed to emerge media-libs/chromaprint-1.5.1, Log file:

>>>  '/var/log/portage/media-libs:chromaprint-1.5.1:20220222-061446.log'
Comment 6 Ionen Wolkens gentoo-dev 2022-02-22 06:28:14 UTC
(In reply to ta2002 from comment #5)
> (In reply to Ionen Wolkens from comment #2)
> > For a dirty way to get issues, `emerge -1 chromaprint` then delete the
> > system's /usr/lib*/libavcodec.* which results in a broken libchromaprint.so,
> > then `USE=chromaprint emerge -1 ffmpeg`:
> 
> I tried this as the first step to soliving the problem, and
> media-libs/chromaprint-1.5.1 fails to compile with the same
> /usr/lib64/libavcodec.so: undefined reference to `x265_api_get_192' message.
That was the first step to get problems, not solving.

Workaround was a bit below:
>For working around, you can rebuild ffmpeg with
>USE=-chromaprint once, then re-enable it (or
>leave disabled if not something you needed).
Comment 7 Larry the Git Cow gentoo-dev 2022-02-22 06:46:30 UTC
The bug has been closed via the following commit(s):

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

commit 23fce11f0b9f85285e880516c9f5646dfd7594c7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-02-22 06:39:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-02-22 06:39:50 +0000

    media-libs/chromaprint: make ffmpeg support optional
    
    Unconditional dependence on ffmpeg leads to awkward circular
    dependencies between ffmpeg and chromaprint.
    
    Let's use fftw unless tools are requested (for which ffmpeg is
    actually required) to break the cycle in the common case.
    
    Bug: https://bugs.gentoo.org/625210
    Closes: https://bugs.gentoo.org/833821
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/chromaprint/chromaprint-1.5.1-r1.ebuild | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)
Comment 8 ta2002 2022-02-22 14:37:15 UTC
(In reply to Ionen Wolkens from comment #6)
> Workaround was a bit below:
> >For working around, you can rebuild ffmpeg with
> >USE=-chromaprint once, then re-enable it (or
> >leave disabled if not something you needed).

That did work, but since I do have chromaprint installed with USE=tools, I would prefer a "fix" that displays the workaround for users that encounter this problem.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-22 15:47:08 UTC
(In reply to ta2002 from comment #8)
> (In reply to Ionen Wolkens from comment #6)
> > Workaround was a bit below:
> > >For working around, you can rebuild ffmpeg with
> > >USE=-chromaprint once, then re-enable it (or
> > >leave disabled if not something you needed).
> 
> That did work, but since I do have chromaprint installed with USE=tools, I
> would prefer a "fix" that displays the workaround for users that encounter
> this problem.

Please show what you desire in a patch.
Comment 10 ta2002 2022-02-23 22:53:03 UTC
(In reply to Sam James from comment #9)
> Please show what you desire in a patch.

Doesn't gentoo have some type of generic warning for possible circular dependencies (many of the ones frequently encountered seem well known)?

If no standard way exists to warn users of this, then I would suggest something like:

if use chromaprint ; then
    elog "Possible circular dependencies between ffmpeg and chromaprint."
fi

This confused me when I encountered it, since I actually had to rebuild ffmpeg the day before (due to a different update), and it compiled without any problems. The x265 upgrade triggered the issue. At this point, I have to ask if an x265 upgrade shouldn't require a rebuild of chromaprint as well as ffmpeg (which had to happen in the end). It probably should when ffmpeg has the chromaprint USE flag enabled.
Comment 11 Larry the Git Cow gentoo-dev 2022-08-03 05:43:55 UTC
The bug has been referenced in the following commit(s):

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

commit 9594b7d4552c7d4c3e8b4aaaa2660812f78ecec0
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-08-03 05:40:38 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-08-03 05:43:52 +0000

    media-video/ffmpeg: add notes about chromaprint circular dependency
    
     - ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends
       on ffmpeg, this causes breakages while updating.
    
    Closes: https://bugs.gentoo.org/862996
    Bug: https://bugs.gentoo.org/625210
    Bug: https://bugs.gentoo.org/833821
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.2.ebuild | 14 ++++++++++++++
 media-video/ffmpeg/ffmpeg-5.0.1.ebuild | 14 ++++++++++++++
 media-video/ffmpeg/ffmpeg-9999.ebuild  | 14 ++++++++++++++
 3 files changed, 42 insertions(+)