After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95280 - GTK should be more flexible about how GTK_MODULES must be named.
GTK should be more flexible about how GTK_MODULES must be named.
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Solaris
: Low normal
: Small feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-10-09 12:48 UTC by Brian Cameron
Modified: 2013-02-11 05:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brian Cameron 2002-10-09 12:48:50 UTC
Right now _gtk_find_module in gtkmain.c always adds "lib" to the beginning
of the library name and adds ".so" to the end of the library name.  This
is because it only uses  g_module_build_path() to build the path.
Therefore, it will only find the module if it follows this naming
convention. 

If you want to name a GTK_MODULE without following this convention, the
only workaround is to provide the full path to the GTK_MODULE, but
this is not desirable since it is obviously preferable to find the
module in the GTK_MODULE_PATH.

The reasons it would be better if this were more flexible follow:

* On Sun systems, it is a requirement that if a library will never be
  linked against that the "lib" prefix not be included.  GTK_MODULES
  will normally never be directly linked against (instead they are only
  opened via dlopen calls), so it would be preferable to not prefix them
  with "lib" on Solaris.
* For versioning purposes it is preferable to suffex libraries with a
  version number such as "modulename.so.1" or "modulename.so.2". 

Therefore it would be nice to check the literal GTK_MODULE value as
provided so if the module is specified, that it will check 
path/<provided_module_name> before checking
path/lib<provided_module_name>.so.  This way if I wanted to name my
GTK_MODULE "mymodule.so.1" I could just provide that string, and it
would work.

There might be other suggestions of how to allow GTK_MODULES to have
names which do not include the "lib" or to allow them to include a
".<version#> at the end.
Comment 1 Maciej Katafiasz 2004-01-24 12:57:58 UTC
How would that interact with names on Win32? Requesting
"my_module.so.1" will then lead to clumsy names like
"my_module.so.1.dll" probably. How is that solved when linking to
normal libs that always have implicit "lib" and ".so" added, yet can
have version suffix? GTK+ should probably copy that behavior, maybe
with exception that literal name will be searched first and only then
with prefixes and suffixes attached.
Comment 2 Matthias Clasen 2013-02-11 05:10:37 UTC
closing old bugs