uldaq
uldaq copied to clipboard
libusb problem on M1 Mac
I cannot build the library on an M1 Mac- ./configure gives an error:
checking operating system... arm-apple-darwin21.4.0
Mac OS X
checking for libusb_init in -lusb-1.0... no
Library libusb-1.0 was not found on this system.
Please install it and re-run ./configure
even though I have installed libusb using homebrew and it claims that it is a universal build.
config.log says:
configure:16180: checking for libusb_init in -lusb-1.0 configure:16205: gcc -o conftest -O3 conftest.c -libusb-1.0 -framework IOKit -framework CoreFoundation >&5 ld: library not found for -libusb-1.0 clang: error: linker command failed with exit code 1 (use -v to see invocation) configure:16205: $? = 1 configure: failed program was: | /* confdefs.h */
The build on my x86 iMac seemed to work fine.
Hello, unfortunately, uldaq is not currently compatible with MacBook Pro with M1 apple silicon. At this time, I do not have a timeframe for when it will be.
Sorry for the inconvenience.
see also #43 #27
This worked for me:
Download the source from github.com: https://github.com/libusb/libusb/releases/tag/v1.0.26
Build it in the standard way:
$ tar xvfj libusb-1.0.26.tar.bz2 $ cd libusb-1.0.26 $ ./configure $ make $ make check $ sudo make install
Then you can continue on with uldaq installation at ./configure && make
Oddly I still get the same error on ./configure- possibly not connecting to the right "libusb"? I am stumped by this. `checking how to hardcode library paths into programs... immediate checking operating system... arm-apple-darwin21.4.0 Mac OS X checking for libusb_init in -lusb-1.0... no
Library libusb-1.0 was not found on this system. Please install it and re-run ./configure`
no promises but something else you could try, would be to install MacPorts https://www.macports.org/install.php
While I was working on the solution on my MacBook Pro 14, I had installed this along the way.
@etjensen could you please check your /opt/homebrew/lib/ folder to see if the libusb-1.0.0.dylib file is installed there?
I was able to get past this by adding some additional flags pointing directly at homebrew:
$./configure LDFLAGS="-L/opt/homebrew/lib" CPPFLAGS="-I/opt/homebrew/include"
Then we can make normally
$make