Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907484 - media-video/ffmpeg-6.0-r1 fails to compile (lto): src/libswscale/x86/swscale.c:323:1: error: type of ‘ff_nv12ToUV_avx’ does not match original declaration [-Werror=lto-type-mismatch]
Summary: media-video/ffmpeg-6.0-r1 fails to compile (lto): src/libswscale/x86/swscale....
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-05-31 12:31 UTC by Kostadin Shishmanov
Modified: 2023-07-03 19:50 UTC (History)
1 user (show)

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


Attachments
build log compressed with zstd (build.log.zst,57.28 KB, application/zstd)
2023-05-31 12:31 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2023-05-31 12:31:13 UTC
Created attachment 862966 [details]
build log compressed with zstd

It fails even with -fno-lto added to CFLAGS with package.env, because for some reason the build readds -flto to the right of it at some point.



USE="X bzip2 dav1d encode gnutls gpl iconv lcms mp3 network opengl postproc pulseaudio sdl svg threads truetype vaapi vorbis vulkan x264 xvid zlib"

CFLAGS="-O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" 

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);
      | ^
src/libswscale/x86/rgb2rgb_template.c:1821:6: note: type mismatch in parameter 8
 1821 | void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
      |      ^
src/libswscale/x86/rgb2rgb_template.c:1821:6: note: ‘ff_nv12ToUV_avx’ was previously declared here
src/libswscale/x86/swscale.c:321:1: error: type of ‘ff_nv12ToUV_sse2’ does not match original declaration [-Werror=lto-type-mismatch]
  321 | INPUT_FUNCS(sse2);
      | ^
src/libswscale/x86/rgb2rgb_template.c:1821:6: note: type mismatch in parameter 8
 1821 | void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
      |      ^
src/libswscale/x86/rgb2rgb_template.c:1821:6: note: ‘ff_nv12ToUV_sse2’ was previously declared here
Comment 1 Kostadin Shishmanov 2023-07-03 19:50:44 UTC
Did a bisect and this is the first bad commit unless i messed something up:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/f2de911818fbd7e73343803626b697fd0c968121

f2de911818fbd7e73343803626b697fd0c968121 is the first bad commit
commit f2de911818fbd7e73343803626b697fd0c968121
Author: Timo Rothenpieler <timo@rothenpieler.org>
Date:   Wed Aug 10 15:12:24 2022 +0200

    swscale: add opaque parameter to input functions

 libswscale/hscale.c           |  12 ++--
 libswscale/input.c            | 149 +++++++++++++++++++++++-------------------
 libswscale/swscale_internal.h |  17 +++--
 libswscale/x86/swscale.c      |  13 ++--
 4 files changed, 106 insertions(+), 85 deletions(-