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

NSBezierPathElementCurveTo deprecation errors when building pyobjc-framework-Cocoa #595

Closed
mrpippy opened this issue Feb 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mrpippy
Copy link

mrpippy commented Feb 23, 2024

Describe the bug
When building pyobjc-framework-Cocoa, I get the following build errors:

$ <path to Python.framework>/Versions/Current/bin/python3 setup.py build_ext -j `sysctl -n hw.activecpu`
gcc -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -isysroot /Applications/Xcode15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -I/Users/pip/bug-pocs/pyobjc/build/../Frameworks/Python.framework/Versions/3.11/include/python3.11 -c Modules/_AppKit.m -o build/temp.macosx-14.3-universal2-cpython-311/Modules/_AppKit.o -DPyObjC_BUILD_RELEASE=1402 -Werror
In file included from Modules/_AppKit.m:14:
Modules/_AppKit_nsbezierpath.m:64:10: error: 'NSBezierPathElementCurveTo' is deprecated: first deprecated in macOS 14.0 [-Werror,-Wdeprecated-declarations]
    case NSBezierPathElementCurveTo:
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         NSBezierPathElementCubicCurveTo
/Applications/Xcode15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSBezierPath.h:41:5: note: 'NSBezierPathElementCurveTo' has been explicitly marked deprecated here
    NSBezierPathElementCurveTo API_DEPRECATED_WITH_REPLACEMENT("NSBezierPathElementCubicCurveTo", macos(11.0, 14.0)) = NSBezierPathElementCubicCurveTo,
    ^
In file included from Modules/_AppKit.m:14:
Modules/_AppKit_nsbezierpath.m:240:16: error: 'NSBezierPathElementCurveTo' is deprecated: first deprecated in macOS 14.0 [-Werror,-Wdeprecated-declarations]
          case NSBezierPathElementCurveTo:
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               NSBezierPathElementCubicCurveTo
/Applications/Xcode15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSBezierPath.h:41:5: note: 'NSBezierPathElementCurveTo' has been explicitly marked deprecated here
    NSBezierPathElementCurveTo API_DEPRECATED_WITH_REPLACEMENT("NSBezierPathElementCubicCurveTo", macos(11.0, 14.0)) = NSBezierPathElementCubicCurveTo,
    ^
2 errors generated.

Platform information

  • Python 3.11.8, installed from source
  • macOS 14.3.1, Xcode 15.2
@mrpippy mrpippy added the bug Something isn't working label Feb 23, 2024
@ronaldoussoren
Copy link
Owner

I don't get this warning/error on my system, and don't understand why. Could you check which compiler is used (e.g. which gcc)?

Could you check if you still get the error on the current tip of the tree (which includes a prospective fix that I just pushed).

@ronaldoussoren
Copy link
Owner

One more question out of interest: What is your use case for building from source? I also provide binary wheels on PyPI.

@mrpippy
Copy link
Author

mrpippy commented Feb 27, 2024

Thanks for the quick reply! Your latest commit does fix the issue.

gcc was pointing to ccache installed through Homebrew, but removing that from PATH did not make a difference.
Are you still running macOS 13, or maybe MACOSX_DEPLOYMENT_TARGET is defined?

And we don't have a specific reason for building from source, but we build the rest of our product from source, it's easy to mirror the Git repo locally, and makes it really easy to test out new versions.

@mrpippy mrpippy closed this as completed Feb 27, 2024
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