Opened 3 months ago

Closed 6 weeks ago

#11095 closed defect (fixed)

Can't compile FFmpeg on Mac from latest Git version

Reported by: Paul Pacifico Owned by: ePirat
Priority: critical Component: avutil
Version: git-master Keywords: compile
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

With the latest git version I cannot compile FFmpeg on x86 and arm Mac computers.

Here is my build configuration:

PKG_CONFIG_PATH="$BUILDS/lib/pkgconfig" \
CFLAGS="-I$BUILDS/include -fno-stack-check -mmacosx-version-min=10.13" \
LDFLAGS="-L$BUILDS/lib -mmacosx-version-min=10.13"

./configure --cc=/usr/bin/clang --prefix=$BUILDS \
		--extra-cflags="-framework openAL" \
		--extra-ldflags="-framework openAL" \
		--ld="g++" \
		--pkg-config-flags="--static" \
		--extra-ldexeflags="-Bstatic" \
		--shlibdir="@loader_path" \
		--disable-static \
		--enable-shared \
		--enable-gpl \
		--enable-version3 \
		--disable-sdl2 \
		--disable-ffplay \
		--enable-openal \
		--enable-opengl \
		--enable-fontconfig \
		--enable-iconv \
		--enable-libass \
		--enable-libdav1d \
		--enable-libfreetype \
		--enable-libharfbuzz \
		--enable-libmp3lame \
		--enable-libopencore-amrnb \
		--enable-libopencore-amrwb \
		--enable-libopenjpeg \
		--enable-libopus \
		--enable-libsnappy \
		--enable-libtheora \
		--enable-libtwolame \
		--enable-libvpx \
		--enable-libwebp \
		--enable-libx264 \
		--enable-libx265 \
		--enable-libvvenc \
		--enable-libzimg \
		--enable-lzma \
		--enable-zlib \
		--enable-libvidstab \
		--enable-libvmaf \
		--enable-libvorbis \
		--enable-libvo-amrwbenc \
		--enable-libxvid \
		--enable-libgsm \
		--enable-libsvtav1 \
		--enable-libaom \
		--enable-appkit \
		--enable-avfoundation \
		--enable-coreimage \
		--enable-audiotoolbox

I get this error:

libavutil/hwcontext_videotoolbox.c:592:39: error: implicit declaration of function 'CVBufferCopyAttachments' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

CFDictionaryRef attachments = CVBufferCopyAttachments(pixbuf, kCVAttachmentMode_ShouldPropagate);

Change History (5)

comment:1 by Paul Pacifico, 3 months ago

It works when using

-mmacosx-version-min=12.0

It seems related to this change

So we can't build FFmpeg using videotoolbox with a lower version than OSX 12.0?

Paul.

comment:2 by ePirat, 3 months ago

Working on a fix for this.

Just curious, which SDK version were you using?

You can check with xcrun --sdk macosx --show-sdk-version

comment:3 by ePirat, 3 months ago

Analyzed by developer: set
Owner: set to ePirat
Reproduced by developer: set
Status: newopen

comment:5 by quinkblack, 6 weeks ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.