rust3ds / cargo-3ds

Cargo command to work with Nintendo 3DS project binaries.
Apache License 2.0
59 stars 10 forks source link

Not building when in release mode on Windows #48

Closed fekie closed 12 months ago

fekie commented 12 months ago

I just set everything up and it builds normally with cargo 3ds build. I am using all the devkitPro stuff and LLVM on Windows. However, running cargo 3ds build --release gives this error. Not sure if this is a rustflags thing and an issue with cargo-3ds.

Compiling ctru-sys v22.2.0+2.2.2-1 (https://github.com/rust3ds/ctru-rs#4d718c41) The following warnings were emitted during compilation: warning: ctru-sys@22.2.0+2.2.2-1: failed to check libctru version: cannot find binary path warning: ctru-sys@22.2.0+2.2.2-1: arm-none-eabi-gcc: error: unrecognized command-line option '-m64' error: failed to run custom build command for `ctru-sys v22.2.0+2.2.2-1 (https://github.com/rust3ds/ctru-rs#4d718c41)` Caused by: process didn't exit successfully: `C:\Users\fek\k-git\first-3ds-rust-project\target\release\build\ctru-sys-d91d501a2927c647\build-script-build` (exit code: 1) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-env-changed=DEVKITPRO cargo:rustc-link-search=native=C:\devkitPro/libctru/lib cargo:rustc-link-lib=static=ctru cargo:warning=failed to check libctru version: cannot find binary path TARGET = Some("x86_64-pc-windows-msvc") OPT_LEVEL = Some("3") cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") HOST = Some("x86_64-pc-windows-msvc") cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc CFLAGS_x86_64-pc-windows-msvc = None cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc CFLAGS_x86_64_pc_windows_msvc = None cargo:rerun-if-env-changed=HOST_CFLAGS HOST_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None running: "C:\\devkitPro\\devkitARM\\bin/arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "C:\\devkitPro\\libctru\\include" "-Wall" "-Wextra" "-march=armv6k" "-mtune=mpcore" "-mfloat-abi=hard" "-mfpu=vfp" "-mtp=soft" "-Wno-deprecated-declarations" "-o" "C:\\Users\\fek\\k-git\\first-3ds-rust-project\\target\\release\\build\\ctru-sys-d4aabc400d3d9b70\\out\\884983ec69cfa99d-libctru_statics_wrapper.o" "-c" "C:\\Users\\fek\\k-git\\first-3ds-rust-project\\target\\release\\build\\ctru-sys-d4aabc400d3d9b70\\out\\libctru_statics_wrapper.c" cargo:warning=arm-none-eabi-gcc: error: unrecognized command-line option '-m64' exit code: 1 --- stderr error occurred: Command "C:\\devkitPro\\devkitARM\\bin/arm-none-eabi-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "C:\\devkitPro\\libctru\\include" "-Wall" "-Wextra" "-march=armv6k" "-mtune=mpcore" "-mfloat-abi=hard" "-mfpu=vfp" "-mtp=soft" "-Wno-deprecated-declarations" "-o" "C:\\Users\\fek\\k-git\\first-3ds-rust-project\\target\\release\\build\\ctru-sys-d4aabc400d3d9b70\\out\\884983ec69cfa99d-libctru_statics_wrapper.o" "-c" "C:\\Users\\fek\\k-git\\first-3ds-rust-project\\target\\release\\build\\ctru-sys-d4aabc400d3d9b70\\out\\libctru_statics_wrapper.c" with args "arm-none-eabi-gcc" did not execute successfully (status code exit code: 1).
fekie commented 12 months ago

Facepalming very hard right now. Was using cargo build --release over and over. My apologies. It's 4am

Meziu commented 12 months ago

Don't worry, it's fine :sweat_smile:. Happy to see you managed to set everything up.