Using homebrew installed libusb on OS X

Report bugs found in the software. New release will fix those busg.
Post Reply
andrew867
Junior Member
Posts: 3
Joined: Fri Apr 16, 2010 3:58 pm

Using homebrew installed libusb on OS X

Post by andrew867 »

Hi!

I have libusb installed through homebrew as it's used for a bunch of other applications. When attempting to start USBJTAG NT I get this error:

Code: Select all

dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
  Referenced from: /Users/andrew/Downloads/USBJTAGNT-081-MAC-X86/USBJTAGNT
  Reason: no suitable image found.  Did find:
	/usr/local/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
	/usr/local/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
	/usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
	/usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
Abort trap: 6
Could you supply a x64 compiled version of USBJTAG NT for OS X or load your supplied libusb from the application directory? Thanks!
andrew867
Junior Member
Posts: 3
Joined: Fri Apr 16, 2010 3:58 pm

Post by andrew867 »

I got it working by using this command in the folder where I extracted USBJTAG NT:

Code: Select all

install_name_tool -change /usr/local/lib/libusb-1.0.0.dylib @executable_path/libusb-1.0.0.dylib USBJTAGNT

I then placed the libusb-1.0.0.dylib and libusb-1.0.a files as well as the downloaded frameworks in the same folder next to USBJTAGNT.
andrew867
Junior Member
Posts: 3
Joined: Fri Apr 16, 2010 3:58 pm

Post by andrew867 »

Log of the commands I used:

Code: Select all

Andrews-MacBook-Pro:USBJTAGNT-081-MAC-X86 andrew$ otool -L ./USBJTAGNT 
./USBJTAGNT:
	/usr/local/lib/libusb-1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.3)
	QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.6.0, current version 4.6.3)
	QtCore.framework/Versions/4/QtCore (compatibility version 4.6.0, current version 4.6.3)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7)
Andrews-MacBook-Pro:USBJTAGNT-081-MAC-X86 andrew$ install_name_tool -change /usr/local/lib/libusb-1.0.0.dylib @executable_path/libusb-1.0.0.dylib USBJTAGNT 
Andrews-MacBook-Pro:USBJTAGNT-081-MAC-X86 andrew$ otool -L ./USBJTAGNT 
./USBJTAGNT:
	@executable_path/libusb-1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.3)
	QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.6.0, current version 4.6.3)
	QtCore.framework/Versions/4/QtCore (compatibility version 4.6.0, current version 4.6.3)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests