Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Building Project using cargo-3ds #28

Closed
hYdos opened this issue Nov 11, 2022 · 21 comments
Closed

Issue Building Project using cargo-3ds #28

hYdos opened this issue Nov 11, 2022 · 21 comments

Comments

@hYdos
Copy link

hYdos commented Nov 11, 2022

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
Copy link
Member

Techie-Pi commented Nov 11, 2022

This looks to be the same as rust3ds/ctru-rs#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
Copy link
Author

hYdos commented Nov 11, 2022 via email

@Techie-Pi
Copy link
Member

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

@hYdos
Copy link
Author

hYdos commented Nov 11, 2022

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

@hYdos hYdos closed this as completed Nov 11, 2022
@hYdos
Copy link
Author

hYdos commented Nov 11, 2022

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

@hYdos hYdos reopened this Nov 11, 2022
@Techie-Pi
Copy link
Member

Techie-Pi commented Nov 11, 2022

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

imagen
imagen

@hYdos
Copy link
Author

hYdos commented Nov 11, 2022

yes they are still getting the issue

image

@Techie-Pi
Copy link
Member

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

@Techie-Pi
Copy link
Member

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
Copy link
Member

Meziu commented Nov 14, 2022

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
Copy link
Author

hYdos commented Nov 14, 2022

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
Copy link
Author

hYdos commented Nov 14, 2022

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
Copy link
Member

which binary you want me to look for in those paths

arm-none-eabi-gcc (the linker)

@hYdos
Copy link
Author

hYdos commented Nov 15, 2022

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

@hYdos
Copy link
Author

hYdos commented Nov 15, 2022

image
the C++ examples are building fine

And found the linker
image
image

@Techie-Pi
Copy link
Member

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
Copy link
Author

hYdos commented Nov 17, 2022

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
Copy link
Member

Meziu commented Nov 17, 2022

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

@hYdos
Copy link
Author

hYdos commented Nov 17, 2022

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!

@hYdos hYdos closed this as completed Nov 17, 2022
@Meziu
Copy link
Member

Meziu commented Nov 17, 2022

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants