KieronJ / rpsx

A PlayStation emulator written in Rust.
MIT License
42 stars 2 forks source link

Unable to build on macOS 12.5 #1

Closed DannyJJK closed 2 years ago

DannyJJK commented 2 years ago

Version: rpsx v0.1.0 (https://github.com/KieronJ/rpsx#21337bd2) OS: macOS Monterey 12.5 (21G72) Hardware: MacBook Pro (13-inch, 2019)

I installed this by running the following command: cargo install --git https://github.com/KieronJ/rpsx

It got to a certain point in the build where I got an error because cmake didn't exist on my system, so I installed it and tried the build again. Then I got the following errors:

   Compiling rpsx v0.1.0 (/Users/dannykirkham/.cargo/git/checkouts/rpsx-3d4ba052e04d3412/21337bd)
error: couldn't read src/..\shaders\shader.frag: No such file or directory (os error 2)
  --> src/frontend.rs:63:74
   |
63 | ...   let fragment_shader = shader_from_source(&std::ffi::CString::new(include_str!("..\\shaders\\shader.frag")).unwrap(), gl::FRAGMENT_S...
   |                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read src/..\shaders\shader.vert: No such file or directory (os error 2)
  --> src/frontend.rs:64:72
   |
64 | ...   let vertex_shader = shader_from_source(&std::ffi::CString::new(include_str!("..\\shaders\\shader.vert")).unwrap(), gl::VERTEX_SHADE...
   |                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `...` range patterns are deprecated
   --> src/psx/bus.rs:146:24
    |
146 |             0x0000_0000...0x007f_ffff => {
    |                        ^^^ help: use `..=` for an inclusive range
    |
    = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

warning: unused import: `GpuCommand`
 --> src/psx/gpu.rs:7:25
  |
7 | use crate::gpu_viewer::{GpuCommand, GpuFrame, GpuPolygon};
  |                         ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `rpsx` (bin "rpsx") generated 2 warnings
error: could not compile `rpsx` due to 2 previous errors; 2 warnings emitted
error: failed to compile `rpsx v0.1.0 (https://github.com/KieronJ/rpsx#21337bd2)`, intermediate artifacts can be found at `/var/folders/xk/n6mt7kxs4qj9s35pmm0403rh0000gn/T/cargo-installQC7En9`

Based on the 2 errors, I believe this may be due to using the Windows path separator (backslash).

KieronJ commented 2 years ago

Thanks, this is fixed now. 👍