Skip to content

Commit

Permalink
Help: Why is this WIP Bevy platform failing?
Browse files Browse the repository at this point in the history
This seems related to rust-lang/rust#91372 .

Without `resolver = "2"`:

```
[nix-shell:~/code/clones/roc]$ cargo run examples/hello-rust/Hello.roc
    Finished dev [unoptimized + debuginfo] target(s) in 0.28s
     Running `target/debug/roc examples/hello-rust/Hello.roc`
thread '<unnamed>' panicked at 'Failed to rebuild src/lib.rs - stderr of the `cargo build` command was:
    Updating crates.io index
   Compiling libc v0.2.116
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.36
   ...
   Compiling gilrs v0.8.2
   Compiling gltf-json v0.16.0
   Compiling wgpu-hal v0.12.4
error: DX12 API enabled on non-Windows OS. If your project is not using resolver="2" in Cargo.toml, it should.
  --> /Users/jan/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.12.4/src/lib.rs:53:1
   |
53 | compile_error!("DX12 API enabled on non-Windows OS. If your project is not using resolver=\"2\" in Cargo.toml, it should.");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `super::dx12`
  --> /Users/jan/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.12.4/src/lib.rs:68:20
   |
68 |     pub use super::dx12::Api as Dx12;
   |                    ^^^^ could not find `dx12` in the crate root

   Compiling hexasphere v6.0.0
   Compiling bevy_macro_utils v0.6.0
For more information about this error, try `rustc --explain E0432`.
error: could not compile `wgpu-hal` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
', compiler/build/src/link.rs:984:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', cli/src/build.rs:235:50
🔨 Rebuilding host...
[nix-shell:~/code/clones/roc]$
```

With `resolver = "2"`:

```
[nix-shell:~/code/clones/roc]$ cargo run examples/hello-rust/Hello.roc
    Finished dev [unoptimized + debuginfo] target(s) in 0.86s
     Running `target/debug/roc examples/hello-rust/Hello.roc`
🔨 Rebuilding host... Done!
Undefined symbols for architecture x86_64:
  "_AudioComponentFindNext", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit14new_with_flags17heb6ec65f112e010bE in host.o
  "_AudioComponentInstanceDispose", referenced from:
      __ZN74_$LT$coreaudio..audio_unit..AudioUnit$u20$as$u20$core..ops..drop..Drop$GT$4drop17h75c103dc6ced4686E in host.o
  "_AudioComponentInstanceNew", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit14new_with_flags17heb6ec65f112e010bE in host.o
  "_AudioObjectGetPropertyData", referenced from:
      __ZN4cpal4host9coreaudio5macos9enumerate13audio_devices17haf753430364e01ffE in host.o
      __ZN4cpal4host9coreaudio5macos9enumerate20default_input_device17h2d1534837211f2f8E in host.o
      __ZN4cpal4host9coreaudio5macos9enumerate21default_output_device17h083911c236280accE in host.o
      __ZN4cpal4host9coreaudio5macos6Device4name17h68e2f994f5671fa5E in host.o
      __ZN4cpal4host9coreaudio5macos6Device17supported_configs17h11dc942236696a63E in host.o
      __ZN4cpal4host9coreaudio5macos6Device14default_config17hdbd3efef31ad18f9E in host.o
      __ZN4cpal4host9coreaudio5macos6Device22build_input_stream_raw13rate_listener17h0d393e1cb81ceb75E in host.o
      ...
  "_AudioObjectGetPropertyDataSize", referenced from:
      __ZN4cpal4host9coreaudio5macos9enumerate13audio_devices17haf753430364e01ffE in host.o
      __ZN4cpal4host9coreaudio5macos6Device17supported_configs17h11dc942236696a63E in host.o
  "_AudioOutputUnitStart", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit5start17h3f1dd3512794e2c6E in host.o
  "_AudioOutputUnitStop", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit4stop17h8195cacdfa008254E in host.o
  "_AudioUnitGetProperty", referenced from:
      __ZN9coreaudio10audio_unit12get_property17hcf8e3ea3616b46c8E in host.o
      __ZN9coreaudio10audio_unit12get_property17h521e60fcc0df83d1E in host.o
      __ZN9coreaudio10audio_unit12get_property17hbd4c129c859bc308E in host.o
  "_AudioUnitInitialize", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit14new_with_flags17heb6ec65f112e010bE in host.o
      __ZN9coreaudio10audio_unit9AudioUnit10initialize17hb6a2c15df5611a8bE in host.o
  "_AudioUnitSetProperty", referenced from:
      __ZN9coreaudio10audio_unit12set_property17h7ac04f580fde2d6bE in host.o
      __ZN9coreaudio10audio_unit12set_property17h7fe7a189aa012be8E in host.o
      __ZN9coreaudio10audio_unit12set_property17h4c55c6b1a7e57f73E in host.o
      __ZN9coreaudio10audio_unit12set_property17he956119f0b29327cE in host.o
  "_AudioUnitUninitialize", referenced from:
      __ZN9coreaudio10audio_unit9AudioUnit12uninitialize17h3386111a26093dcbE in host.o
      __ZN74_$LT$coreaudio..audio_unit..AudioUnit$u20$as$u20$core..ops..drop..Drop$GT$4drop17h75c103dc6ced4686E in host.o
  "_CFStringGetCString", referenced from:
      __ZN4cpal4host9coreaudio5macos6Device4name17h68e2f994f5671fa5E in host.o
  "_CFStringGetCStringPtr", referenced from:
      __ZN4cpal4host9coreaudio5macos6Device4name17h68e2f994f5671fa5E in host.o
ld: symbol(s) not found for architecture x86_64

[nix-shell:~/code/clones/roc]$
```
  • Loading branch information
JanCVanB committed Jan 30, 2022
1 parent 0c5f9ff commit 88c94bf
Show file tree
Hide file tree
Showing 3 changed files with 3,476 additions and 6 deletions.

0 comments on commit 88c94bf

Please sign in to comment.