SiliconLabs / wisun-br-linux

Silicon Labs Wi-SUN Linux border router reference implementation
https://www.silabs.com/wireless/wi-sun
Other
41 stars 16 forks source link

failed to get clap as dependency #6

Closed silabs-KrisY closed 1 year ago

silabs-KrisY commented 1 year ago

I encountered an error building wsbrd_cli:

[0/5] Generating wsbrd_cli
    Updating crates.io index
error: failed to get 'clap' as a dependency of package 'wsbrd_cli v0.1.0 (/home/pi/wisun-br-linux/app_wsbrd_cli)

Caused by:
  failed to load source for dependency 'clap'

Caused by:
  Unable to update registry 'https://github.com/rust-lang/crates.io-index'

Caused by:
  failed to fetch 'https://github.com/rust-lang/crates.io-index'

Caused by:
  error inflating zlib stream; class=Zlib (5)
[1/5] Checking the git repository for changes...
FAILED: wsbrd_cli

I was able to get around this error by changing a line in app_wsbrd_cli/Cargo.toml from: clap = "2.0, < 2.28"

to

clap = "2.33"

I started with a fresh Raspbian Bullseye 11 image, kernel 5.15.84-v7+ on a Raspberry Pi 3B.

jerome-pouiller commented 1 year ago

This issue seems a duplicate of https://github.com/rust-lang/cargo/issues/8465. The issue seems to happens with 32bits binaries working on 64bits kernels. Can you provide the outputs of uname -a and file $(which cargo) ?

As a workaround, you can disable dependency on Rust by passing -DCARGO_FOUND=FALSE to cmake (obviously, wsbrd_cli won't be installed).

silabs-KrisY commented 1 year ago

@jerome-pouiller When I returned to my Raspberry Pi setup, it wouldn't boot. I've been having problems with this SD card, so I think ithe non-booting was due to an SD problem. I just created a new Raspbian image (same version as before) on another SD card, ran it on the same hardware (Raspberry Pi 3b), followed the same instructions, and everything built fine without the clap error. So I am thinking maybe the clap install got corrupted by SD problems. So this seems to not be a reproducible issue and can be closed.