Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Rust • Re: Cant create a Rust project

$
0
0
What errors are you getting from the extension in the logs (you can access them from Help -> Toggle Developer Tools, then click Console)?

I can reproduce this on RPiOS Bookworm - from my logs it looks like elf2uf2-rs now requires libudev, which you can install with `sudo apt install libudev-dev`, and that should fix this issue
Thanks, that has fixed it for me as well. Because you asked, the console says the following, and that does look like the only issue:
ERR [Extension Host] [[31mERROR[0m] [raspberry-pi-pico - rustUtil] Failed to install cargo package 'elf2uf2-rs': Command failed: cargo install --locked elf2uf2-rs
[lots of compiling and updating logs]
error: failed to run custom build command for `libudev-sys v0.1.4`

Caused by:
process didn't exit successfully: `/tmp/cargo-installMATHVp/release/build/libudev-sys-d1cea626ffe33ae0/build-script-build` (exit status: 101)
[stdout data]
thread 'main' panicked at /home/[user]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libudev-sys-0.1.4/build.rs:38:41:
called `Result::unwrap()` on an `Err` value: "\npkg-config exited with status code 1\n> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libudev\n\nThe system library `libudev` required by crate `libudev-sys` was not found.\nThe file `libudev.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.\nThe PKG_CONFIG_PATH environment variable is not set.\n\nHINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `libudev.pc`.\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `elf2uf2-rs v2.2.0`, intermediate artifacts can be found at `/tmp/cargo-installMATHVp`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Statistics: Posted by Shoe — Fri Oct 31, 2025 2:03 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles