This tutorial worked fine for me until I ran into an issue with compiling ring (ring-rs) which has a dependency of hidapi. I would get errors like:
Unsupported target os for hidapi-rs
fatal error: 'IOKit/hid/IOHIDManager.h' file not found
did not find header 'hid/IOHIDManager.h' in framework 'IOKit' (loaded from '/System/Library/Frameworks')
I have no idea how I fixed it but after dozens of tweaks, uninstalls/reinstalls and running anchor build and cargo build-bpf for the 100th time It eventually compiled and I noticed that the following commands were ran automatically during the compilation:
./bpf-tools/rust/bin/rustc --version
./bpf-tools/rust/bin/rustc --print sysroot
set +e
rustup toolchain uninstall bpf
info: uninstalling toolchain 'bpf'
info: toolchain 'bpf' uninstalled
set -e
rustup toolchain link bpf bpf-tools/rust
(I assume the bpf-tools directory is solana/bin/sdk/bpf/dependencies/bpf-tools/rust)
Wish I could provide more details but I have no idea what I did to trigger the above behaviour. Hopefully someone who ends up in the same boat finds this comment and it saves them some time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This tutorial worked fine for me until I ran into an issue with compiling ring (ring-rs) which has a dependency of hidapi. I would get errors like:
I have no idea how I fixed it but after dozens of tweaks, uninstalls/reinstalls and running anchor build and cargo build-bpf for the 100th time It eventually compiled and I noticed that the following commands were ran automatically during the compilation:
(I assume the bpf-tools directory is solana/bin/sdk/bpf/dependencies/bpf-tools/rust)
Wish I could provide more details but I have no idea what I did to trigger the above behaviour. Hopefully someone who ends up in the same boat finds this comment and it saves them some time.