Once again I am sorry to bother the devs, but this mailing list is supposed to be for dev discussions as well.

The commit actually uses #ifdef blocks, but I still get an error when compiling with MACOSX_DEPLOYMENT_TARGET=10.13

I suspect that there was an oversight or does ffmpeg really require a minimum version of macOS 12? I also understand that both 10.13 and 12.x are long out of support. I am not against raising the minimum level, but I just want to make sure that it is absolutely necessary. In the past something similar happened and it turned out that the code was missing another ifdef block.

Here's the error for reference:

--------
libavdevice/avfoundation.m:896:38: error: 'kIOMainPortDefault' is only available on macOS 12.0 or newer [-Werror,-Wunguarded-availability-new]
  896 |     if (IOServiceGetMatchingServices(AVF_IO_MAIN_PORT_DEFAULT,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:35:41: note: expanded from macro 'AVF_IO_MAIN_PORT_DEFAULT'
   35 | #       define AVF_IO_MAIN_PORT_DEFAULT kIOMainPortDefault
      |                                         ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:112:19: note: 'kIOMainPortDefault' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 10.13.0
  112 | const mach_port_t kIOMainPortDefault
      |                   ^
libavdevice/avfoundation.m:896:38: note: enclose 'kIOMainPortDefault' in an @available check to silence this warning
  896 |     if (IOServiceGetMatchingServices(AVF_IO_MAIN_PORT_DEFAULT,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
897 | IOServiceMatching("IOUSBHostDevice"), &iterator) != KERN_SUCCESS)
  898 |         return -1;
      |
libavdevice/avfoundation.m:35:41: note: expanded from macro 'AVF_IO_MAIN_PORT_DEFAULT'
   35 | #       define AVF_IO_MAIN_PORT_DEFAULT kIOMainPortDefault
      |                                         ^~~~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:927:38: error: 'kIOMainPortDefault' is only available on macOS 12.0 or newer [-Werror,-Wunguarded-availability-new]
  927 |     if (IOServiceGetMatchingServices(AVF_IO_MAIN_PORT_DEFAULT,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:35:41: note: expanded from macro 'AVF_IO_MAIN_PORT_DEFAULT'
   35 | #       define AVF_IO_MAIN_PORT_DEFAULT kIOMainPortDefault
      |                                         ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:112:19: note: 'kIOMainPortDefault' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 10.13.0
  112 | const mach_port_t kIOMainPortDefault
      |                   ^
libavdevice/avfoundation.m:927:38: note: enclose 'kIOMainPortDefault' in an @available check to silence this warning
  927 |     if (IOServiceGetMatchingServices(AVF_IO_MAIN_PORT_DEFAULT,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
928 | IOServiceMatching("IOUSBHostDevice"), &iterator) != KERN_SUCCESS)
  929 |         return nil;
      |
libavdevice/avfoundation.m:35:41: note: expanded from macro 'AVF_IO_MAIN_PORT_DEFAULT'
   35 | #       define AVF_IO_MAIN_PORT_DEFAULT kIOMainPortDefault
      |                                         ^~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [libavdevice/avfoundation.o] Error 1
--------

Cheers,
  K. C.

P.S.: I go by KC, trying to avoid the Spaceballs Dark Helmet mixup.

--
regards Helmut K. C. Tessarek              KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to