Hi, On Wed, May 25, 2022 at 2:36 PM Wes Rishel <[email protected]> wrote:
> Thanks. This all worked now and I am a bit puzzled about testing. > It is a little difficult to know whether I am testing my temporary > version or the system version. The which command makes it look like the > system version will run and there is no change in the version number. Does > the which command not work when LD_LIBRARY_PATH is set? > > tevs@tevs-SEi:~/HETP/sane_install_220525c/backends$ env | grep LD_ > LD_LIBRARY_PATH=/home/tevs/HETP/sane_install_220525c_output/lib/sane > tevs@tevs-SEi:~/HETP/sane_install_220525c/backends$ > > > > > > > * ls -l /home/tevs/HETP/sane_install_220525c_output/bin total > 1096-rwxr-xr-x 1 tevs tevs 20144 May 25 14:20 gamma4scanimage-rwxr-xr-x 1 > tevs tevs 2723 May 25 14:20 sane-config-rwxr-xr-x 1 tevs tevs 359528 May > 25 14:20 sane-find-scanner-rwxr-xr-x 1 tevs tevs 213416 May 25 14:20 > scanimage-rwxr-xr-x 1 tevs tevs 519648 May 25 14:20 > umax_pptevs@tevs-SEi:*~/HETP/sane_install_220525c/backends$ > which scanimage > /usr/local/bin/scanimage > tevs@tevs-SEi: > > That's a good question. LD_LIBRARY_PATH influences the choice for the loading of shared objects. If you want to be sure about what is being loaded, you can use the SANE_DEBUG_DLL debug variable in your terminal where you have LD_LIBRARY_PATH set: SANE_DEBUG_DLL=3 scanimage -L 2>&1 | grep fujitsu Hopefully, the path that you see being dlopen'ed is pointing to the backend that you built. For me, I see this: rlittle@rlittlelaptop ~/play/sane/backends $ SANE_DEBUG_DLL=3 scanimage -L 2>&1 | grep fujitsu [14:52:12.843615] [dll] add_backend: adding backend `fujitsu' [14:52:23.587054] [dll] load: searching backend `fujitsu' in `/home/rlittle/sane-install/lib/sane:/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane' [14:52:23.587103] [dll] load: dlopen()ing `/home/rlittle/sane-install/lib/sane/libsane-fujitsu.so.1' [14:52:23.587453] [dll] init: initializing backend `fujitsu' [14:52:29.831289] [dll] sane_exit: calling backend `fujitsu's exit function Cheers, Ralph
