gmodule & libtool.



Hi there,

	I have a nice library installed with some type data that I wish to
load in using gmodule: the library is called eg. Bonobo_module. So I do a
g_module_open on the right prefix and Bonobo_module.

	parse_libtool_archive is called and correctly identifies the
library name:

[Bonobo_module.la]:

# The name that we can dlopen(3).
dlname='Everything_module.so.0'
...

	Then the code does:

  name = g_module_build_path (lt_libdir, lt_dlname);

	And instantly screws up the dlname by prepending a 'lib' and
appending a '.so' - for no reason I can particularly understand:

static gchar*
_g_module_build_path (const gchar *directory,
		      const gchar *module_name)
{
  if (directory && *directory) {
    if (strncmp (module_name, "lib", 3) == 0)
      return g_strconcat (directory, "/", module_name, NULL);
    else
      return g_strconcat (directory, "/lib", module_name, ".so", NULL);
  } else if (strncmp (module_name, "lib", 3) == 0)
    return g_strdup (module_name);
  else
    return g_strconcat ("lib", module_name, ".so", NULL);
}

	While I can see that perhaps the above feature is useful, it turns
a perfectly correct library name from libtool into:

	/path/libEverything_module.so.0.so	instead of:
	/path/Everything_module.so.0

	Is there any chance we could have a

	name = g_strconcat (lt_libdir, G_DIR_SEPARATOR_S, lt_dlname, NULL);

	there instead please ? or am I missing something cunning / complex
about libtool ? - I assume we're just trying to solve a problem twice that
libtool has already solved once for us.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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