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

Build fails to get dependencies on macOS 10.14.6 #28

Open
fu5ha opened this issue Oct 23, 2020 · 8 comments
Open

Build fails to get dependencies on macOS 10.14.6 #28

fu5ha opened this issue Oct 23, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@fu5ha
Copy link
Member

fu5ha commented Oct 23, 2020

Details: EmbarkStudios/rust-gpu#123

Device:

  • OS: macOS 10.14.6

Additional context
This is pulling the moltenvk-1.1.0 branch

@fu5ha fu5ha added the bug Something isn't working label Oct 23, 2020
@repi
Copy link
Contributor

repi commented Oct 23, 2020

Linking with draft PR #25 (which is the moltenvk-1.1.0 branch) as this is not something that has been merged in yet, due to other problems as well with MoltenVK.

@MarnixKuijs
Copy link
Member

I have made some commits to the moltenvk-1.1.0 branch and the example compiles fine for me, but I'm on 10.15.7. Give it a go again and see if it will work for you now as well.

@fu5ha
Copy link
Member Author

fu5ha commented Nov 3, 2020

Still failing for me

error: failed to run custom build command for `ash-molten v0.6.0+43 (https://github.com/EmbarkStudios/ash-molten?branch=moltenvk-1.1.0#9b301046)`

Caused by:
  process didn't exit successfully: `/Users/gray/Code/rust-gpu/target/debug/build/ash-molten-47b38550fede2767/build-script-build` (exit code: 101)
  --- stdout
  Already up to date.

  ========== Retrieving MoltenVK dependencies into External ==========

  ========== Cereal ==========

  cereal repo: https://github.com/USCiLab/cereal.git
  cereal revision: 51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4
  Fetching origin

  ========== Vulkan-Headers ==========

  Vulkan-Headers repo: https://github.com/KhronosGroup/Vulkan-Headers.git
  Vulkan-Headers revision: 7f9879b1b1fab53f719a9ed5e6e29533b10972b2
  Fetching origin

  ========== SPIRV-Cross ==========

  SPIRV-Cross repo: https://github.com/KhronosGroup/SPIRV-Cross.git
  SPIRV-Cross revision: e6f5ce6b8998f551f3400ad743b77be51bbe3019
  Fetching origin

  ========== glslang and SPIRV-Tools ==========

  glslang repo: https://github.com/KhronosGroup/glslang.git
  glslang revision: bacaef3237c515e40d1a24722be48c0a0b30f75f
  Fetching origin
  0a1fb588cd365f7737cb121fdd64553923e0cef6
  060627f0b0d2fa8581b5acb939f46e3b9e500593
  Change directory to .
  Get spirv-tools

  In External/spirv-tools: ['git', 'remote']
  known-good
  origin

  In External/spirv-tools: ['git', 'checkout', u'0a1fb588cd365f7737cb121fdd64553923e0cef6']

  Get spirv-tools/external/spirv-headers

  In External/spirv-tools/external/spirv-headers: ['git', 'remote']
  known-good
  origin

  In External/spirv-tools/external/spirv-headers: ['git', 'checkout', u'060627f0b0d2fa8581b5acb939f46e3b9e500593']


  ========== Vulkan-Tools ==========

  Vulkan-Tools repo: https://github.com/KhronosGroup/Vulkan-Tools.git
  Vulkan-Tools revision: 2bfd6a752dc6cb26ceda4ec9d56e7dce98527680
  Fetching origin

  ========== VulkanSamples ==========

  VulkanSamples repo: https://github.com/LunarG/VulkanSamples.git
  VulkanSamples revision: a1fe1176690ec2574deb4dd3be6c4e62d1f5d186
  Fetching origin

  ========== Started building dependency libraries at 10:46:26 AM ==========
  Please be patient on first build
  Building external libraries for macOS
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  Completed building external libraries for macOS
  xcframework successfully written out to: /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/External/build/Release/SPIRVCross.xcframework
  xcframework successfully written out to: /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/External/build/Release/SPIRVTools.xcframework
  xcframework successfully written out to: /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/External/build/Release/glslang.xcframework
  ========== Finished at 11:02:31 AM ==========
  xcodebuild build -quiet -project "MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package (macOS only)"
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  still building MoltenVK
  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1283:42: warning: undeclared selector 'addPresentedHandler:' [-Wundeclared-selector]
                  if ([_mtlDrawable respondsToSelector: @selector(addPresentedHandler:)]) {
                                                         ^
  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1287:52: error: property 'presentedTime' not found on object of type 'id<MTLDrawable>'
                                  CFTimeInterval presentedTimeSeconds = drawable.presentedTime;
                                                                                 ^
  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1285:18: warning: instance method '-addPresentedHandler:' not found (return type defaults to 'id') [-Wobjc-method-access]
                          [_mtlDrawable addPresentedHandler: ^(id<MTLDrawable> drawable) {
                                        ^~~~~~~~~~~~~~~~~~~
  2 warnings and 1 error generated.
  note: Using new build system
  note: Planning build
  note: Constructing build description

  --- stderr
  From https://github.com/USCiLab/cereal
     3e4d1b84..562321c3  master     -> origin/master
  HEAD is now at 51cbda5f Merge branch 'develop' for release 1.2.2
  From https://github.com/KhronosGroup/Vulkan-Headers
     320af06..87451c5  master     -> origin/master
   * [new tag]         v1.2.159   -> v1.2.159
  HEAD is now at 7f9879b Update for Vulkan-Docs 1.2.154
  From https://github.com/KhronosGroup/SPIRV-Cross
     a57b4b1b..fc644b50  master     -> origin/master
  HEAD is now at e6f5ce6b Merge pull request #1471 from KhronosGroup/fix-1467
  From https://github.com/KhronosGroup/glslang
     3b334b2b..d550bebe  master     -> origin/master
   * [new tag]           10-11.0.0  -> 10-11.0.0
  HEAD is now at bacaef32 Update spirv-tools and spirv-headers known goods (#2401)
  HEAD is now at 0a1fb588 Update CHANGES
  HEAD is now at 060627f Register the ANGLE compiler (#168)
  From https://github.com/KhronosGroup/Vulkan-Tools
     ee0de094..51c1c5ab  master     -> origin/master
   * [new tag]           v1.2.158   -> v1.2.158
  HEAD is now at 2bfd6a75 vulkaninfo: Add json output for portability subset
  HEAD is now at a1fe11766 Update to 1.2.154 headers
  ** BUILD FAILED **

  make: *** [macos] Error 65
  thread 'main' panicked at 'failed to fetchDependencies', /Users/gray/.cargo/git/checkouts/ash-molten-2e22393c7b19b606/9b30104/build.rs:107:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/gray/Code/rust-gpu/target/debug/build/spirv-tools-sys-dedf52f62e2aa81b/out/libspirv-tools.a(pch_source_opt.o) has no symbols

@MarnixKuijs
Copy link
Member

  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1283:42: warning: undeclared selector 'addPresentedHandler:' [-Wundeclared-selector]
                  if ([_mtlDrawable respondsToSelector: @selector(addPresentedHandler:)]) {
                                                         ^
  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1287:52: error: property 'presentedTime' not found on object of type 'id<MTLDrawable>'
                                  CFTimeInterval presentedTimeSeconds = drawable.presentedTime;
                                                                                 ^
  /Users/gray/Code/rust-gpu/target/debug/build/ash-molten-86dfc2a28855154e/out/MoltenVK-v1.1.0/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm:1285:18: warning: instance method '-addPresentedHandler:' not found (return type defaults to 'id') [-Wobjc-method-access]
                          [_mtlDrawable addPresentedHandler: ^(id<MTLDrawable> drawable) {

The problem is your macOS version MoltenVK depends on api's that Metal provides only in 10.15+. Maybe it is possible to just upgrade the Metal libs although I doubt that is possible without upgrading your OS

@MarnixKuijs
Copy link
Member

One thing you can also try is to see if you can force TARGET_OS_SIMULATOR and see if that allows you to build on macOS 10.14

@repi
Copy link
Contributor

repi commented Nov 5, 2020

Ah right Catalina is required right, would be nice to detect Mac OS version in build.rs and fail on it there instead of in the C++ compilation. Probably is way to do that reasonably easily? Will help us when Big Sur later on becomes required.

@termhn any potential issues for you to upgrade to Catalina (or Big Sur soon)?

@fu5ha
Copy link
Member Author

fu5ha commented Nov 5, 2020

I think I could... my macbook's getting a little old but I don't think they're unsupporting it or anything at least through Big Sur's release cycle. But yeah would be nice to error or at least document that 10.15 is required.

@repi
Copy link
Contributor

repi commented Nov 9, 2020

Filed #30

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

3 participants