[Ocfs2-tools-devel] Why not link libdlm_lt directly ?

Sunil Mushran sunil.mushran at oracle.com
Wed Oct 28 10:53:15 PDT 2009


Coly Li wrote:
> These days when I work on BNC#543119 (https://bugzilla.novell.com/show_bug.cgi?id=543119), which is an issue when
> loading libdlm_lt from libo2dlm.
>
> In current libo2dlm code, if HAVE_FSDLM is defined, dlopen() is called to open "libdlm_lt.so". libdlm_lt.so is included
> in libdlm-devel package, in libdlm2 package just libdlm_lt.so.3 included. Therefore when the system only installed
> libdlm2 without libdlm-devel, dlopen() to "libdlm_lt.so" gets failed. The result is, all tools accessing cluster lock
> will display an error "Unable to access cluster service ..."
>
> The fast and easy fix is just add libdlm-devel installation dependence to ocfs2-tools package, but IMHO it's kind of
> work around.

Why do you call this a workaround?

>
> Once thing I don't understand is, why libdlm_lt is not linked directly to libo2dlm when HAVE_FSDLM is defined ? Current
> code loads the library in run time and rename the symbols to fsdlm_xxxxx, it's a little bit complex than just including
> libdlm.h and linking libdlm_lt in build time.

Yes, but currently we also don't have to load the library if the user is 
using
o2cb even if built on a box having userspace clustering. Though I don't 
think we
care about that.

We had discussions about this this many moons ago. I don't remember 
whether we
evaluated the option you have proposed. Maybe Joel does.

But you are free to try it out. In the end, it needs to build and run 
cleanly on
systems that have and not have userspace clustering. All combinations.





More information about the Ocfs2-tools-devel mailing list