[sane-devel] USB problems with SANE on MacOS
Oliver Schwartz
Oliver.Schwartz at gmx.de
Sun Apr 28 16:22:44 BST 2019
Umberto,
> I would like to try this patch, how can I do?
You can add the patch to the homebrew formula (see the attached file). To do this, either use
brew edit sane-backends
or replace the file directly (/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sane-backends.rb).
You need to install Xcode from the Apple app store to compile from source.
The compilation didn’t work for me out of the box because of a missing include file ‘jerror.h’. To fix this, I had to create another symlink:
cd /usr/local/include
ln -s ../Cellar/jpeg/9c/include/jerror.h
Then, run
brew reinstall sane-backends -s
> Another thing: since the Mac recognize the USB Scanner already, would it be possible to utilize the default macOS library for handling usb devices? So configuring sane-backends with this instead of libusb. I’m just asking. I tried searching something, I found old Apple Developer articles about it – e.g. https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/USBBook/USBIntro/USBIntro.html#//apple_ref/doc/uid/TP40002643-TPXREF101
There is not much benefit to gain - the beauty of libusb is that it provides a common interface to usb related tasks on every platform. The different behaviour concerning configuration of custom devices is not a libusb problem, it is just different behaviour of the underlying operation system. So circumventing libusb wouldn’t fix anything.
Kind regards,
Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sane-backends.rb
Type: text/x-ruby-script
Size: 2496 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20190428/25b6d6e1/attachment.bin>
More information about the sane-devel
mailing list