foundry icon indicating copy to clipboard operation
foundry copied to clipboard

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

Open StErMi opened this issue 3 years ago • 5 comments

Component

Other (please describe)

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

  • [X] Foundry
  • [X] Foundryup

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

StErMi avatar May 06 '22 07:05 StErMi

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

onbjerg avatar May 07 '22 10:05 onbjerg

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.

fnpen avatar Jul 20 '22 05:07 fnpen

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

sambacha avatar Jul 21 '22 11:07 sambacha

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

matthiasgeihs avatar Jul 16 '24 12:07 matthiasgeihs

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

zerosnacks avatar Aug 06 '24 10:08 zerosnacks

I don't understand how to fix this at all...

Do I manually copy the files for libusb from the folder brew installed them to, to the folder forge wants? That seems like a very fragile solution and likely to break things on my computer.

If I am building a tooling in my project based on forge, do I have to write some docs that no one will read telling them they have to hack around with dependency libs in system folders just to get a build tool running on their machine???

Do you just not have any users on M1 Macs? So surprising this issue has been known for so long and nothing has been done about it.

Reiss-Cashmore avatar Feb 21 '25 17:02 Reiss-Cashmore

@Reiss-Cashmore is that still an issue with latest nightly and macOS (M1)? Thank you

grandizzy avatar Mar 28 '25 14:03 grandizzy

closing this due to inactivity, please open a new issue if you still run into it with the latest version

jenpaff avatar Apr 18 '25 15:04 jenpaff