rust3ds / ctru-rs

Rust wrapper for libctru
https://rust3ds.github.io/ctru-rs/
Other
116 stars 17 forks source link

`Citru-sys` not compiling on Windows #190

Closed Local-Trash closed 1 month ago

Local-Trash commented 2 months ago

I have tried compiling my project to a .3dsx file and its not working. I have used the pacman installer to get all of the tools. But it still does not compile. This is the error it gives me.

 using libctru version 2.3.1-1
  thread 'main' panicked at C:\Users\tqdag\.cargo\git\checkouts\ctru-rs-1206856f7a5d76bc\2d25f88\ctru-sys\build.rs:180:10:
  called `Result::unwrap()` on an `Err` value: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }

I have checked the build file and I found out that it fails when searching for arm-none-eabi-gcc. I looked for the file and it is in the right place. Does anyone know how to fix this?

Meziu commented 2 months ago

Can you share the contents of the DEVKITARM/DEVKITPRO environment variables and what the resulting cc path is right before the panicking call?

Technically none of the work done on the paths should be OS specific, so it's a bit weird that it is unable to find the binary under Windows.

Local-Trash commented 2 months ago

DEVKITPRO: "/opt/devkitpro" DEVKITARM: "/opt/devkitpro/devkitARM"

I don't know how to get the resulting cc path. But the path in my computer is "/opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe".

FenrirWolf commented 2 months ago

Out of curiosity, how did you go about using ctru-rs on windows? I've tried it in the past, but given that the Rust windows gnu target and devkitARM both come with their own separate mingw/msys2 environments, I wasn't really sure how to make them play nicely with each other and so I've just been using wsl instead.

Local-Trash commented 2 months ago

I have been using normal windows environment and using the nightly-msvc toolchain. This is because I need the nightly build and gnu doesn't have a window's nightly build. Other than that I install cargo-3ds, created a new project and ran cargo 3ds build.

Meziu commented 2 months ago

I have been using normal windows environment and using the nightly-msvc toolchain. This is because I need the nightly build and gnu doesn't have a window's nightly build. Other than that I install cargo-3ds, created a new project and ran cargo 3ds build.

A normal windows environment? I see your env vars refer to Unix paths (see the forward slash), isn't that incompatible with the Windows' filesystem? I might have to remind you that using neither msys/mingw nor WSL is unsupported by devkitPro.

Local-Trash commented 1 month ago

I just figured out how to compile rust without cargo-3ds. This might be the problem though.