[sane-devel] Darwin: scanimage Undefined symbols

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 13 Dec 2002 12:04:41 +0100


On Fri, Dec 13, 2002 at 03:35:56AM +0100, Beat Birkhofer wrote:
> After a few modifications in libusb scanimage gets quite far -- the 
> lamp of the scanner lights up :-)

If the diff is not to big, can you post it here or on a webpage so we
can point other Mac users to it? Or is it already included in the
latest libusb?

> [plustek] LAMP-STATUS: 0x00000001
> [plustek] Lamp-Timer stopped
> [plustek] dwflag = 0x40000400 dwBytesPerLine = 744, dwLinesPerScan = 150
> [plustek] TIME START
> dyld: scanimage Undefined symbols:
> _sanei_scsi_find_devices
> [plustek] reader process...
> [plustek] reader_process started
> dyld: scanimage Undefined symbols:
> _sanei_scsi_find_devices
> Trace/BPT trap

Looks like the plustek backend uses this SCSI function but doesn't
link to the SCSI code. And yes, it has SCSI symbols in the library,
and they are undefined:

$ nm backend/.libs/libsane-plustek.so |grep scsi
          U sanei_scsi_find_devices

But the source code doesn't have any referneces to that function.

Now I know: The plustek library is linked against sanei_config2 but
doesn't seem to use it. Have a look at backend Makefile.in for the
following lines:

libsane-plustek.la: ../sanei/sanei_config2.lo
libsane-plustek.la: ../sanei/sanei_constrain_value.lo
libsane-plustek.la: ../sanei/sanei_usb.lo
libsane-plustek.la: ../sanei/sanei_lm983x.lo

Remove (or comment out) the config2 line. make distclean; configure ;
make ; make install.

That's a real bug and it's also in other backends:
 - as6e
 - canon_pp
 - mustek_pp
MacOS X is a real bugfinder :-)