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:
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.
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.
Not sure I understand the problem, but I applied your fix.