rust3ds / cargo-3ds

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

Issue Building Project using cargo-3ds #28

Closed hYdos closed 2 years ago

hYdos commented 2 years ago

I've started building a hello world project which uses this tool and ctru-rs to run. When running cargo 3ds build I'm getting error: could not find native static library ctrud, perhaps an -L flag is missing?. Full Log Below:

C:/Users/hydos/.cargo/bin/cargo.exe 3ds build
No pre-build std found, using build-std
   Compiling ctru-sys v0.4.1 (https://github.com/rust3ds/ctru-rs.git#4e221667)
   Compiling linker-fix-3ds v0.1.0 (https://github.com/rust3ds/rust-linker-fix-3ds.git#ed1ec9c7)
   Compiling pthread-3ds v0.1.0 (https://github.com/rust3ds/pthread-3ds.git#c132988a)
   Compiling ctru-rs v0.7.1 (https://github.com/rust3ds/ctru-rs.git#4e221667)
error: could not find native static library `ctrud`, perhaps an -L flag is missing?

error: could not compile `ctru-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
Techie-Pi commented 2 years ago

This looks to be the same as https://github.com/rust3ds/ctru-rs/discussions/80. Do you have the devkitPro toolchain installed? If that's the case, are your environment variables setup?

On Windows they should look like this: (Ignore the non-DEVKIT things) imagen

hYdos commented 2 years ago

Are these variables not setup already by devkitpro? If so then yea I don’t have them setup On Fri, 11 Nov 2022 at 11:50 pm, TechiePi @.***> wrote:

This looks to be the same as rust3ds/ctru-rs#80 https://github.com/rust3ds/ctru-rs/discussions/80. Do you have the devkitPro toolchain https://devkitpro.org/wiki/Getting_Started installed? If that's the case, are your environment variables setup https://github.com/rust3ds/ctru-rs/issues/32#issuecomment-1288446192? (note that in your case it looks like you're using Windows, so look into this https://www.java.com/en/download/help/path.html -without the Java part ;p-)

— Reply to this email directly, view it on GitHub https://github.com/rust3ds/cargo-3ds/issues/28#issuecomment-1311716690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCR7I2Y6BIO6WKP4Q5H4SLWHZFI5ANCNFSM6AAAAAAR5TOFHY . You are receiving this because you authored the thread.Message ID: @.***>

Techie-Pi commented 2 years ago

No, they aren't setup by devkitPro. My setup looks like this: imagen (Ignore the non-DEVKIT things)

hYdos commented 2 years ago

they were setup by DevkitPro but pointed to a linux directory. Setting these to windows paths fixed the issue thanks.

hYdos commented 2 years ago

No point spamming issues so going to re-open this one with a new issue i've ran into.

C:/Users/hydos/.cargo/bin/cargo.exe 3ds build
No pre-build std found, using build-std
   Compiling help_me v0.1.0 (D:\Projects\hYdos\help_me)
error: linker `arm-none-eabi-gcc` not found
  |
  = note: program not found
Techie-Pi commented 2 years ago

Are the linker and tools provided by devkitPro in your PATH?

imagen imagen

hYdos commented 2 years ago

yes they are still getting the issue

image

Techie-Pi commented 2 years ago

That's actually weird, I'll be busy for a few days, but I'll investigate the issue

Techie-Pi commented 2 years ago

I haven't been able to replicate this,and if the PATH is set correctly, I cannot think of anything else right now. Maybe someone (@rust3ds/active) can help?

Meziu commented 2 years ago

It’s either a path issue (which seems to not be the case seeing the environment variables) or the binary is actually missing. Does it exist in those folders? Have all 3ds-dev packages been installed?

hYdos commented 2 years ago

It’s either a path issue (which seems to not be the case seeing the environment variables) or the binary is actually missing. Does it exist in those folders? Have all 3ds-dev packages been installed?

I'm not ready too sure which binary you want me to look for in those paths

hYdos commented 2 years ago

I've also just reinstalled the devkitpro toolchain for switch,nds, and 3ds and the issue is still here so nothing should be missing

Techie-Pi commented 2 years ago

which binary you want me to look for in those paths

arm-none-eabi-gcc (the linker)

hYdos commented 2 years ago

ah the file is just called that yea ill have a look

hYdos commented 2 years ago

image the C++ examples are building fine

And found the linker image image

Techie-Pi commented 2 years ago

I don't think that is what we're searching. We're searching for an executable called arm-none-eabi-gcc.exe, generally it can be found at $DEVKITARM/bin (in your case C:\devkitPro\devkitARM\bin), I think you should try adding this to your PATH

hYdos commented 2 years ago

It found the linker but now the linker is having issues with pthread

Error message
     Compiling Project v0.1.0 (C:\Users\allegra\Projects\PokemonScarlet3DSRS)                                                                                                
  warning: crate `Project` should have a snake case name                                                                                                                     
    |
    = help: convert the identifier to snake case: `pokemon_scarlet3_dsrs`
    = note: `#[warn(non_snake_case)]` on by default
  error: linking with `arm-none-eabi-gcc` failed: exit code: 1                                                                                                                           
    |
    = note: "arm-none-eabi-gcc" "-specs=3dsx.specs" "-mtune=mpcore" "-mfloat-abi=hard" "-mtp=soft" "C:\\Users\\allegra\\AppData\\Local\\Temp\\rustcGh3iTh\\symbols.o" "C:\\Users\\allegra\
  \Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.161e9nfwukn8om0d.rcgu.o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DS
  RS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.1cwzqz5xky62gbjp.rcgu.o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-
  3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.1g3j8k3a9yq42k8s.rcgu.o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonSca
  rlet3DSRS-d55fb502ca1c517b.2xpz4wgwkbo0fc1a.rcgu.o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.3
  lvtgkb4q4stgzpr.rcgu.o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.4acay407x444fqsm.rcgu.o" "C:\
  \Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.4ymf5z9e7cz94mg2.rcgu.o" "C:\\Users\\allegra\\Projects\\P
  okemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.2idvwpns2hwjamg.rcgu.o" "-Wl,--as-needed" "-L" "C:\\Users\\allegra\\Projects\\Pokemon
  Scarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps" "-L" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\debug\\deps" "-L" "C:\\devkitPro/libctru/lib" "-L" "C:\\devkitP
  ro/libctru/lib" "-L" "C:\\Users\\allegra\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\armv6k-nintendo-3ds\\lib" "-lctru" "-Wl,-Bstatic" "C:\\Users\\allegra\\Proj
  ects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libstd-6bf8f18698dc5196.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debu
  g\\deps\\libpanic_unwind-96d9c1a26657391d.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libobject-a5b29758c7c5c6b5.rlib" "C:\\User
  s\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libmemchr-0d54500d167e92b2.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k
  -nintendo-3ds\\debug\\deps\\libaddr2line-08f02d167638f951.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libgimli-aa4ea57e1b232b98.
  rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\librustc_demangle-123867de416d22f3.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarl
  et3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libstd_detect-d441a4ba60bb3619.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\li
  bhashbrown-fd4a2ea51c4133c1.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libminiz_oxide-cadacbf7d4db3bf2.rlib" "C:\\Users\\allegr
  a\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libadler-fcacff3fe49b89d6.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-
  3ds\\debug\\deps\\librustc_std_workspace_alloc-abb7e345cb7b9939.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libunwind-8a0a90e8e6
  068889.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libcfg_if-e694bb189f2b6d17.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarle
  t3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\liblibc-1889e4c6e1221800.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\liballoc-
  b45ac0004c45ec5e.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\librustc_std_workspace_core-939adcb42bc25400.rlib" "C:\\Users\\alle
  gra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\libcore-d883fe381d916033.rlib" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo
  -3ds\\debug\\deps\\libcompiler_builtins-67320d3de5d6d5e9.rlib" "-Wl,-Bdynamic" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-lctr
  u" "-lctru" "-lctru" "-lc" "-lm" "-lctru" "-lctru" "-lctru" "-lctru" "-lctru" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "C:\\Users\\allegra\\.rustup\\toolchains\\nightly-x86_64-pc-
  windows-msvc\\lib\\rustlib\\armv6k-nintendo-3ds\\lib" "-o" "C:\\Users\\allegra\\Projects\\PokemonScarlet3DSRS\\target\\armv6k-nintendo-3ds\\debug\\deps\\PokemonScarlet3DSRS-d55fb502ca1c517b.elf" "-Wl,--gc-sections" "-no-pie"
    = note: c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.1.rcgu.o): in function `std::sys::unix::locks::pthread_rwlock::AllocatedRwLock::raw_unlock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_rwlock.rs:47: undefined reference to `pthread_rwlock_unlock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debu
  g\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.1.rcgu.o): in function `::drop':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_rwlock.rs:54: undefined reference to `pthread_rwlock_destroy'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.1.rcgu.o): in function `std::sys::unix::locks::pthread_rwlock::RwLock::read':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_rwlock.rs:76: undefined reference to `pthread_rwlock_rdlock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.12.rcgu.o): in function `std::sys::unix::fs::canonicalize::{{closure}}':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix/fs.rs:1497: undefined reference to `realpath'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debu
  g\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `::init':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:50: undefined reference to `pthread_mutexattr_init'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:52: undefined reference to `pthread_mutexattr_settype'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:57: undefined reference to `pthread_mutex_init'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debu
  g\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `::destroy':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:66: undefined reference to `pthread_mutex_trylock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:67: undefined reference to `pthread_mutex_unlock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debu
  g\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `::drop':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:85: undefined reference to `pthread_mutex_destroy'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `std::sys::unix::locks::pthread_mutex::Mutex::lock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:106: undefined reference to `pthread_mutex_lock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `std::sys::unix::locks::pthread_mutex::Mutex::unlock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:112: undefined reference to `pthread_mutex_unlock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `std::sys::unix::locks::pthread_mutex::Mutex::try_lock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:118: undefined reference to `pthread_mutex_trylock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debu
  g\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.13.rcgu.o): in function `::drop':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\locks/pthread_mutex.rs:127: undefined reference to `pthread_mutexattr_destroy'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.14.rcgu.o): in function `std::sys::unix::thread_local_key::create':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix/thread_local_key.rs:10: undefined reference to `pthread_key_create'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.14.rcgu.o): in function `std::sys::unix::thread_local_key::set':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix/thread_local_key.rs:16: undefined reference to `pthread_setspecific'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.14.rcgu.o): in function `std::sys::unix::thread_local_key::get':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix/thread_local_key.rs:22: undefined reference to `pthread_getspecific'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.14.rcgu.o): in function `std::sys::unix::thread_local_key::destroy':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix/thread_local_key.rs:27: undefined reference to `pthread_key_delete'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `std::sys::unix::thread_parker::pthread::lock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:16: undefined reference to `pthread_mutex_lock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `std::sys::unix::thread_parker::pthread::unlock':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:21: undefined reference to `pthread_mutex_unlock'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `std::sys::unix::thread_parker::pthread::notify_one':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:26: undefined reference to `pthread_cond_signal'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `std::sys::unix::thread_parker::pthread::wait':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:31: undefined reference to `pthread_cond_wait'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `std::sys::unix::thread_parker::pthread::Parker::new':
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:121: undefined reference to `pthread_cond_init'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\Projects\PokemonScarlet3DSRS\target\armv6k-nintendo-3ds\debug\deps\libstd-6bf8f18698dc5196.rlib(std-6bf8f18698dc5196.std.a2d303ad-cgu.7.rcgu.o): in function `::drop':     
            C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:264: undefined reference to `pthread_cond_destroy'
            c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: C:\Users\allegra\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std/src\sys\unix\thread_parker/pthread.rs:265: undefined reference to `pthread_mutex_destroy'
            collect2.exe: error: ld returned 1 exit status

    = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
    = note: use the `-l` flag to specify native libraries to link
    = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
Meziu commented 2 years ago

You need to call ctru::init at the start of your main function to make sure you link correctly all definitions.

hYdos commented 2 years ago

with all of this i've finally got a .3dsx. Probably should work on out of the box support on windows but for now this is ok. Thanks!

Meziu commented 2 years ago

ctru::init is also fundamental for other functions, like having a stable panic handling system and running the ps service, required by modules like Hashmap. A detailed guide is already on our to-do list.

duckfromdiscord commented 1 year ago

they were setup by DevkitPro but pointed to a linux directory. Setting these to windows paths fixed the issue thanks.

this is still happening for me, thank you for this