use strict; use warnings; push @INC,"lib"; require LicenseInterface; print "LicenseInterface got loaded\n"; #### test.pl |--lib\ |--LicenseInterface.pm |--auto\ |--LicenseInterface\ |--LicenseInterface.bs (added this to try to influence @dl_resolve_using) |--LicenseInterface.so |--libLicIntfcLib.so |--llibmgr11.so #### [boleary@new-host testLib]$ ldd auto/LicenseInterface/LicenseInterface.so linux-gate.so.1 => (0x00f36000) libLicIntfcLib.so => not found ****This is the .so that dynaloader can't resolve*** libperl.so => not found ###BUT THIS ONE gets resolved!!! libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00508000) libm.so.6 => /lib/libm.so.6 (0x00331000) libc.so.6 => /lib/libc.so.6 (0x00ac4000) /lib/ld-linux.so.2 (0x002c3000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00ed9000) [boleary@new-host testLib]$ ldd auto/LicenseInterface/libLicIntfcLib.so linux-gate.so.1 => (0x0025c000) liblmgr11.so => not found ****This is the other .so that dynaloader can't resolve*** libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00682000) libm.so.6 => /lib/libm.so.6 (0x00ce7000) libc.so.6 => /lib/libc.so.6 (0x00d40000) /lib/ld-linux.so.2 (0x002c3000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00143000) #### DynaLoader.pm loaded (/opt/ActivePerl-5.18/site/lib /opt/ActivePerl-5.18/lib . lib, /lib /usr/lib /usr/local/lib) DynaLoader::bootstrap for LicenseInterface (auto/LicenseInterface/LicenseInterface.so) Can't load './auto/LicenseInterface/LicenseInterface.so' for module LicenseInterface: libLicIntfcLib.so: cannot open shared object file: No such file or directory at /opt/ActivePerl-5.18/lib/DynaLoader.pm line 191. #### export LD_LIBRARY_PATH=./auto/LicenseInterface [boleary@new-host testLib]$ perl test_simple.pl DynaLoader.pm loaded (/opt/ActivePerl-5.18/site/lib /opt/ActivePerl-5.18/lib . lib, /lib /usr/lib /usr/local/lib ./auto/LicenseInterface) DynaLoader::bootstrap for LicenseInterface (auto/LicenseInterface/LicenseInterface.so) LicenseInterface got loaded #### BEGIN { $ENV{LD_LIBRARY_PATH}.="./auto/LicenseInterface"; } use strict; use warnings; push @INC,"lib"; require LicenseInterface; print "LicenseInterface got loaded\n"; exit #### perl test_simple1.pl DynaLoader.pm loaded (/opt/ActivePerl-5.18/site/lib /opt/ActivePerl-5.18/lib . lib, /lib /usr/lib /usr/local/lib ./auto/LicenseInterface) DynaLoader::bootstrap for LicenseInterface (auto/LicenseInterface/LicenseInterface.so) Can't load './auto/LicenseInterface/LicenseInterface.so' for module LicenseInterface: libLicIntfcLib.so: cannot open shared object file: No such file or directory at /opt/ActivePerl-5.18/lib/DynaLoader.pm line 191. at lib/LicenseInterface.pm line 11. Compilation failed in require at test_simple1.pl line 8. #### push @dl_resolve_using=dl_findfile( qw( ./auto/LicenseInterface/libLicIntfcLib.so ./auto/LicenseInterface/liblmgr11.so ) ); #### perl test_simple1.pl DynaLoader.pm loaded (/opt/ActivePerl-5.18/site/lib /opt/ActivePerl-5.18/lib . lib, /lib /usr/lib /usr/local/lib ./auto/LicenseInterface) DynaLoader::bootstrap for LicenseInterface (auto/LicenseInterface/LicenseInterface.so) BS: ./auto/LicenseInterface/LicenseInterface.bs (linux, dl_dlopen.xs) dl_findfile(./auto/LicenseInterface/libLicIntfcLib.so ./auto/LicenseInterface/liblmgr11.so) dl_findfile found: ./auto/LicenseInterface/libLicIntfcLib.so ./auto/LicenseInterface/liblmgr11.so Can't load './auto/LicenseInterface/LicenseInterface.so' for module LicenseInterface: libLicIntfcLib.so: cannot open shared object file: No such file or directory at /opt/ActivePerl-5.18/lib/DynaLoader.pm line 191. at lib/LicenseInterface.pm line 11. Compilation failed in require at test_simple1.pl line 8.