Re: [PATCH]: Re: [Nautilus-list] Re: must not ship Nautilus 1.0.4 until we fix FAM support



On 17Jun2001 11:58PM (+0200), Yoann Vandoorselaere wrote:
> Maciej Stachowiak <mjs noisehavoc org> writes:
> 
> > On 17Jun2001 01:41PM (+0200), Yoann Vandoorselaere wrote:
> > > 
> > > [Put Ramiro in CC for approval]
> > > 
> > > The problem was the wrong assumption that g_module_build_path() would 
> > > lookup the module for you. It does not.   
> > > 
> > > Can I commit ?
> > > 
> > 
> > Hi Yoann,
> > 
> > Your patch is not correct. g_module_build_path will result in a name
> > like "libfam.so", which should get looked up in LD_LIBRARY_PATH and
> > the system hardcoded library locations by g_module_open (). 
> 
> This is wrong.
> In several distribution, there is only a .so if you installed the
> developpement package. This patch permit to lookup libfam.so.*.
> 

Yeah, I'm just explaining what it does. I agree that relying on a
devel package is wrong, but your change is wrong in even more serious
ways.

> > Your patch
> > will look up the library only in "/usr" and "/usr/lib", 
> 
> You mean /usr/local/lib & /usr/lib
> 

Yes.

> > which is wrong
> > when you have fam built in a custom prefix (as for example I do)
> 
> This imply adding a configuration option to Nautilus to tell where
> the fam library is...
 
The patch should search the same path that dlopen() would. I'm not
sure if this is possible to do in a totally portable way though. But I
expect shared objects to be found when I list their directory in
LD_LIBRARY_PATH.

> > , in
> > addition to unnecessarily scanning a bunch of huge directories.
> 
> We don't have the choise. Please read the rest of the thread.
> We need this lookup.

I don't think it's necessary. I think you could try loading
"libfam.so.0", and then "fam" expanded by gmodule internally (so it
adds the system-specific prefix) if that fails would do the trick.
 
> > Further, Nautilus is meant to work with a particular version of FAM,
> > which appears as libfam.so.0 on Linux, and your patch just checks for
> > "libfam" as a prefix, so it could find "libfam.so.1" which would not
> > work, or heck, even "libfamily.so".
> 
> libfam.so will not work... As far as I remember Darin said in a previous 
> mail (search the archives) that the lookup function would be the good way 
> to go.
> 
> You can't assume a given version will be installed on a system,
> so we have to rely on binary compatibility.

A name of libfam.so.1 is explicitly stating that the library is _not_
binary compatible with libfam.so.0.
 
> Yes, and as soon the fam will be distributed using package and that
> FAM soname will change, Nautilus will broke. No, I seriously think
> we should rely on binary compatibility, which will give us more chance
> of having Nautilus using FAM on whatever system than otherwise...

The soname is precisely what tells you whether the library is binary
compatible.

Regards,

Maciej





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]