baldand / py-metal-compute

A python library to run metal compute kernels on macOS
MIT License
68 stars 11 forks source link

Build failure with clang14 on MacOS 13 #23

Closed baldand closed 1 year ago

baldand commented 1 year ago

Trying to run python3 -m pip install . with clang 14 on MacOS 13.3 fails with an assertion in ld:

      0  0x102a040c0  __assert_rtn + 140
      1  0x102a0d230  ld::tool::SymbolTableAtom<arm64>::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0
      2  0x102917b08  ld::tool::SymbolTableAtom<arm64>::classicOrdinalForProxy(ld::Atom const*) + 248
      3  0x102917070  ld::tool::SymbolTableAtom<arm64>::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 204
      4  0x10291670c  ld::tool::SymbolTableAtom<arm64>::encode() + 420
      5  0x10290323c  ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke_3 + 36
      6  0x18a7e2874  _dispatch_call_block_and_release + 32
      7  0x18a7e4400  _dispatch_client_callout + 20
      8  0x18a7f60c8  _dispatch_root_queue_drain + 956
      9  0x18a7f66c0  _dispatch_worker_thread2 + 164
      10  0x18a990038  _pthread_wqthread + 228
      A linker snapshot was created at:
          /tmp/metalcompute.cpython-39-darwin.so-2023-04-15-142210.ld-snapshot
      ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5133.
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/clang' failed with exit code 1

Clang version:

% clang -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin