lupyuen commented on PR #2487: URL: https://github.com/apache/nuttx-apps/pull/2487#issuecomment-2579108920
@no1wudi Sorry did I miss something? This is for Ubuntu 24.04.1 LTS x86_64: https://gist.github.com/lupyuen/b81596576e393be0abac2b7687740052 ```bash $ rustup toolchain install nightly $ rustup default nightly $ git clone https://github.com/no1wudi/nuttx-apps apps --branch rust $ git clone https://github.com/no1wudi/nuttx --branch build $ cd nuttx $ cmake -B build -DBOARD_CONFIG=rv-virt:nsh -GNinja . $ cmake --build build -t menuconfig ## Enable CONFIG_SYSTEM_TIME64 / CONFIG_FS_LARGEFILE / CONFIG_TLS_NELEM = 16 / CONFIG_DEV_URANDOM / CONFIG_EXAMPLES_HELLO_RUST_CARGO $ cmake --build build error: "/home/luppy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu $ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu $ cmake --build build [4/6] Building Rust crate hello FAILED: apps/examples/hello_rust_cargo/hello/riscv32imac-unknown-nuttx-elf/release/libhello.a /home/luppy/rust/nuttx/build/apps/examples/hello_rust_cargo/hello/riscv32imac-unknown-nuttx-elf/release/libhello.a cd /home/luppy/rust/nuttx/build/apps/examples/hello_rust_cargo && cargo build --release -Zbuild-std=std,panic_abort --manifest-path /home/luppy/rust/apps/examples/hello_rust_cargo/hello/Cargo.toml --target riscv32imac-unknown-nuttx-elf --target-dir /home/luppy/rust/nuttx/build/apps/examples/hello_rust_cargo/hello Compiling gimli v0.31.1 Compiling object v0.36.7 Compiling addr2line v0.24.2 Compiling std v0.0.0 (/home/luppy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std) error[E0308]: mismatched types --> /home/luppy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1047:33 | 1047 | unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) } | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8` | | | arguments to this function are incorrect | = note: expected raw pointer `*const u8` found raw pointer `*const i8` note: associated function defined here --> /home/luppy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/c_str.rs:276:25 | 276 | pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr { | ^^^^^^^^ For more information about this error, try `rustc --explain E0308`. error: could not compile `std` (lib) due to 1 previous error ninja: build stopped: subcommand failed. $ rustc --version rustc 1.86.0-nightly (a580b5c37 2025-01-08) ``` Here's my .config thanks :-) https://gist.github.com/lupyuen/7c646132ce0c81533203d6d6ccdbfb72 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org