Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936433 - media-video/ffmpeg-4.4.4-r10[vaapi]: fails to compile, -Wincompatible-pointer-types
Summary: media-video/ffmpeg-4.4.4-r10[vaapi]: fails to compile, -Wincompatible-pointer...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-07-21 10:54 UTC by Nowa Ammerlaan
Modified: 2024-08-29 07:52 UTC (History)
2 users (show)

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


Attachments
build log (build.log,227.66 KB, text/plain)
2024-07-21 10:54 UTC, Nowa Ammerlaan
Details
patch (ffmpeg-gcc14.patch,470 bytes, patch)
2024-07-21 13:59 UTC, Kostadin Shishmanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan gentoo-dev 2024-07-21 10:54:20 UTC
Created attachment 898071 [details]
build log

emerge -pqv '=media-video/ffmpeg-4.4.4-r10::gentoo'

Local copy of remote index is up-to-date and will be used.
[ebuild     U ] media-video/ffmpeg-4.4.4-r10 [4.4.4-r9] USE="X alsa bluray bzip2 dav1d encode fdk fontconfig gnutls gpl iconv libass libdrm libv4l lzma mp3 network openal opencl opengl openssl opus pic postproc pulseaudio qsv samba sdl speex svg theora threads truetype v4l vaapi verify-sig vorbis vpx vulkan x264 x265 xvid zlib -amf -amr -amrenc (-appkit) -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -flite -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libcaca -libilbc -librtmp -libsoxr -libtesseract -libxml2 -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openh264 -oss -rav1e -rubberband -snappy -sndio -srt -ssh -static-libs -svt-av1 -test -twolame -vdpau -vidstab -vmaf -webp -zeromq -zimg -zvbi" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"

Fails with (gcc-14.1.1_p20240622):

src/libavutil/hwcontext_vaapi.c: In function ‘vaapi_map_from_drm’:
src/libavutil/hwcontext_vaapi.c:1091:30: error: assignment to ‘uintptr_t *’ {aka ‘unsigned int *’} from incompatible pointer type ‘long unsigned int *’ [-Wincompatible-pointer-types]
1091 |     buffer_desc.buffers      = &buffer_handle;
|                              ^
src/libavutil/hwcontext_vaapi.c: In function ‘vaapi_map_to_drm_abh’:
src/libavutil/hwcontext_vaapi.c:1357:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uintptr_t’ {aka ‘unsigned int’} [-Wformat=]
1357 |     av_log(hwfc, AV_LOG_DEBUG, "DRM PRIME fd is %ld.\n",
|                                                 ~~^
|                                                   |
|                                                   long int
|                                                 %d
1358 |            mapping->buffer_info.handle);
|            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|                                |
|                                uintptr_t {aka unsigned int}
make: *** [/tmp/portage/media-video/ffmpeg-4.4.4-r10/work/ffmpeg-4.4.4/ffbuild/common.mak:67: libavutil/hwcontext_vaapi.o] Error 1
Comment 1 Kostadin Shishmanov 2024-07-21 13:59:30 UTC
Created attachment 898074 [details, diff]
patch

Could you test the attached patch? It's https://github.com/gentoo/gentoo/blob/master/media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch but a bit modified, since it wouldn't apply cleanly.
Comment 2 Nowa Ammerlaan gentoo-dev 2024-07-21 14:13:54 UTC
Works on my end, thanks!
Comment 3 Larry the Git Cow gentoo-dev 2024-08-29 07:52:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61d5569fa8071eb9c90f91de5b3a87d1674f9c63

commit 61d5569fa8071eb9c90f91de5b3a87d1674f9c63
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2024-08-29 07:47:03 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2024-08-29 07:47:03 +0000

    media-video/ffmpeg: fix incompatible pointer types in 4.4.5
    
    Closes: https://bugs.gentoo.org/936433
    Co-authored-by: Kostadin Shishmanov <kocelfc@tutanota.com>
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4.5.ebuild                    |  1 +
 .../ffmpeg/files/ffmpeg-4.4.5-incmptbl-pntr-types.patch   | 15 +++++++++++++++
 2 files changed, 16 insertions(+)