On 2009-03-24 00:14, Ralf Wildenhues wrote: > * Kurt Roeckx wrote on Mon, Mar 23, 2009 at 11:07:00PM CET: > >> On Mon, Mar 23, 2009 at 11:03:59PM +0200, T?r?k Edwin wrote: >> >>> Agreed that it can't know all places, I am just asking that is searches >>> build location in preference of /usr/lib. >>> If I rm libclamunrar* from /usr/lib and /usr/local/lib, then it finds it >>> in the build dir just fine (libclamunrar_iface.la is in same directory >>> as libclamav.so that loads it) >>> >>> Alternatively does ltdl support some way of checking the version of >>> dlopened library? >>> > > But that's not necessarily relevant here. The versions could be the > same (by accident or intentional) and there would still be a problem. > (Maybe not in your case, but generally, yes.) > > >> So you think that the wrapper script should tell ltdl automaticly >> that it was linked to an uninstalled library? >> > > That's not relevant here either. We are talking about dlopened modules > here, which may not even exist at the time the wrapper script for the > executable has been built. > > Point is, ltdl cannot know which directories to search, and it currently > does not search '.' by default. You can either use > libtool --mode=execute -dlopen module-in-pwd.la ... > or set LTDL_LIBRARY_PATH to contain '.'. >
Thanks, that seems like a good solution, I can add that to the scripts launched by make check. I just straced the program when it works, and it picks the .so from .libs, not from '.', so it definetely already searches the place I want, its just that it searches it after /usr/lib: open("/home/edwin/.local/lib/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/x86_64-linux-gnu/libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) open("libclamunrar_iface.la", O_RDONLY) = -1 ENOENT (No such file or directory) access("/home/edwin/.local/lib/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) access("/lib/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) access("/usr/local/lib/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) access("/lib/x86_64-linux-gnu/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/x86_64-linux-gnu/libclamunrar_iface.so", R_OK) = -1 ENOENT (No such file or directory) open("/home/edwin/clam/git/builds/default/libclamav/.libs/libclamunrar_iface.so", O_RDONLY) = 3 If there is some reason why the search order can't be changed, I'll close this bug as notabug. > Here's why I think it may not be a good idea to change ltdl so that '.' > is searched by default by it: ltdl cannot for certain know whether it > was launched by an uninstalled program or library. And for installed > software to search '.' by default is a potential security risk. > Agreed. Best regards, --Edwin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org