* Török Edwin wrote on Tue, Mar 24, 2009 at 08:08:20PM CET: > Current directory = /home/edwin/clam/git/builds/default > clamscan/clamscan = libtool wrapper script > $ ldd clamscan/.libs/lt-clamscan
Please show "objdump -p clamscan/.libs/lt-clamscan", it should have a DT_RPATH entry for /home/edwin/clam/git/builds/default/libclamav/.libs. > libclamav.so.6 => > /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6 > (0x00007f6ae76cb000) Here's what I think is happening: ltdl first checks all the paths that it searches, those set by lt_dl*searchdir (which it seems you haven't used), then those set by LTDL_LIBRARY_PATH (which you should set for the tests), then those set by $shlibpath_var (LD_LIBRARY_PATH on Linux), then the paths that the runtime linker searches for by default ($sys_lib_dlsearch_path_spec in libtool). Then, after all that failed, it tries to open the file without a path. This all happens once for the *.la file. Why the *.la file is searched for in the current directory not clear to me, may be a bug. So, after all that failed, the same search is done for the *.so file. Now, ltdl uses access to try for the file, and then dlopen to try to open it. This dlopen of the file without a path causes dlopen to employ its own search strategy. This of course puts the DT_RPATH entries from the executable early (in Debian) in the search path. See above: it thus finds the library. In this case, i.e., on GNU/Linux, I'd probably say that this last attempt to open without a directory component is probably not necessary. However, unfortunately it is necessary on some other systems. Anyway, you really should use LTDL_LIBRARY_PATH to reliably find the module in the test suite. Because if you happen to statically link against all libraries that happen to live in /home/edwin/clam/git/builds/default/libclamav/.libs, then this last dlopen will not save you as there won't be a run path for that directory. I hope this helps. Cheers, Ralf -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

