Summary: | media-video/ffmpeg-4.4.1-r2: fails to compile (ERROR: chromaprint not found) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ta2002 <throw_away_2002> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ionen, jstein, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=625210 https://bugs.gentoo.org/show_bug.cgi?id=862996 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | work/ffmpeg-4.4.1-abi_x86_64.amd64/ffbuild/config.log |
Description
ta2002
2022-02-21 08:01:39 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. 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). (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. (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 (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' (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). 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(+) (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. (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. (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. 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(+) |