[openib-general] [PATCH/RFC] libibverbs: Improve driver loading

Roland Dreier rdreier at cisco.com
Thu Jan 4 13:49:03 PST 2007


 > Wrt static linking: I see this warning when I link with -static:
 > : warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
 > And it actually crashes inside dlopen on some platforms.

Which platform?  Is it crashing in dlopen(NULL) (my heuristic for
detecting a static application).

 > Would it be possible to add a configuration option to avoid using dlopen
 > for static apps? Or, maybe, it makes more sense to make an empty stub for libdl,
 > and ask apps to link with that?

The ideal solution would be to build the library twice, once for
static and once for dynamic, and pass in a different preprocessor flag
so we can only use dlopen() when it has a chance at working.  But it's
hard to do that with libtool/automake, and I don't feel like
hand-crafting a build system right now.

OTOH static linking is such a corner case that I don't want to waste
too much time on it.

 - R.




More information about the general mailing list