libsane-hpaio needs to link against -lsane

Bug #405407 reported by Tim Waugh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

libsane-hpaio needs to link against libsane so that applications don't crash.

https://bugzilla.redhat.com/show_bug.cgi?id=234813

Revision history for this message
Tim Waugh (twaugh) wrote :
Revision history for this message
David Suffield (david-suffield) wrote :

Not sure I understand the problem, but I applied your fix.

Revision history for this message
martin_jacobs (martin-jacobs) wrote :

IMHO this is wrong. No libsane-<backend>.so.* library is linked against libsane!

sane tools like scanimage load backends dynamically (depending on backends listed in /etc/sane.d/dll.conf). Functions inside backends are called from their libsane based host (e.g. scanimage) but not vice versa.

My 3.9.6b works definitely (scanimage, xsane) without having this patch applied. ldd libsane-hpaio.so.1.0.0 lists:

        libhpip.so.0 => /usr/lib/libhpip.so.0 (0x40036000)
        libhpmud.so.0 => /usr/lib/libhpmud.so.0 (0x4005a000)
        libcups.so.2 => /usr/lib/libcups.so.2 (0x40139000)
        libdl.so.2 => /lib/libdl.so.2 (0x40216000)
        libc.so.6 => /lib/libc.so.6 (0x40219000)
        libm.so.6 => /lib/libm.so.6 (0x40338000)
        libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0x4035b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40363000)
        libnetsnmp.so.15 => /usr/lib/libnetsnmp.so.15 (0x40378000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4044d000)
        libz.so.1 => /lib/libz.so.1 (0x4047e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Some hints:
- scanimage -L lists network based HP all-in-one scanners only with complete CUPS setup.

- very basic test:
   snmpwalk -Os -c public -v 1 <your hp hostname or ip> 1.3.6.1.4.1.11.2.3.9.1.1.7.0
   should give something like
   enterprises.11.2.3.9.1.1.7.0 = STRING: "MFG:HP;MDL:Photosmart C7200 series;CMD:MLC,PCL,PML,DW-PCL,DESKJET,DYN;1284.4DL[...]

- workaround:
* hp-probe -bnet
   should list your HP device.
* hp-makeuri <Hostname or IP>
   gives you three URIs. Grabe the one starting with "hpaio:", create file /etc/sane.d/dll.aliases, choose an alias for your device, e.g. myaio and put one line into that file
   myaio <hpaio-uri>
   replace <hpaui-uri> with URI from output of hp-makeuri
* then start xsane myaio and be happy.
* Drawback: scanning from inside OpenOffice or GIMP is not possible with this approach, because scanimage -L does not list your scanner! As mentioned above, to get this you need a complete CUPS setup.

Revision history for this message
Tim Waugh (twaugh) wrote :

I've just re-tested the original problem (OpenOffice.org crashing when attempting to scan) and it is already fixed without needing to link the SANE backend against libsane.

Sorry, I should have re-tested this before submitting the patch originally.

Revision history for this message
David Suffield (david-suffield) wrote :

No problem, I removed the -lsane link from the tip.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.