build
cargo build --bin test_cli --target=x86_64-unknown-linux-musl --features vendored --release
ldd
linux-vdso.so.1 (0x00007ffd289fa000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007ff6f3084000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007ff6f305c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff6f303a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff6f2e66000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff6f3c85000)
My application includes libusb-sys GitHub - dcuddeback/libusb-sys: Rust bindings for the libusb library. ,I don't understand what path SYSROOT should represent here。
config
PKG_CONFIG_SYSROOT_DIR=/usr/lib/x86_64-linux-musl/ cargo build --bin test_cli --target=x86_64-unknown-linux-musl --features vendored --release
but ldd includes dynamic libraries。
use zigbuild will prompt that the library for libusb cannot be found
= note: ld.lld: error: unable to find library -lusb-1.0
How should I configure my environment correctly for libusb-sys,Ensure that the compilation results do not contain any dynamic libraries