fintelia / terra

A large scale terrain rendering library written in Rust
Apache License 2.0
504 stars 14 forks source link

macOS Panic: unsupported instruction IAddCarry #25

Open HulloImJay opened 2 years ago

HulloImJay commented 2 years ago

I'm a newb but am trying to test terra on a Mac. However, I keep hitting the following error.

jasonbond@Jays-2018-PoS terra-main % export RUST_BACKTRACE=full

jasonbond@Jays-2018-PoS terra-main % cargo run                 
    Finished dev [optimized + debuginfo] target(s) in 0.25s
     Running `target/debug/preview`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: unsupported instruction IAddCarry at Function', src/cache/generators.rs:344:58
stack backtrace:
   0:        0x10699a512 - std::backtrace_rs::backtrace::libunwind::trace::h95efb3c30cc8d3eb
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x10699a512 - std::backtrace_rs::backtrace::trace_unsynchronized::hf55232b46c2b2a5c
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x10699a512 - std::sys_common::backtrace::_print_fmt::hd000e024c6701252
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
   3:        0x10699a512 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4cae82d438451481
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
   4:        0x1069bd4bb - core::fmt::write::hb68c3045179d0cad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
   5:        0x106992e9e - std::io::Write::write_fmt::haf84c797e63d79f0
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
   6:        0x10699ccd0 - std::sys_common::backtrace::_print::h4051b3c764203017
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
   7:        0x10699ccd0 - std::sys_common::backtrace::print::h946847bf78a6f565
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
   8:        0x10699ccd0 - std::panicking::default_hook::{{closure}}::he18137441e51da1f
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
   9:        0x10699c9b6 - std::panicking::default_hook::ha3efe84526f027fa
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
  10:        0x10699d42d - std::panicking::rust_panic_with_hook::h429a7ddefa5f0258
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17
  11:        0x10699d153 - std::panicking::begin_panic_handler::{{closure}}::h9b033a6b15b84a74
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
  12:        0x10699a9a7 - std::sys_common::backtrace::__rust_end_short_backtrace::hcdd3bec8e0e38aa6
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
  13:        0x10699ce1a - rust_begin_unwind
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
  14:        0x106a1ed73 - core::panicking::panic_fmt::hf7d6e5207e013f69
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
  15:        0x106a1ee65 - core::result::unwrap_failed::h95d9e30ede493473
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1749:5
  16:        0x105de689c - core::result::Result<T,E>::unwrap::h7beaaa78ccce0b0f
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1065:23
  17:        0x105de689c - terra::cache::generators::ShaderGenBuilder::build::ha015c3551e9939c7
                               at /Users/jasonbond/Downloads/terra-main/src/cache/generators.rs:344:21
  18:        0x105de75f7 - terra::cache::generators::generators::h7ec6e61e8f8a17af
                               at /Users/jasonbond/Downloads/terra-main/src/cache/generators.rs:377:9
  19:        0x105e76544 - terra::cache::TileCache::new::h5d58139c5b8bbb89
                               at /Users/jasonbond/Downloads/terra-main/src/cache/mod.rs:386:26
  20:        0x105e34a4f - terra::Terrain::new_impl::h4afdb89175c3e538
                               at /Users/jasonbond/Downloads/terra-main/src/lib.rs:242:21
  21:        0x105d24d45 - terra::Terrain::new::{{closure}}::hcf7ff867b5385c2d
                               at /Users/jasonbond/Downloads/terra-main/src/lib.rs:107:9
  22:        0x105d24d45 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h85d2019251692fba
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/future/mod.rs:84:19
  23:        0x105d80071 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h91a1026be7e635d0
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/park/thread.rs:263:54
  24:        0x105d80071 - tokio::coop::with_budget::{{closure}}::h8c128882b548c4fe
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:102:9
  25:        0x105d80071 - std::thread::local::LocalKey<T>::try_with::hc760851c911cf058
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/thread/local.rs:413:16
  26:        0x105d80071 - std::thread::local::LocalKey<T>::with::h3f1e9225135b9062
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/thread/local.rs:389:9
  27:        0x105d7dbb7 - tokio::coop::with_budget::h131c1b95fba2efa4
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:95:5
  28:        0x105d7dbb7 - tokio::coop::budget::h502afc47c9834604
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:72:5
  29:        0x105d7dbb7 - tokio::park::thread::CachedParkThread::block_on::h0f687051507e85d5
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/park/thread.rs:263:31
  30:        0x105d13075 - tokio::runtime::enter::Enter::block_on::h243b3c9ec0f1042b
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/enter.rs:151:13
  31:        0x105d13075 - tokio::runtime::thread_pool::ThreadPool::block_on::h0dc4d4d89fcc4045
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/thread_pool/mod.rs:81:9
  32:        0x105d760bd - tokio::runtime::Runtime::block_on::h16954caaaca9b48c
                               at /Users/jasonbond/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/mod.rs:477:43
  33:        0x105cee34c - preview::main::hbfb0b3242c4bb9a1
                               at /Users/jasonbond/Downloads/terra-main/bin/preview.rs:198:17
  34:        0x105ceda06 - core::ops::function::FnOnce::call_once::h108c26ca64d8b6ad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:227:5
  35:        0x105ceda06 - std::sys_common::backtrace::__rust_begin_short_backtrace::hba89c299e63938f2
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:122:18
  36:        0x105d6bb4c - std::rt::lang_start::{{closure}}::h639250bdb234adf6
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:145:18
  37:        0x106999c45 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h0b34a00ab870ad57
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13
  38:        0x106999c45 - std::panicking::try::do_call::hf96b04a014b00830
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
  39:        0x106999c45 - std::panicking::try::h52320e36f38e53ab
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
  40:        0x106999c45 - std::panic::catch_unwind::hfb74ccd231e67a94
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
  41:        0x106999c45 - std::rt::lang_start_internal::{{closure}}::hac12182f9ae31dd1
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48
  42:        0x106999c45 - std::panicking::try::do_call::h7607cb0e1d9db8ca
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
  43:        0x106999c45 - std::panicking::try::h5bcafddd15b2a478
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
  44:        0x106999c45 - std::panic::catch_unwind::h74f42b63c70aad90
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
  45:        0x106999c45 - std::rt::lang_start_internal::hef78d5782ed29805
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20
  46:        0x105cef629 - _main

I realise the README does not suggest mac is supported. But thought I should report this in case the fix is a simple dependency or version thing.

fintelia commented 2 years ago

Thanks for the report! I just tried the soft-float64 feature on Linux and hit the same crash. Filed https://github.com/gfx-rs/wgpu/issues/4392 and https://github.com/gfx-rs/naga/issues/1927.