Opened 6 years ago

Last modified 3 days ago

#57505 new defect

sane-backends @1.0.27_2: Regression / libusb vs libusb-compat library linkage

Reported by: sheesupport (sheesupport) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: l2dy (Zero King), cooljeanius (Eric Gallager)
Port: sane-backends

Description

After upgrading my port installation, I noticed that my scanner

$ scanimage -L
device `plustek:libusb:020:002' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

didn't get recognized anymore. I tracked it down to sane-backends port package. The older version 1.0.24_0 was/is linked against libusb-compat (@0.1.4_0) and the current version of sane-backends is linked against libusb @1.0.22_0.

I was not able to force the build process to link against the libusb-compat library. There was a change between 1.0.24 and 1.0.27.

Any way to provide a solution via a variant?

Right now, I downgraded the sane-backends port package:

$  /opt/local/bin/scanimage -V
scanimage (sane-backends) 1.0.24; backend version 1.0.24
$ port version
Version: 2.5.4
$ otool -L /opt/local/bin/scanimage
/opt/local/bin/scanimage:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1259.22.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/opt/local/lib/libsane.1.dylib (compatibility version 2.0.0, current version 2.24.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/opt/local/lib/libtiff.5.dylib (compatibility version 9.0.0, current version 9.0.0)
	/opt/local/lib/libjpeg.9.dylib (compatibility version 13.0.0, current version 13.0.0)
	/opt/local/lib/libusb-0.1.4.dylib (compatibility version 9.0.0, current version 9.4.0)
	/usr/lib/libcups.2.dylib (compatibility version 2.0.0, current version 2.11.0)
	/opt/local/lib/libnetsnmp.35.dylib (compatibility version 36.0.0, current version 36.0.0)
	/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.14.0)

Change History (3)

comment:1 Changed 6 years ago by jmroot (Joshua Root)

Cc: l2dy added

I don't think you can be sure that libusb-compat vs libusb is the problem. The former is just a compatibility wrapper that provides the older API, and uses the latter under the hood. If sane-backends wasn't using the new API, it would fail to link. There could easily be some other change in the newer version of sane-backends that is causing the problem.

comment:2 Changed 6 years ago by sheesupport (sheesupport)

Thanks for the hint. I see that the compat lib is linked against libusb.

While @1.0.24_0 was used on the system right before, I rebuild @1.0.27_0 and @1.0.27_2. The latter also with and without explicit --with-usb.

The funny thing starts now. From all builds the "scanimage -L" shows the scanner. This stands in contrary to my experience before. So, what was going on.

The scanner was the whole time connected and by that means in some way "initialized". Unplugging and plugging the usb scanner shows that it gets no more recognized by @1.0.27. Soft/Cold-Reboots didn't help.

Switching to @1.0.24_0 back shows the scanner again and unplugging and plugging keeps the scanner still available.

So, could the problem be a missing rescan of the usb bus?

comment:3 Changed 3 days ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.