Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find protocol declaration for AVCapturePhotoOutputReadinessCoordinatorDelegate #572

Closed
totaam opened this issue Oct 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@totaam
Copy link

totaam commented Oct 3, 2023

pyobjc-AVFoundation 10.0:

/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=12 -I/Users/totaam/gtk/inst/include -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Users/totaam/gtk/inst/include -arch arm64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/Users/totaam/gtk/inst/include/python3.11 -c Modules/_AVFoundation.m -o /Users/totaam/.cache/jhbuild/build/pyobjc-framework-AVFoundation-10.0/temp.macosx-12-arm64-cpython-311/Modules/_AVFoundation.o -DPyObjC_BUILD_RELEASE=1303 -Werror
In file included from Modules/_AVFoundation.m:12:
Modules/_AVFoundation_protocols.m:80:28: error: cannot find protocol declaration for 'AVCapturePhotoOutputReadinessCoordinatorDelegate'
    p = PyObjC_IdToPython(@protocol(AVCapturePhotoOutputReadinessCoordinatorDelegate));
                           ^
1 error generated.

AVCapturePhotoOutputReadinessCoordinatorDelegate is documented as being available in MacOS 14+ and I am building on MacOS 12 with SDK compatibility also set to 12. (-mmacosx-version-min=12)
XCode 14.2

As a workaround, I edited the Modules/_AVFoundation.m version check to skip this function.

@totaam totaam added the bug Something isn't working label Oct 3, 2023
@ronaldoussoren
Copy link
Owner

That's due to a copy&paste error in the AVFoundation bindings. Wil be fixed in the next release.

Thanks for your report!

ronaldoussoren added a commit that referenced this issue Nov 27, 2023
cpatulea added a commit to cpatulea/gtk-osx-build that referenced this issue Feb 7, 2024
Fixes build failure:
2024-02-07T00:13:44.1632550Z In file included from Modules/_AVFoundation.m:12:
2024-02-07T00:13:44.1634070Z Modules/_AVFoundation_protocols.m:80:28: error: cannot find protocol declaration for 'AVCapturePhotoOutputReadinessCoordinatorDelegate'
2024-02-07T00:13:44.1635400Z     p = PyObjC_IdToPython(@protocol(AVCapturePhotoOutputReadinessCoordinatorDelegate));
2024-02-07T00:13:44.1636240Z                            ^
2024-02-07T00:13:44.1667560Z 1 error generated.
2024-02-07T00:13:44.1769500Z error: command '/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit code 1
2024-02-07T00:13:44.2675810Z *** Error during phase build of python3-pyobjc-framework-avfoundation: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/pyobjc-framework-AVFoundation-10.0 *** [101/137]

CI log: https://github.com/cpatulea/gtk-osx-build/actions/runs/7806902536/job/21294198714

Issue: ronaldoussoren/pyobjc#572

Cc: Xpra-org/xpra#4017
cpatulea added a commit to cpatulea/gtk-osx-build that referenced this issue Feb 8, 2024
Fixes build failure:
2024-02-07T00:13:44.1632550Z In file included from Modules/_AVFoundation.m:12:
2024-02-07T00:13:44.1634070Z Modules/_AVFoundation_protocols.m:80:28: error: cannot find protocol declaration for 'AVCapturePhotoOutputReadinessCoordinatorDelegate'
2024-02-07T00:13:44.1635400Z     p = PyObjC_IdToPython(@protocol(AVCapturePhotoOutputReadinessCoordinatorDelegate));
2024-02-07T00:13:44.1636240Z                            ^
2024-02-07T00:13:44.1667560Z 1 error generated.
2024-02-07T00:13:44.1769500Z error: command '/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit code 1
2024-02-07T00:13:44.2675810Z *** Error during phase build of python3-pyobjc-framework-avfoundation: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/pyobjc-framework-AVFoundation-10.0 *** [101/137]

CI log: https://github.com/cpatulea/gtk-osx-build/actions/runs/7806902536/job/21294198714

Issue: ronaldoussoren/pyobjc#572

Cc: Xpra-org/xpra#4017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants