GithubHelp home page GithubHelp logo

Comments (3)

jeremyhu avatar jeremyhu commented on July 22, 2024 1

This is a pretty serious issue that makes the flasher completely unusable on macOS for most users.

The issue here is that the dfu-util executable has a link against a library that it depends on (libusb-1.0.0.dylib). At build time, the library that was linked against contained a dylib id of /usr/local/opt/libusb/lib/libusb-1.0.0.dylib which is where the dynamic linker / loader (dyld) looks for it on the system at runtime.

This library is located within the edgetx-flasher.app app bundle. The build system should be using @loader_path relative links to resolve these. There's also no reason to distribute these win64 and linux binaries as part of the darwin flasher app, but that's not the core problem here.

Also note that the release contains two separate copies of the dylib. Presumably these were at one point hard or symlinks. There's also a static archive version and a libtool .la which are useless to end users:

$ ls -al
total 980
drwxr-xr-x 11 jeremy admin    352 Apr 18 08:02 .
drwxr-xr-x  5 jeremy admin    160 Apr 18 08:02 ..
-rwxr-xr-x  1 jeremy admin  19612 Apr 18 07:59 dfu-prefix
-rwxr-xr-x  1 jeremy admin  19604 Apr 18 07:59 dfu-suffix
-rwxr-xr-x  1 jeremy admin  57756 Apr 18 07:59 dfu-util
-rwxr-xr-x  1 jeremy admin 124856 Apr 18 07:59 libusb-1.0.0.dylib
-rw-r--r--  1 jeremy admin 405136 Apr 18 07:59 libusb-1.0.a
-rwxr-xr-x  1 jeremy admin 124856 Apr 18 07:59 libusb-1.0.dylib
-rwxr-xr-x  1 jeremy admin    975 Apr 18 07:59 libusb-1.0.la
-rwxr-xr-x  1 jeremy admin 206188 Apr 18 07:59 lsusb
-rwxr-xr-x  1 jeremy admin  28368 Apr 18 07:59 usbhid-dump

Ok... so users can fix things themselves while waiting for a new release by using install_name_tool to fixup the linkage:

cd /Applications/edgetx-flasher.app/Contents/src/support/dfu-util/darwin 
rm libusb-1.0.a libusb-1.0.la libusb-1.0.dylib
install_name_tool -id @loader_path/libusb-1.0.0.dylib libusb-1.0.0.dylib
install_name_tool -change /Users/tormod/dfu-util/libusb-git/../build/lib/libusb-1.0.0.dylib @loader_path/libusb-1.0.0.dylib lsusb
install_name_tool -change /Users/tormod/dfu-util/libusb-git/../build/lib/libusb-1.0.0.dylib @loader_path/libusb-1.0.0.dylib usbhid-dump 
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @loader_path/libusb-1.0.0.dylib dfu-prefix
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @loader_path/libusb-1.0.0.dylib dfu-suffix 
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @loader_path/libusb-1.0.0.dylib dfu-util 

from flasher.

richard-scott avatar richard-scott commented on July 22, 2024

I've had to run this to get it to work:

brew install dfu-util

from flasher.

bigtwin avatar bigtwin commented on July 22, 2024

I have a highly similar symptom while trying to use edgetx-flasher on my Intel-based Mac OSX Mojave to work with my Taranis X9 Lite. Unfortunately I neither understand @jeremyhu analysis nor what is ment by @richard-scott contribution. I cannot judge whether this is related at all:

Waiting for dfu-util...dyld: Library not loaded: /usr/local/opt/libusb/lib/libusb-1.0.0.dylib
Referenced from: /Applications/edgetx-flasher.app/Contents/src/support/dfu-util/darwin/dfu-util
Reason: image not found

from flasher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.