Ugraded to media-video/ffmpeg-4.4.2 on 20220605 without any issues. Rebuild forced by dav1d upgrade. Config log finishes with this: BEGIN /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c 1 #include <complex.h> 2 #include <math.h> 3 float foo(complex float f, complex float g) { return cabs(f * I); } 4 int main(void){ return (int) foo; } END /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c x86_64-pc-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -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 -march=ivybridge -std=c11 -fPIC -pthread -c -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c: In function 'main': /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c:4:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 4 | int main(void){ return (int) foo; } | ^ x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -march=ivybridge -Wl,--as-needed -Wl,-z,noexecstack -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o: in function `foo': test.c:(.text+0x39): undefined reference to `cabs' collect2: error: ld returned 1 exit status check_complexfunc cexp 1 test_ld cc test_cc BEGIN /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c 1 #include <complex.h> 2 #include <math.h> 3 float foo(complex float f, complex float g) { return cexp(f * I); } 4 int main(void){ return (int) foo; } END /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c x86_64-pc-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -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 -march=ivybridge -std=c11 -fPIC -pthread -c -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c: In function 'main': /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c:4:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 4 | int main(void){ return (int) foo; } | ^ x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -march=ivybridge -Wl,--as-needed -Wl,-z,noexecstack -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o: in function `foo': test.c:(.text+0x39): undefined reference to `cexp' collect2: error: ld returned 1 exit status require chromaprint chromaprint.h chromaprint_get_version -lchromaprint check_lib chromaprint chromaprint.h chromaprint_get_version -lchromaprint check_func_headers chromaprint.h chromaprint_get_version -lchromaprint test_ld cc -lchromaprint test_cc BEGIN /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c 1 #include <chromaprint.h> 2 #include <stdint.h> 3 long check_chromaprint_get_version(void) { return (long) chromaprint_get_version; } 4 int main(void) { int ret = 0; 5 ret |= ((intptr_t)check_chromaprint_get_version) & 0xFFFF; 6 return ret; } END /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c x86_64-pc-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -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 -march=ivybridge -std=c11 -fPIC -pthread -c -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.c x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -march=ivybridge -Wl,--as-needed -Wl,-z,noexecstack -o /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test /var/tmp/portage/media-video/ffmpeg-4.4.2/temp/ffconf.dhC22CIg/test.o -lchromaprint /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libdav1d.so.5, needed by /usr/lib64/libavcodec.so.58, not found (try using -rpath or -rpath-link) /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_data_wrap_user_data' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_default_settings' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_flush' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_data_unref' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_open' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_get_picture' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_version' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_send_data' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_data_wrap' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_picture_unref' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libavcodec.so.58: undefined reference to `dav1d_close' collect2: error: ld returned 1 exit status ERROR: chromaprint not found $ qlist -Iv chromaprint media-libs/chromaprint-1.5.1-r2 $ qlist chromaprint /usr/share/doc/chromaprint-1.5.1-r2/README.md.bz2 /usr/share/doc/chromaprint-1.5.1-r2/NEWS.txt.bz2 /usr/bin/fpcalc /usr/include/chromaprint.h /usr/lib64/libchromaprint.so /usr/lib64/libchromaprint.so.1 /usr/lib64/libchromaprint.so.1.5.1 /usr/lib64/pkgconfig/libchromaprint.pc
Could you upload full build.log (and config.log) and paste emerge --info here? I don't know how much ffmpeg extends the *FLAGS list and how much is your own doing, but with "sane defaults" I can emerge ffmpeg[chromaprint] with dav1d-1.0.0.
Created attachment 797023 [details] emerge --info
Created attachment 797026 [details] build log
Created attachment 797032 [details] config log
Soo.. since chromaprint[tools] depends on ffmpeg and ffmpeg[chromaprint] depends on chromaprint I guess this is what's causing it. Try rebuilding chromaprint[-tools] and then re-emerging ffmpeg[chromaprint] and if it works you can do chromaprint[tools] again? I can compile ffmpeg with your USE flags just fine here. PS. consider switching to -march=native to handle all those extra flags...
(In reply to Joonas Niilola from comment #5) > Try rebuilding chromaprint[-tools] and then re-emerging ffmpeg[chromaprint] > and if it works you can do chromaprint[tools] again? That did work (thanks). I don't understand, though, why upgrading dav1d affects chromaprint (as in why ffmpeg can't even find it). For the few other circular dependencies I can recall, once both of them get built with the desired use flags, upgrading or rebuilding one or the other usually doesn't cause any problems. > PS. consider switching to -march=native to handle all those extra flags... I generally like to explicitly specify the defaults, just so I can see them. :)
(In reply to ta2002 from comment #6) > (In reply to Joonas Niilola from comment #5) > > Try rebuilding chromaprint[-tools] and then re-emerging ffmpeg[chromaprint] > > and if it works you can do chromaprint[tools] again? > > That did work (thanks). > > I don't understand, though, why upgrading dav1d affects chromaprint (as in > why ffmpeg can't even find it). For the few other circular dependencies I > can recall, once both of them get built with the desired use flags, > upgrading or rebuilding one or the other usually doesn't cause any problems. > > In future, please include the full build.log and emerge --info. Anyway, it's a nasty case of circular soname dependencies. Once dav1d gets upgraded, ffmpeg is immediately broken (which is not a problem for building ffmpeg itself), but chromaprint is linked to ffmpeg and that _is_ broken. ffmpeg when trying to get rebuilt fails because it tries to use chromaprint.
The bug has been closed via 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(+)
(In reply to Sam James from comment #7) > (In reply to ta2002 from comment #6) > > (In reply to Joonas Niilola from comment #5) > > > Try rebuilding chromaprint[-tools] and then re-emerging ffmpeg[chromaprint] > > > and if it works you can do chromaprint[tools] again? > > > > That did work (thanks). > > > > I don't understand, though, why upgrading dav1d affects chromaprint (as in > > why ffmpeg can't even find it). For the few other circular dependencies I > > can recall, once both of them get built with the desired use flags, > > upgrading or rebuilding one or the other usually doesn't cause any problems. > > > > > > In future, please include the full build.log and emerge --info. Anyway, it's > a nasty case of circular soname dependencies. > > Once dav1d gets upgraded, ffmpeg is immediately broken (which is not a > problem for building ffmpeg itself), but chromaprint is linked to ffmpeg and > that _is_ broken. ffmpeg when trying to get rebuilt fails because it tries > to use chromaprint. I don't like this idea but it's possible a minimal ffmpeg could be built with multibuild and LD_LIBRARY_PATH used to ensure the build succeeds. But it's a terrible idea and it'd bloat the ebuild even more, though it could be done conditionally based on whether the current library is broken
(In reply to Joonas Niilola from comment #5) > Soo.. since chromaprint[tools] depends on ffmpeg and ffmpeg[chromaprint] > depends on chromaprint I guess this is what's causing it. Try rebuilding > chromaprint[-tools] and then re-emerging ffmpeg[chromaprint] and if it works > you can do chromaprint[tools] again? I can compile ffmpeg with your USE > flags just fine here. On another machine, I tried this, and it simply did not work at all. In fact, it screwed things up so much (chromaprint simply would not build with or without tools) that I had to recover by unmerging chromaprint, emerging ffmpeg[-chromaprint], emerging chromaprint again, and then emerging ffmpeg[chromaprint] (I think the build order broke ffmpeg in a different way). Going forward, I would only recommend completely unistalling chromaprint before rebuilding ffmpeg.