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

Errors building on OS X 10.11 #552

Closed
ryandesign opened this issue Apr 29, 2023 · 10 comments
Closed

Errors building on OS X 10.11 #552

ryandesign opened this issue Apr 29, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@ryandesign
Copy link
Contributor

Describe the bug
PyObjC 9.0.1 doesn't build for me on OS X 10.11.6 using MacPorts. The errors are:

Modules/_SafariServices.m:7:9: fatal error: 'SafariServices/SafariServices.h' file not found
#import <SafariServices/SafariServices.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modules/_GameplayKit_protocols.m:14:28: error: cannot find protocol declaration for 'GKSceneRootNodeType'
    p = PyObjC_IdToPython(@protocol(GKSceneRootNodeType));
                           ^
Modules/_SceneKit.m:77:5: error: use of undeclared identifier 'simd_float4x4'
    simd_float4x4 result;
    ^
Modules/_SceneKit.m:83:5: error: use of undeclared identifier 'result'
    result = SCNMatrix4ToMat4(arg);
    ^
Modules/_SceneKit.m:85:61: error: use of undeclared identifier 'result'
    return PyObjC_ObjCToPython("{_simd_float4x4=[4<4f>]}", &result);
                                                            ^
Modules/_SceneKit.m:92:5: error: use of undeclared identifier 'simd_float4x4'
    simd_float4x4 arg;
    ^
Modules/_SceneKit.m:94:66: error: use of undeclared identifier 'arg'; did you mean 'carg'?
    if (PyObjC_PythonToObjC("{_simd_float4x4=[4<4f>]}", vector, &arg) == -1) {
                                                                 ^~~
                                                                 carg
Modules/_SceneKit.m:98:33: error: use of undeclared identifier 'arg'
    result = SCNMatrix4FromMat4(arg);
                                ^
Modules/_ModelIO_protocols.m:6:28: error: cannot find protocol declaration for 'MDLLightProbeIrradianceDataSource'
    p = PyObjC_IdToPython(@protocol(MDLLightProbeIrradianceDataSource));
                           ^
Modules/objc/helpers-vector.m:10:9: fatal error: 'MetalPerformanceShaders/MetalPerformanceShaders.h' file not found
#import <MetalPerformanceShaders/MetalPerformanceShaders.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Platform information

  • Python version: 3.10.11
  • How was python installed: MacPorts
  • macOS version: 10.11.6

To Reproduce
Build PyObjC

Expected behavior
Successful build

Additional context
Also reported to MacPorts by another user here: https://trac.macports.org/ticket/66550

@ryandesign ryandesign added the bug Something isn't working label Apr 29, 2023
@ronaldoussoren
Copy link
Owner

Oops, closed too soon. I've only fixed the problem with SafariServices so far. I'll look into the other problems later on (and will have to find my 10.11 VM to test most of the required changes)

@ronaldoussoren
Copy link
Owner

BTW. Installing pyobjc through pip should use wheels that work on 10.11 as well.

@ronaldoussoren
Copy link
Owner

I've done some updates based on the compile errors and checking the documentation, but haven't tested the result on a 10.11 system yet.

@ronaldoussoren
Copy link
Owner

I'm slowly working my way through a number of errors when building with Xcode 7.3.1 on macOS 10.11.

@schriftgestalt
Copy link

I can’t install 9.1.X with pip on macOS 12. I get this:

× Building wheel for pyobjc-framework-libxpc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      running bdist_wheel
      running build
      running build_py
      overriding build_packages to copy PyObjCTest
      creating build
      creating build/lib.macosx-12.6-arm64-cpython-312
      creating build/lib.macosx-12.6-arm64-cpython-312/xpc
      copying Lib/xpc/_metadata.py -> build/lib.macosx-12.6-arm64-cpython-312/xpc
      copying Lib/xpc/__init__.py -> build/lib.macosx-12.6-arm64-cpython-312/xpc
      creating build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_activity.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_debug.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_session.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_connection.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/__init__.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_xpc.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_endpoint.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      copying PyObjCTest/test_rich_error.py -> build/lib.macosx-12.6-arm64-cpython-312/PyObjCTest
      running build_ext
      building 'xpc._xpc' extension
      creating build/temp.macosx-12.6-arm64-cpython-312
      creating build/temp.macosx-12.6-arm64-cpython-312/Modules
      gcc -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/_xpc.m -o build/temp.macosx-12.6-arm64-cpython-312/Modules/_xpc.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -DPyObjC_BUILD_RELEASE=1203 -Werror
      Modules/_xpc.m:317:9: error: use of undeclared identifier 'XPC_TYPE_SESSION'
          t = XPC_TYPE_SESSION;
              ^
      Modules/_xpc.m:321:9: error: use of undeclared identifier 'XPC_TYPE_RICH_ERROR'
          t = XPC_TYPE_RICH_ERROR;
              ^
      2 errors generated.
      error: command '/usr/bin/gcc' failed with exit code 1

@ronaldoussoren
Copy link
Owner

I can’t install 9.1.X with pip on macOS 12. I get this:

I have a patch that's 99% ready and will likely commit that tomorrow.

In general: Try to use the binary wheels or build on the latest macOS release to get the highest level of functionality and performance. That's especially relevant if you want to deploy to newer versions of the OS.

ronaldoussoren added a commit that referenced this issue May 4, 2023
This fixes some build errors on macOS 10.11 and also fixes a number
of issues with the test suite that resulted in test failures when
doing a full test run (with python 3.11).

There are a number of edge cases where test failures are suppressed
at the moment (such as handling proxying 2**64 to an NSNumber), those
will be fixed later and shouldn't affect user code.
@ronaldoussoren
Copy link
Owner

The current tip of tree should now work on 10.11. I haven't tested this version on macOS 13 yet, but don't expect major issues there.

Hopefully I'll have some time over the summer to work on automating testing over a number of test VMs, to make it easier to verify that the code works on all supported releases (both for from-source builds as for the binary wheels). Until then I'll have to rely on reports like this to detect problems with older versions of the OS as I no longer have a use case for running older OS versions myself.

@lpagani91
Copy link

Hi, Ronald, presently (end of Sept. 23) it still does not build on OS X 10.12 for me via MacPorts but it builds on 10.14.

@ryandesign
Copy link
Contributor Author

@lpagani91 What version? This bug report was about version 9.0.1 and the problem is supposed to have been fixed in 9.2.

@lpagani91
Copy link

lpagani91 commented Sep 26, 2023 via email

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

4 participants