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

How can I run the MacOS version of this? #67

Closed
qingy1337 opened this issue Sep 12, 2024 · 13 comments
Closed

How can I run the MacOS version of this? #67

qingy1337 opened this issue Sep 12, 2024 · 13 comments

Comments

@qingy1337
Copy link

I'm not sure how to actually run it...

@Kaydax
Copy link
Member

Kaydax commented Sep 12, 2024

By using wasabi or by compiling xsynth yourself and running the examples

@Kaydax Kaydax closed this as completed Sep 12, 2024
@qingy1337
Copy link
Author

qingy1337 commented Sep 12, 2024

Hi @Kaydax, thanks for the quick response!
I tried running wasabi and I got this error message, is this supposed to happen?

thread 'main' panicked at src/renderer.rs:45:44:
called `Result::unwrap()` on an `Err` value: LibraryLoadFailure(DlOpen { desc: "dlopen(libvulkan.1.dylib, 0x0005): tried: \'libvulkan.1.dylib\' (no such file), \'/System/Volumes/Preboot/Cryptexes/OSlibvulkan.1.dylib\' (no such file), \'/usr/lib/libvulkan.1.dylib\' (no such file, not in dyld cache), \'libvulkan.1.dylib\' (no such file)" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Edit: I tried to install Vulkan and then after I ran the script I got this:

thread 'main' panicked at src/renderer.rs:61:10:
Failed to create instance: IncompatibleDriver
stack backtrace:
   0:        0x10270764c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc0de1e130c6f75a8
   1:        0x10253bceb - core::fmt::write::hd7454a2db9b355a4
   2:        0x1026e0002 - std::io::Write::write_fmt::he0cba29e2e54b39e
   3:        0x10270bd21 - std::sys_common::backtrace::print::hc728a8c02c27951e
   4:        0x10270b4bc - std::panicking::default_hook::{{closure}}::h67d915f220aa191d
   5:        0x10270d08f - std::panicking::rust_panic_with_hook::h206fe2aca02387c5
   6:        0x10270c034 - std::panicking::begin_panic_handler::{{closure}}::hd764a9293c104dde
   7:        0x10270bf89 - std::sys_common::backtrace::__rust_end_short_backtrace::h1e8bcfafbf8ab868
   8:        0x10270bf76 - _rust_begin_unwind
   9:        0x102918755 - core::panicking::panic_fmt::hbf6282ed69c8e1fb
  10:        0x102918ba5 - core::result::unwrap_failed::hb8d7fcfb917aa825
  11:        0x102499419 - wasabi::renderer::Renderer::new::h6d2f61772e09bdea
  12:        0x1024af443 - wasabi::main::h044acfbb62430305
  13:        0x10238ca36 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2c8b9c363e783233
  14:        0x1024b9676 - _main

@Kaydax
Copy link
Member

Kaydax commented Sep 12, 2024

Hi @Kaydax, thanks for the quick response! I tried running wasabi and I got this error message, is this supposed to happen?

thread 'main' panicked at src/renderer.rs:45:44:
called `Result::unwrap()` on an `Err` value: LibraryLoadFailure(DlOpen { desc: "dlopen(libvulkan.1.dylib, 0x0005): tried: \'libvulkan.1.dylib\' (no such file), \'/System/Volumes/Preboot/Cryptexes/OSlibvulkan.1.dylib\' (no such file), \'/usr/lib/libvulkan.1.dylib\' (no such file, not in dyld cache), \'libvulkan.1.dylib\' (no such file)" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Edit: I tried to install Vulkan and then after I ran the script I got this:

thread 'main' panicked at src/renderer.rs:61:10:
Failed to create instance: IncompatibleDriver
stack backtrace:
   0:        0x10270764c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc0de1e130c6f75a8
   1:        0x10253bceb - core::fmt::write::hd7454a2db9b355a4
   2:        0x1026e0002 - std::io::Write::write_fmt::he0cba29e2e54b39e
   3:        0x10270bd21 - std::sys_common::backtrace::print::hc728a8c02c27951e
   4:        0x10270b4bc - std::panicking::default_hook::{{closure}}::h67d915f220aa191d
   5:        0x10270d08f - std::panicking::rust_panic_with_hook::h206fe2aca02387c5
   6:        0x10270c034 - std::panicking::begin_panic_handler::{{closure}}::hd764a9293c104dde
   7:        0x10270bf89 - std::sys_common::backtrace::__rust_end_short_backtrace::h1e8bcfafbf8ab868
   8:        0x10270bf76 - _rust_begin_unwind
   9:        0x102918755 - core::panicking::panic_fmt::hbf6282ed69c8e1fb
  10:        0x102918ba5 - core::result::unwrap_failed::hb8d7fcfb917aa825
  11:        0x102499419 - wasabi::renderer::Renderer::new::h6d2f61772e09bdea
  12:        0x1024af443 - wasabi::main::h044acfbb62430305
  13:        0x10238ca36 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2c8b9c363e783233
  14:        0x1024b9676 - _main

This is due to the fact wasabi uses vulkan. To fix this you must use MoltenVK

@qingy1337
Copy link
Author

qingy1337 commented Sep 12, 2024

Ok I installed Vulkan + MoltenVK and then cloned the github repo for wasabi,
then I ran cargo build inside, and everything compiled successfully, so I did cargo run and I got this:


image

Here's the full stack trace if it helps:

    Finished `dev` profile [optimized + debuginfo] target(s) in 0.13s
     Running `target/debug/wasabi`
thread 'main' panicked at src/renderer.rs:61:10:
Failed to create instance: IncompatibleDriver
stack backtrace:
   0:        0x104f1dd6c - std::backtrace_rs::backtrace::libunwind::trace::h3fd557589a424fd3
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:        0x104f1dd6c - std::backtrace_rs::backtrace::trace_unsynchronized::hb45ff62d87abc76b
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x104f1dd6c - std::sys::backtrace::_print_fmt::h514fb90f9b82299d
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/sys/backtrace.rs:66:9
   3:        0x104f1dd6c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h5da0c0bcf4540a81
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/sys/backtrace.rs:39:26
   4:        0x104f39508 - core::fmt::rt::Argument::fmt::ha42cf31d68d314f9
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/fmt/rt.rs:173:76
   5:        0x104f39508 - core::fmt::write::hc442518c0d11c769
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/fmt/mod.rs:1178:21
   6:        0x104f1b6e0 - std::io::Write::write_fmt::h4640d887c3706591
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/io/mod.rs:1823:15
   7:        0x104f1eef0 - std::sys::backtrace::BacktraceLock::print::hb4313c5cd7a1585a
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/sys/backtrace.rs:42:9
   8:        0x104f1eef0 - std::panicking::default_hook::{{closure}}::ha1be502839f1b3bb
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:266:22
   9:        0x104f1eaa0 - std::panicking::default_hook::h394ee3cb6143d98e
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:293:9
  10:        0x104f1f96c - std::panicking::rust_panic_with_hook::h21810a5296b50efc
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:797:13
  11:        0x104f1f398 - std::panicking::begin_panic_handler::{{closure}}::h2d9b7f1410f03eb5
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:671:13
  12:        0x104f1e230 - std::sys::backtrace::__rust_end_short_backtrace::hac135ace9233d8e9
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/sys/backtrace.rs:170:18
  13:        0x104f1f060 - rust_begin_unwind
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:662:5
  14:        0x104f77e18 - core::panicking::panic_fmt::hd9c82951d5167586
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/panicking.rs:74:14
  15:        0x104f78234 - core::result::unwrap_failed::h1f209c0211045964
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/result.rs:1679:5
  16:        0x1049e43c8 - core::result::Result<T,E>::expect::h10b95bfddf65e7e7
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/result.rs:1059:23
  17:        0x1049e43c8 - wasabi::renderer::Renderer::new::h00f1feb4dcd642ee
                               at /Users/qing/PycharmProjects/wasabi/src/renderer.rs:53:24
  18:        0x1049cdbb8 - wasabi::main::hd2f1f71518d042c5
                               at /Users/qing/PycharmProjects/wasabi/src/main.rs:49:24
  19:        0x1049c0074 - core::ops::function::FnOnce::call_once::h3be299a08ed2c36c
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/ops/function.rs:250:5
  20:        0x1049c0074 - std::sys::backtrace::__rust_begin_short_backtrace::hd0c07d7f4e36c73c
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/sys/backtrace.rs:154:18
  21:        0x104a7b748 - std::rt::lang_start::{{closure}}::h79e5cfed14c96fed
  22:        0x104f164ac - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb538e12eefd15c36
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/core/src/ops/function.rs:284:13
  23:        0x104f164ac - std::panicking::try::do_call::ha172f6e894134816
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:554:40
  24:        0x104f164ac - std::panicking::try::hf35c1a3f0ef2698d
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:518:19
  25:        0x104f164ac - std::panic::catch_unwind::h8c87a4466b22d2df
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panic.rs:345:14
  26:        0x104f164ac - std::rt::lang_start_internal::{{closure}}::h2d2203b7c3fa77ae
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/rt.rs:143:48
  27:        0x104f164ac - std::panicking::try::do_call::hc03ae909402d416d
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:554:40
  28:        0x104f164ac - std::panicking::try::h29ada6e0f5b99e43
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panicking.rs:518:19
  29:        0x104f164ac - std::panic::catch_unwind::hc0eea5783916ac1e
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/panic.rs:345:14
  30:        0x104f164ac - std::rt::lang_start_internal::h44094210a190f545
                               at /rustc/41dd149fd6a6a06795fc6b9f54cb49af2f61775f/library/std/src/rt.rs:143:20
  31:        0x1049cde94 - _main

@Kaydax Kaydax transferred this issue from BlackMIDIDevs/xsynth Sep 12, 2024
@Kaydax Kaydax reopened this Sep 12, 2024
@Kaydax
Copy link
Member

Kaydax commented Sep 12, 2024

Transferring this over to wasabi as this is more related to getting wasabi to run on MacOS via MoltenVK

@arduano
Copy link
Collaborator

arduano commented Sep 12, 2024

Interesting yeah, @qingy1337 fyi none of the wasabi devs use macs, we just cross-compiled to macos because Rust lets us easily do that. We are very open to mac-related code contribution if you're capable of doing that

@qingy1337
Copy link
Author

@arduano Alright, I'm a bit of a programmer myself, I can try to get familiar with this.

@arduano
Copy link
Collaborator

arduano commented Sep 12, 2024

We use the rust vulkano for running vulkan, and winit to run window management. If those can be made compatible with mac (likely vulkano is the main problem), then it should run on mac fine

@Kaydax
Copy link
Member

Kaydax commented Sep 12, 2024

We use the rust vulkano for running vulkan, and winit to run window management. If those can be made compatible with mac (likely vulkano is the main problem), then it should run on mac fine

From reading the vulkano readme and docs, it states it supports MacOS via MoltenVK just fine. So I'm not sure what the issue is. His error claims Incompatible Device, but that's not really much to go off when someone is using a mac

@qingy1337
Copy link
Author

qingy1337 commented Sep 12, 2024

I just created a PR for a fix that actually let me open wasabi, but I'm running into another error... :)

thread 'main' panicked at src/gui/window/scene/cake_system/mod.rs:158:55:
failed to create shader module: SpirvCapabilityNotSupported { capability: Geometry, reason: RequirementsNotMet(["feature `geometry_shader`"]) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at src/renderer/swapchain.rs:222:13:
SwapchainFrame not presented.
thread 'main' panicked at core/src/panicking.rs:229:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
zsh: abort      cargo run

EDIT: Apparently Geometry shaders are not supported on MacOS + Molten VK, does this mean it's impossible to run this?? :(

For context, this line of code isn't working:

let gs = gs::load(gfx_queue.device().clone()).expect("failed to create shader module");

@Kaydax
Copy link
Member

Kaydax commented Sep 12, 2024

@qingy1337 Your PR disables geometry shaders, which is required to run wasabi as our shaders depend on it

@qingy1337
Copy link
Author

qingy1337 commented Sep 12, 2024

@Kaydax OK, maybe I can find a workaround for this, thanks for letting me know!

Edit: maybe it's time to switch back to Windows ha ha...

@qingy1337
Copy link
Author

qingy1337 commented Sep 13, 2024

Ok I just got a Windows VM :) this is me running Piano from Above, although it is pretty slow, I'm gonna try and get wasabi running on this guy.

Update: Oof, I cannot use Vulkan on a Windows VM...., I did get Kiva running tho and it's alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants