foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.26k stars 1.73k forks source link

"warning: libusb not found" will be always prompted even if libusdb is installed and updated (macOS m1) #1528

Open StErMi opened 2 years ago

StErMi commented 2 years ago

Component

Other (please describe)

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (bab38d6 2022-05-06T00:04:42.708656+00:00)

What command(s) is the bug in?

No response

Operating System

macOS (M1)

Describe the bug

I just tried again to run curl -L https://foundry.paradigm.xyz | bash and I always get this notification even if libusb is installed and updated (via homebrew)

curl -L https://foundry.paradigm.xyz | bash
onbjerg commented 2 years ago

The check is just a warning because it isn't super accurate. Specifically, it only checks this path: /usr/local/opt/libusb/lib/libusb-1.0.0.dylib. I think 2-3 people have tried finding a better method, but we couldn't find any

fnpen commented 2 years ago

The path is /opt/homebrew/Cellar/libusb/1.0.26/lib/libusb-1.0.0.dylib on MacBook M1. Maybe it's usefull to use brew list | grep 'libusb' command to check this requirement lib.

sambacha commented 2 years ago

usbFluxD

Alt. Method for interacting with USB devices

Redirects the standard usbmuxd socket to allow connections to local and remote usbmuxd instances so remote devices appear connected locally.

brew install make automake autoconf libtool pkg-config gcc libimobiledevice usbmuxd
git clone https://github.com/corellium/usbfluxd.git cd usbfluxd

./autogen.sh
make
sudo make install

To accept the USB over TCP connection, and appear as local:

(you may need to change 172.17.0.1 to the IP address of the host. e.g. check ip addr)

sudo launchctl start usbmuxd
export PATH=/usr/local/sbin:${PATH}
sudo usbfluxd -f -r 172.17.0.1:5000
matthiasgeihs commented 3 months ago

why is libusb needed for foundryup in the first place? not obvious to me...

zerosnacks commented 2 months ago

why is libusb needed for foundryup in the first place? not obvious to me...

it is required for signing with hardware wallets

it does raise the point if there is a way we could only require the dependency whenever the hardware wallet is actually being requested