Created attachment 872045 [details] media-video\:ffmpeg-6.0-r6\:20231002-160145.log Hello folks, apparently media-video/ffmpeg-6.0-r6 fails to build due to a "‘ff_nv12ToUV_sse2’ does not match original declaration [-Werror=lto-type-mismatch]" error. >>> skipping strip -x libswresample/x86/audio_convert.o sed 's/MAJOR/4/' /var/tmp/portage/media-video/ffmpeg-6.0-r6/work/ffmpeg-6.0/libswresample/libswresample.v | cat > libswresample/libswresample.ver echo skipping strip -x libavcodec/x86/vp9lpf_16bpp.o skipping strip -x libavcodec/x86/vp9lpf_16bpp.o echo skipping strip -x libavcodec/x86/vp9itxfm_16bpp.o skipping strip -x libavcodec/x86/vp9itxfm_16bpp.o echo skipping strip -x libavcodec/x86/hevc_mc.o skipping strip -x libavcodec/x86/hevc_mc.o echo skipping strip -x libavcodec/x86/vp9lpf.o skipping strip -x libavcodec/x86/vp9lpf.o cd ./libavutil/ && ln -s -f libavutil.so.58 libavutil.so x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,libswscale.so.7 -Wl,-Bsymbolic -Wl,--version-script,libswscale/libswscale.ver -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -march=alderlake -O2 -pipe -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fno-math-errno -fno-signed-zeros -flto -fno-tree-vectorize -o libswscale/libswscale.so.7 libswscale/alphablend.o libswscale/gamma.o libswscale/half2float.o libswscale/hscale.o libswscale/hscale_fast_bilinear.o libswscale/input.o libswscale/options.o libswscale/output.o libswscale/rgb2rgb.o libswscale/slice.o libswscale/swscale.o libswscale/swscale_unscaled.o libswscale/utils.o libswscale/version.o libswscale/vscale.o libswscale/x86/hscale_fast_bilinear_simd.o libswscale/x86/input.o libswscale/x86/output.o libswscale/x86/rgb2rgb.o libswscale/x86/rgb_2_rgb.o libswscale/x86/scale.o libswscale/x86/scale_avx2.o libswscale/x86/swscale.o libswscale/x86/yuv2rgb.o libswscale/x86/yuv2yuvX.o libswscale/x86/yuv_2_rgb.o libswscale/yuv2rgb.o libswscale/log2_tab.o -lavutil -lm -latomic -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,libpostproc.so.57 -Wl,-Bsymbolic -Wl,--version-script,libpostproc/libpostproc.ver -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -march=alderlake -O2 -pipe -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fno-math-errno -fno-signed-zeros -flto -fno-tree-vectorize -o libpostproc/libpostproc.so.57 libpostproc/postprocess.o libpostproc/version.o -lavutil -lavutil -lm -latomic -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,libswresample.so.4 -Wl,-Bsymbolic -Wl,--version-script,libswresample/libswresample.ver -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -march=alderlake -O2 -pipe -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fno-math-errno -fno-signed-zeros -flto -fno-tree-vectorize -o libswresample/libswresample.so.4 libswresample/audioconvert.o libswresample/dither.o libswresample/options.o libswresample/rematrix.o libswresample/resample.o libswresample/resample_dsp.o libswresample/swresample.o libswresample/swresample_frame.o libswresample/version.o libswresample/x86/audio_convert.o libswresample/x86/audio_convert_init.o libswresample/x86/rematrix.o libswresample/x86/rematrix_init.o libswresample/x86/resample.o libswresample/x86/resample_init.o libswresample/log2_tab.o -lavutil -lavutil -lm -latomic -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 -pthread -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lm -lva -latomic -lX11 src/libswscale/x86/swscale.c:323:1: error: type of ‘ff_nv12ToUV_avx’ does not match original declaration [-Werror=lto-type-mismatch] 323 | INPUT_FUNCS(avx); <<< Not sure but it may related to https://bugs.gentoo.org/907484 . Thanks
Created attachment 872046 [details] emerge --info
Doesn't build without LTO either.
(In reply to Pietro from comment #2) > Doesn't build without LTO either. That sounds unlikely. Please include a build.log for both builds.
Created attachment 872047 [details] ffmpeg-6.0-r6-no-lto.log
I realised the reason why it was failing to build without LTO is due to "-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" in COMMON_FLAGS in make.conf, and the the variables from the nolto.conf file were all pointing to $COMMON_FLAGS. So I edited nolto.conf file as such and I was able to build the package. >>> # Env setup to disable LTO for problem builds COMMON_FLAGS_NO_LTO="-march=alderlake -O2 -pipe" CFLAGS="${COMMON_FLAGS_NO_LTO} -fno-lto" CXXFLAGS="${COMMON_FLAGS_NO_LTO} -fno-lto" FCFLAGS="${COMMON_FLAGS_NO_LTO} -fno-lto" FFLAGS="${COMMON_FLAGS_NO_LTO} -fno-lto" <<< However, issue remains when compiling using LTO. Thanks
Issue most likely introduced here when the opaque pointer wasn't added everywhere. https://github.com/FFmpeg/FFmpeg/commit/f2de911818fbd7e73343803626b697fd0c968121
https://bugs.gentoo.org/907484
*** This bug has been marked as a duplicate of bug 907484 ***