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]: Error during compilation => (slice indices are of type usize or ranges of usize) #78

Open
victoryeagle77 opened this issue Mar 5, 2025 · 0 comments

Comments

@victoryeagle77
Copy link

Problem Description

Hello again,

You provided a good solution to the problem I reported last time (sensor_id) and it was working for a while, but recently a change was made on amdsmi rust-interface, and a new error occurs when compiling rust-interface with cargo in the amdsmi component :
cargo build command line result in :

error[E0277]: the type `[&str]` cannot be indexed by `&str`
    --> /usr/local/cargo/git/checkouts/amdsmi-2c8d59e6e37e072e/edd2268/rust-interface/src/amdsmi_wrapper.rs:1892:6
     |
1892 |     ["Offset of field: AmdsmiVersionT::major"]
     |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
     |
     = help: the trait `SliceIndex<[&str]>` is not implemented for `&str`
     = note: required for `[&str]` to implement `Index<&str>`
     = note: 1 redundant requirement hidden
     = note: required for `[&str; 1]` to implement `Index<&str>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `amdsmi` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Operating System

Ubuntu GNU/Linux

CPU

13th Gen Intel(R) Core(TM) i5-1345U

GPU

N/A

ROCm Version

ROCm 6.3.3

ROCm Component

amdsmi

Steps to Reproduce

git clone https://github.com/ROCm/amdsmi.git
cd amdsmi/rust-interface
cargo build

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

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

No branches or pull requests

2 participants