On Thursday 10 December 2009 02:25:24 am Matt Taggart wrote: > Hi Christian, > > Thanks for your mail to Debian bug #555982 regarding libextractor plugins. > > I brought up the issue on that bug due to the policy concerns, but the > actual bug I am seeing is in the fossology package which uses libextractor > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531864 > > Here is a link to the upstream source for the part of fossology that uses > libextractor > > http://tinyurl.com/yeoc6qf > > (The Makefile at that URL currently has the rpath fix listed in the above > bug report, but that is probably wrong to be doing) > > Is this an OK way to be using libextractor? or maybe there is a bug > somewhere?
Well, I don't see why they do the rpath thingy. "-lextractor" should be all that is needed. Now, if fossology internally messes with libltdl's lt_dlsetsearchpath and somehow removes the entries added by libextractor. That *would* cause trouble for LE finding its plugins (which could be in turn worked around using rpath; however, removing existing entries from the lt_dlsearchpath is then the real issue that should be resolved if possible). The ChangeLog of the Makefile suggest that they were trying to resolve a problem with plugins not being found. Now, I don't know under which conditions and when that problem occurred, but the fix using rpath is certainly not what I would recommend -- it should not be needed. So if you can find out what breaks and why if the rpath is removed, that'd be better. For reference, here is how it should work for LE on GNU/Linux: LE will (when initialized by the linker) open /proc/self/maps and look for a line with "libextractor" on it. If that exists, it'll extract the path to libextractor.so from that and expect plugins to be in the "libextractor/" subdirectory (so /usr/lib/libextractor.so => /usr/lib/libextractor/* for plugins). If that fails, it'll go after /proc/self/exe and hopes that if the binary is in '/foo/bin/binary' the plugins will be in '/foo/lib/libextractor'. As I mentioned before, this behavior can be changed using LIBEXTRACTOR_PREFIX. Given this, I don't see how rpath is needed. Best, Christian -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

