platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
138 stars 105 forks source link

dyld: Library not loaded: @executable_path/libusb-0.1.4.dylib #111

Closed aosodoev closed 5 years ago

aosodoev commented 5 years ago

Getting this error when trying to upload to Digispark Tiny:

dyld: Library not loaded: @executable_path/libusb-0.1.4.dylib
Referenced from: /Users/**********/.platformio/packages/tool-micronucleus/micronucleus
Reason: image not found

MacOS, Platformio core CLI. platfomio.ini:

...
[env:control]
platform = atmelavr
board = digispark-tiny
framework = arduino

Was able to upload successfully after creating symlinks to libusb-* files:

$ cd ~/.platformio/packages/tool-micronucleus/
$ ln -s lib/libusb-0.1.4.dylib
$ ln -s lib/libusb-1.0.0.dylib 

Hope this helps.

leonty commented 5 years ago

@ivankravets Could you please, take a look at this. I ran into the same problem now in a year after report.

DeviousPenguin commented 5 years ago

Thanks for posting the workaround with the symlinks, it now seems to upload OK for me on MacOS.

ivankravets commented 5 years ago

Thanks! Fixed. Please re-run pio update.

leonty commented 5 years ago

Thanks for the fix!

BTW, looking into the directory it still seems like the links should not be there and the script lib/libusb-config should be used instead with exec_prefix parameter to compose a correct command line for the linker during its call... I might be wrong, it just an overall impression.

ivankravets commented 5 years ago

Do you still have this issue?

leonty commented 5 years ago

No.