Coder Social home page Coder Social logo

rust3ds-template's People

Contributors

dten avatar fenrirwolf avatar hybrideidolon avatar louy2 avatar meziu avatar panicbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust3ds-template's Issues

Error compiling alloc_system

rustup 1.24.3
rustc 1.64.0-nightly

error[E0432]: unresolved imports `core::alloc::Alloc`, `core::alloc::AllocErr`
  --> /home/dev/.cargo/git/checkouts/alloc_system3ds-2e7bbb6fda5c7d52/54ee0d3/src/lib.rs:37:19
   |
37 | use core::alloc::{Alloc, GlobalAlloc, AllocErr, Layout}; 
   |                   ^^^^^               ^^^^^^^^
   |                   |                   |
   |                   |                   no `AllocErr` in `alloc`
   |                   |                   help: a similar name exists in the module: `AllocError`
   |                   no `Alloc` in `alloc`

error[E0463]: can't find crate for `core`

I'm using Fedora 32 x86_64. using pre-installed Rustup. Set default toolchain to nightly, installed xargo as what README says.

Now when I run make, This thing happens:

 kokoseij@KKSJ-devlaptop  ~/git/rust3ds-template   master  make
RUST_TARGET_PATH=/home/kokoseij/git/rust3ds-template xargo build --release
warning: Patch `rustc-std-workspace-alloc v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-alloc)` was not used in the crate graph.
Patch `rustc-std-workspace-std v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-std)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling compiler_builtins v0.1.32
   Compiling core v0.0.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore)
   Compiling rustc-std-workspace-core v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc)
    Finished release [optimized] target(s) in 13.59s
warning: Patch `rustc-std-workspace-alloc v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-alloc)` was not used in the crate graph.
Patch `rustc-std-workspace-std v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-std)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling libc v0.2.71
   Compiling panic_abort v0.0.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libpanic_abort)
    Finished release [optimized] target(s) in 0.77s
warning: Patch `rustc-std-workspace-alloc v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-alloc)` was not used in the crate graph.
Patch `rustc-std-workspace-std v1.99.0 (/home/kokoseij/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-std)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling cc v1.0.54
   Compiling cfg-if v0.1.10
error[E0463]: can't find crate for `core`
  |
  = note: the `3ds` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.Rv7Tjxt4GUJ6/Cargo.toml" "--target" "3ds" "-p" "panic_unwind"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
make: *** [Makefile:20: target/3ds/release/rust3ds-template.elf] Error 1

Project doesn't build.

Steps to reproduce:

# clean up
rm -Rf ~/.cargo/
rm -Rf ~/.rustup/
rm -Rf ~/.multirust

then follow https://github.com/louy2/rust3ds-template/blob/c8eca1de0dbe0e958dec5281209844d5bc42f56e/README.md

after cloning the repo running make gives tihs this error:

error: failed to run `rustc` to learn about target-specific information

googling pointed to phil-opp/nightly-libcore#6

I downloaded the install-libcore.sh file to try to run it against the 3ds specification and it complain about a new linker-flavor flag missing in the 3ds.json file, so I added it and set to gcc, after it still looks like it cannot compile core:

error[E0557]: feature has been removed
  --> src/lib.rs:85:12
   |
85 | #![feature(reflect)]
   |            ^^^^^^^

error[E0093]: unrecognized intrinsic function: `forget`
   --> src/intrinsics.rs:671:5
    |
671 |     pub fn forget<T>(_: T) -> ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unrecognized intrinsic

error: aborting due to previous error

error: Could not compile `core`.

I then try to run make again and it starts correctly this time, but it fails to compile a std with a bunch of other errors:

error[E0432]: unresolved import `core::num::Zero`
  --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/num.rs:21:21
   |
21 | pub use core::num::{Zero, One};
   |                     ^^^^ no `Zero` in `num`

error[E0432]: unresolved import `core::num::One`
  --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/num.rs:21:27
   |
21 | pub use core::num::{Zero, One};
   |                           ^^^ no `One` in `num`

error[E0425]: cannot find function `utf8_char_width` in module `core_str`
    --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/io/mod.rs:1645:31
     |
1645 |         let width = core_str::utf8_char_width(first_byte);
     |                               ^^^^^^^^^^^^^^^ not found in `core_str`
     |
     = help: possible candidate is found in another module, you can import it into scope:
               `use __core::str::utf8_char_width;`

error: use of unstable library feature 'core_float': stable interface is via `impl f{32,64}` in later crates (see issue #32110)
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f32.rs:276:9
    |
276 |         num::Float::integer_decode(self)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(core_float)] to the crate attributes to enable

error: use of unstable library feature 'core_float': stable interface is via `impl f{32,64}` in later crates (see issue #32110)
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f64.rs:217:53
    |
217 |     pub fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) }
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(core_float)] to the crate attributes to enable

error: no associated item named `integer_decode` found for type `core::num::Float` in the current scope
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f32.rs:276:9
    |
276 |         num::Float::integer_decode(self)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0038]: the trait `core::num::Float` cannot be made into an object
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f32.rs:276:9
    |
276 |         num::Float::integer_decode(self)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::num::Float` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`

error: no associated item named `integer_decode` found for type `core::num::Float` in the current scope
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f64.rs:217:53
    |
217 |     pub fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) }
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0038]: the trait `core::num::Float` cannot be made into an object
   --> /home/kentaromiura/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/20a7da8/ctr-std/src/f64.rs:217:53
    |
217 |     pub fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) }
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::num::Float` cannot be made into an object
    |
    = note: the trait cannot require that `Self : Sized`

error: aborting due to 4 previous errors

error: Could not compile `std`.

Rust updates broke stuff.

I'd successfully compiled the template project a few times using various Rust 1.4 and 1.5 nightly builds, but it seems that something broke somewhere along the line in the 1.6 nightly and onwards.

For one, libc got changed a lot and the path to it is now $RUST_SRC_PATH/src/liblibc/src/lib.rs. I also had to manually add #![no_std] to the lib.rs file because apparently libc has some sort of conditional dependency on stdlib now, and I couldn't figure out how to pass the proper condition to use libcore instead via the rust3ds_template Makefile.

Then aside from the libc stuff, any attempt to compile the template project itself fails for some reason I haven't been able to pin down. Using the --verbose flag during compilation results in a giant spew of multiple function definition errors, and I haven't been able to figure out what's causing that. Maybe the compiler-rt.a file needs to be updated?

Using the latest version of ctru-rs

Hi, I'm trying to use the latest version of ctru-rs with this template but I get the following error when I try to compile it:

rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/CodeGen/AsmPrinterDwarfUnit.cpp:724: llvm::DIE* llvm::DwarfUnit::getOrCreateTypeDIE(const llvm::MDNode*): assertion `Ty == resolve(Ty->getRef()) && "type was not uniqued, possible ODR violation."' failed.

I'm using a local version of ctru-rs but the problem also occurs when I'm using the git version.
Is there a way to fix this compilation problem ?

The ultimate goal would be to be able to be able to get involved into improving ctru-rs while being able to test it using this template.

I'm using the latest rust nightly with the latest xargo from git and devkitarm 44

Edit: setting lto from true to false in Cargo.toml allowed the compilation to succed, is it ok to disable it?

Error during the link

Hi,

I got the following error during the final link:
= note: arm-none-eabi-gcc: error: 3dsx.specs: No such file or directory

error: aborting due to previous error

error: Could not compile rust3ds-template.

Not sure why but I have the file in /opt/devkitpro/devkitARM/arm-none-eabi/lib/3dsx.specs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.