chipcode-nl/picoprobe-mac

libusb not loaded

Closed this issue · 3 comments

Hello there,

I'm currently running in this issue where the provided openocd binary throws the following error:

dyld[3624]: Library not loaded: /usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib
  Referenced from: <136258B5-AD87-3E3C-97C2-307FF756D7F9> /Users/luca/.vscode/extensions/chipcode-nl.picoprobe-mac-1.0.6/bin/openocd
  Reason: tried: '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/usr/local/lib/libusb-0.1.4.dylib' (no such file), '/usr/lib/libusb-0.1.4.dylib' (no such file, not in dyld cache)

While installing the perquisites with brew I get no errors. Reinstalling them didn't change anything. I can start the official openocd installed from brew.

Any Idea what could be the problem?

I'm running a 2021 MacBook Pro 14" with a M1 Pro

Greetings and Thank you
Luca

Thanks for your quick answer. Good point. I went searching and found it really wasn't (linked) in any of those directories. While I had no success with linking, I just tried copying it and that seems to work. However now I'm getting an error because I'm running an ARM Processor.

  Referenced from: <136258B5-AD87-3E3C-97C2-307FF756D7F9> /Users/luca/.vscode/extensions/chipcode-nl.picoprobe-mac-1.0.6/bin/openocd
  Reason: tried: '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libusb-0.1.4.dylib' (no such file), '/usr/lib/libusb-0.1.4.dylib' (no such file, not in dyld cache)

But I guess it will be hard to troubleshoot for you if you don't have an Apple Silicon Machine. I'll look into compiling openocd myself and see if I get it running. That didn't work on the first try today as well.

Until then,
Luca

I could make it work by compiling it myself with the help of this Thread raspberrypi/openocd#7 (comment)

The main problem before was that the brew path is different on Apple Silicon Machines.