TanTanDev / DigEscape

A game written in Rust, compilable to webbassembly
Apache License 2.0
89 stars 3 forks source link

Doesn't compile on Ubuntu 18.04 - src/audio.rs:4:5 no 'decoder' in the root #5

Open PJaros opened 2 years ago

PJaros commented 2 years ago

I tried to compile it to run it locally on my Ubuntu 18.04. This errors out on the gwg audio part. Do I miss some dev-packages? Or is this releated to the rust version?

$ rustc --version
rustc 1.62.1 (e092d0b6b 2022-07-16)
$ git clone https://github.com/TanTanDev/DigEscape.git
$ cd DigEscape/
$ cargo c
    Updating git repository `https://github.com/TanTanDev/good-web-game`
    Updating crates.io index
    Updating git repository `https://github.com/not-fl3/miniquad_text_rusttype`
    Updating git repository `https://github.com/not-fl3/quad-snd`
    Checking nodrop v0.1.14
    Checking ttf-parser v0.6.2
    Checking libc v0.2.126
    Checking num-traits v0.1.43
    Checking arrayvec v0.4.12
    Checking euclid v0.18.2
    Checking sid v0.5.2
    Checking getrandom v0.1.16
    Checking rand_os v0.1.3
    Checking sapp-linux v0.1.7
    Checking filetime v0.2.17
    Checking quad-alsa-sys v0.3.2
    Checking lyon_geom v0.11.1
    Checking rand v0.6.5
    Checking rand_core v0.5.1
    Checking tar v0.4.38
    Checking owned_ttf_parser v0.6.0
    Checking quad-snd v0.2.3 (https://github.com/not-fl3/quad-snd#ccdbe8be)
    Checking rand_chacha v0.2.2
    Checking lyon_path v0.11.0
    Checking rusttype v0.9.2
    Checking cgmath v0.17.0
    Checking rand v0.7.3
    Checking miniquad v0.2.55
    Checking lyon_algorithms v0.11.2
    Checking lyon_tessellation v0.11.0
    Checking miniquad_text_rusttype v0.1.2 (https://github.com/not-fl3/miniquad_text_rusttype#bd4477a3)
    Checking lyon v0.11.0
    Checking rand_distr v0.2.2
    Checking nalgebra v0.20.0
    Checking good-web-game v0.2.5 (https://github.com/TanTanDev/good-web-game?branch=audio#2685d96e)
error[E0432]: unresolved imports `quad_snd::decoder`, `quad_snd::mixer::Sound`, `quad_snd::mixer::SoundMixer`
 --> /home/jarop/.cargo/git/checkouts/good-web-game-af1e58d1707853cb/2685d96/src/audio.rs:4:5
  |
4 |     decoder,
  |     ^^^^^^^ no `decoder` in the root
5 |     mixer::{Sound, SoundMixer},
  |             ^^^^^  ^^^^^^^^^^ no `SoundMixer` in `mixer`
  |             |
  |             no `Sound` in `mixer`

error[E0603]: module `mixer` is private
  --> /home/jarop/.cargo/git/checkouts/good-web-game-af1e58d1707853cb/2685d96/src/audio.rs:5:5
   |
5  |     mixer::{Sound, SoundMixer},
   |     ^^^^^ private module
   |
note: the module `mixer` is defined here
  --> /home/jarop/.cargo/git/checkouts/quad-snd-acc920ee6996f98e/ccdbe8b/src/lib.rs:30:1
   |
30 | mod mixer;
   | ^^^^^^^^^^

error[E0282]: type annotations needed
  --> /home/jarop/.cargo/git/checkouts/good-web-game-af1e58d1707853cb/2685d96/src/audio.rs:18:41
   |
18 |             mixer: Rc::new(RefCell::new(None)),
   |                                         ^^^^ cannot infer type for type parameter `T` declared on the enum `Option`

Some errors have detailed explanations: E0282, E0432, E0603.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `good-web-game` due to 3 previous errors
Terria-K commented 2 years ago

Same here, but on Windows. quad_snd crate makes a breaking change and removed Sound, SoundMixer and decoder.