[MacPorts] #70519: ffmpeg7: does not build on macOS 10.12 with Xcode 9.2 due to "AVMediaType" type conflict
MacPorts
noreply at macports.org
Fri Aug 9 22:40:16 UTC 2024
#70519: ffmpeg7: does not build on macOS 10.12 with Xcode 9.2 due to "AVMediaType"
type conflict
---------------------+----------------------
Reporter: andlabs | Owner: mascguy
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: ffmpeg7
---------------------+----------------------
Thanks for adding ffmpeg 7! On macOS 10.12 with Xcode 9.2, it fails to
build with a bunch of confusing errors related to `AVMediaType`:
{{{
:info:build libavdevice/avfoundation.m:765:41: error: must use 'enum' tag
to refer to type 'AVMediaType'
:info:build static NSArray* getDevicesWithMediaType(AVMediaType mediaType)
{
:info:build ^
:info:build enum
:info:build libavdevice/avfoundation.m:816:50: warning: incompatible
integer to pointer conversion sending 'enum AVMediaType' to parameter of
type 'NSString *' [-Wint-conversion]
:info:build return [AVCaptureDevice devicesWithMediaType:mediaType];
:info:build ^~~~~~~~~
:info:build
/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:110:47:
note: passing argument to parameter 'mediaType' here
:info:build + (NSArray *)devicesWithMediaType:(NSString *)mediaType;
:info:build ^
:info:build libavdevice/avfoundation.m:829:54: warning: incompatible
pointer to integer conversion passing 'NSString *const' to parameter of
type 'enum AVMediaType' [-Wint-conversion]
(snip; see attached log)
}}}
I am guessing that the AVFoundation.framework `AVMediaType` was introduced
in a later version of Xcode's macOS SDK and its lack of presence on my
headers means ffmpeg defined its own enum with that name?
[https://trac.macports.org/ticket/65623#comment:27 When I tried building
ffmpeg 7 a few months ago] I just manually changed the function parameters
to all be `NSString *` instead; I don't know if that's the correct fix or
not though, so I'm opening this bug.
--
Ticket URL: <https://trac.macports.org/ticket/70519>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list