Giter VIP home page Giter VIP logo

Comments (5)

Meziu avatar Meziu commented on August 16, 2024 1

Ok, first of all, sorry for the lack of response. I've been active coding the last couple of days, yet Github decided I shouldn't receive notifications. My current setup is using a stage2 compiler built from source (the horizon-std fork). You can include it either with cargo flags or with the "rustc" flag in the ".cargo/config.toml" file in the building project.
I didn't include such files because I didn't mean anyone to build the hello-world example before actually pushing the "std" fork into nightly. Tell me of any problems

P.S.
I'm working on networking. I'm currently translating a networking program to raw ctru calls in Rust. Once done that i'll implement a layer for libc (like pthread) and test the std.

from cargo-3ds.

Meziu avatar Meziu commented on August 16, 2024 1

Yeah I got help from looking at ctr-std before (especially with threading), though this time i just need to get the API with libc to match, and not write anything particular like with my "pthread-3ds". Anyways, if you want to help, I'll make a repo with my networking project as soon as I make my first working example. Thank you for participating.

from cargo-3ds.

AzureMarker avatar AzureMarker commented on August 16, 2024

Here is a log I got after compiling cargo with line debug info:

Click to open
__CARGO_TESTS_ONLY_SRC_ROOT="$(pwd)/../rust-horizon" RUST_BACKTRACE=full CARGO_LOG=debug ../rust-horizon/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargo build -Z build-std --target armv6k-nintendo-3ds -v
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/Cargo.toml
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/Cargo.toml
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_root - trying /home/mark/Cargo.toml
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_root - trying /home/Cargo.toml
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_root - trying /Cargo.toml
[2021-12-23T17:13:27Z DEBUG cargo::core::workspace] find_members - only me as a member
[2021-12-23T17:13:28Z DEBUG cargo::util::rustc] different compiler, creating new rustc info cache
[2021-12-23T17:13:28Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:28Z DEBUG cargo::util::rustc] running `rustc -vV`
[2021-12-23T17:13:28Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:28Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro -Csplit-debuginfo=packed`
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --error-format json --json future-incompat`
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg`
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --target armv6k-nintendo-3ds --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro -Csplit-debuginfo=packed`
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --target armv6k-nintendo-3ds --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --error-format json --json future-incompat`
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] rustc info cache miss
[2021-12-23T17:13:29Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --target armv6k-nintendo-3ds --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg`
[2021-12-23T17:13:29Z DEBUG cargo::util::config::target] Got all targets {}
[2021-12-23T17:13:29Z DEBUG cargo::ops::resolve] avoid_patch_ids={}
[2021-12-23T17:13:29Z DEBUG cargo::ops::resolve] attempting to prefer rust-3ds-hello-world v0.1.0 (/home/mark/media/CLionProjects/rust-3ds-hello-world)
[2021-12-23T17:13:29Z DEBUG cargo::core::registry] load/missing  /home/mark/media/CLionProjects/rust-3ds-hello-world
[2021-12-23T17:13:29Z DEBUG cargo::core::registry] loading source /home/mark/media/CLionProjects/rust-3ds-hello-world
[2021-12-23T17:13:29Z DEBUG cargo::sources::config] loading: /home/mark/media/CLionProjects/rust-3ds-hello-world
[2021-12-23T17:13:29Z DEBUG cargo::core::resolver] initial activation: rust-3ds-hello-world v0.1.0 (/home/mark/media/CLionProjects/rust-3ds-hello-world)
[2021-12-23T17:13:29Z DEBUG cargo::ops::resolve] avoid_patch_ids={}
[2021-12-23T17:13:29Z DEBUG cargo::ops::resolve] attempting to prefer rust-3ds-hello-world v0.1.0 (/home/mark/media/CLionProjects/rust-3ds-hello-world)
[2021-12-23T17:13:29Z DEBUG cargo::core::registry] load/locked   /home/mark/media/CLionProjects/rust-3ds-hello-world
[2021-12-23T17:13:29Z DEBUG cargo::core::resolver] initial activation: rust-3ds-hello-world v0.1.0 (/home/mark/media/CLionProjects/rust-3ds-hello-world)
[2021-12-23T17:13:29Z DEBUG cargo::core::package] rust-3ds-hello-world v0.1.0 (/home/mark/media/CLionProjects/rust-3ds-hello-world) doesn't need a download
[2021-12-23T17:13:29Z DEBUG cargo::core::resolver::features] features={
        (
            PackageId {
                name: "rust-3ds-hello-world",
                version: "0.1.0",
                source: "/home/mark/media/CLionProjects/rust-3ds-hello-world",
            },
            false,
        ): {},
    }
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_members - /home/mark/media/CLionProjects/rust-horizon/library/std/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/stdarch/crates/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/stdarch/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_members - /home/mark/media/CLionProjects/rust-horizon/library/core/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_members - /home/mark/media/CLionProjects/rust-horizon/library/alloc/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_members - /home/mark/media/CLionProjects/rust-horizon/library/test/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/library/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - trying /home/mark/media/CLionProjects/rust-horizon/Cargo.toml
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found a root checking exclusion
[2021-12-23T17:13:29Z DEBUG cargo::core::workspace] find_root - found!
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/tools/cargo/src/cargo/core/workspace.rs:1519:39
stack backtrace:
   0:     0x562ac6849b33 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb0ac2248d26c232d
   1:     0x562ac686735c - core::fmt::write::h334e8a7dff01ee85
   2:     0x562ac682c162 - std::io::Write::write_fmt::hbbac4ac003360601
   3:     0x562ac68499bf - std::sys_common::backtrace::print::h5b085b6d145756fd
   4:     0x562ac683ed27 - std::panicking::default_hook::{{closure}}::h41d03412a3bb1bd4
   5:     0x562ac683eaf3 - std::panicking::default_hook::hcf73899b4302a13a
   6:     0x562ac683f15e - std::panicking::rust_panic_with_hook::h58156d3b2449d288
   7:     0x562ac682f852 - std::panicking::begin_panic_handler::{{closure}}::hb486bb17bd85096b
   8:     0x562ac682f7e4 - std::sys_common::backtrace::__rust_end_short_backtrace::h9af1302ed8e02269
   9:     0x562ac683ed92 - rust_begin_unwind
  10:     0x562ac61a6dc1 - core::panicking::panic_fmt::h32c0e6c0f26ccedd
  11:     0x562ac61a6d0d - core::panicking::panic::h7d1997b8d9b7dc1f
  12:     0x562ac6285684 - <core[f357e379bd850c3a]::option::Option<&cargo[50a080ff70e40300]::core::workspace::MaybePackage>>::unwrap
                               at /home/mark/media/CLionProjects/rust-horizon/library/core/src/option.rs:747:21
  13:     0x562ac6285684 - <cargo[50a080ff70e40300]::core::workspace::Packages>::get
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/core/workspace.rs:1519:9
  14:     0x562ac6285684 - <cargo[50a080ff70e40300]::core::workspace::Workspace>::is_virtual
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/core/workspace.rs:305:16
  15:     0x562ac6285684 - <cargo[50a080ff70e40300]::core::workspace::Workspace>::find_members
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/core/workspace.rs:715:19
  16:     0x562ac62825f2 - <cargo[50a080ff70e40300]::core::workspace::Workspace>::new_virtual
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/core/workspace.rs:201:9
  17:     0x562ac65d21d7 - cargo[50a080ff70e40300]::core::compiler::standard_lib::resolve_std
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/core/compiler/standard_lib.rs:91:22
  18:     0x562ac63400ee - cargo[50a080ff70e40300]::ops::cargo_compile::create_bcx
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/ops/cargo_compile.rs:414:13
  19:     0x562ac633f6f4 - cargo[50a080ff70e40300]::ops::cargo_compile::compile_ws
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/ops/cargo_compile.rs:285:15
  20:     0x562ac633f626 - cargo[50a080ff70e40300]::ops::cargo_compile::compile_with_exec
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/ops/cargo_compile.rs:276:5
  21:     0x562ac633f626 - cargo[50a080ff70e40300]::ops::cargo_compile::compile
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/cargo/ops/cargo_compile.rs:265:5
  22:     0x562ac61baf0a - cargo[441ce7299224f7cb]::commands::build::exec
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/bin/cargo/commands/build.rs:70:5
  23:     0x562ac61be977 - cargo[441ce7299224f7cb]::cli::execute_subcommand
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/bin/cargo/cli.rs:362:16
  24:     0x562ac61bc86d - cargo[441ce7299224f7cb]::cli::main
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/bin/cargo/cli.rs:165:5
  25:     0x562ac61c0c53 - cargo[441ce7299224f7cb]::main
                               at /home/mark/media/CLionProjects/rust-horizon/src/tools/cargo/src/bin/cargo/main.rs:39:13
  26:     0x562ac61cd1c3 - <fn() as core[f357e379bd850c3a]::ops::function::FnOnce<()>>::call_once
                               at /home/mark/media/CLionProjects/rust-horizon/library/core/src/ops/function.rs:227:5
  27:     0x562ac61cd1c3 - std[22f198f893759b71]::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
                               at /home/mark/media/CLionProjects/rust-horizon/library/std/src/sys_common/backtrace.rs:123:18
  28:     0x562ac61a8089 - std[22f198f893759b71]::rt::lang_start::<()>::{closure#0}
                               at /home/mark/media/CLionProjects/rust-horizon/library/std/src/rt.rs:145:18
  29:     0x562ac681fee0 - std::panicking::try::he2fa69cb19bccc33
  30:     0x562ac681dafb - std::rt::lang_start_internal::hf525b14786f81673
  31:     0x562ac61c23c8 - main
  32:     0x7f27561a3560 - __libc_start_call_main
  33:     0x7f27561a360c - __libc_start_main@@GLIBC_2.34
  34:     0x562ac61a6ea5 - _start
  35:                0x0 - <unknown>
[2021-12-23T17:13:29Z INFO  cargo::util::rustc] updated rustc info cache

from cargo-3ds.

AzureMarker avatar AzureMarker commented on August 16, 2024

It seems to work if I use the dev (locally compiled) rustc. Running into some other linker errors though.

from cargo-3ds.

AzureMarker avatar AzureMarker commented on August 16, 2024

No problem, I was able to get the hello world program running in emulator and on my physical 3DS!

I have a project I'm starting that will need networking capabilities, so I'm glad to hear that's in progress. I'm also working on cleaning up some things especially around ctru-rs (based on upstream, incorporating recent patches), somewhat just so I understand it and also to make it possible to contribute back to the project. Plus, there's a bunch of stuff in ctr-std that might speed up progress on networking and other areas.

from cargo-3ds.

Related Issues (20)

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.