Building and loading of modules/plugins in XFCE

edscott edscott at prodigy.net.mx
Thu Sep 16 17:57:57 CEST 2004


El jue, 16-09-2004 a las 05:11, Maarten Boekhold escribió:
> Hi all,
> 
> While porting XFCE to cygwin, I learned about the many wonderful 
> peculiarities of building loadable modules on cygwin/windows.
> 
> There's a mysterious interplay between the name of the library in the 
> Makefile.am, the LDFLAGS, the resulting library name and the install 
> location of the library:
> 
> (1) plugin_LTLIBRARIES = libxfce4_combo.la
> 
> ==> the loadable module will be named 'cygxfce4_combo.dll'
> 
> (2) plugin_LTLIBRARIES = keyboard_plugin.la
> 
> ==> the loadable module will be named 'keyboard_plugin.dll'
> 
> (3) '-module' used in LDFLAGS
> 
> ==> the loadable module will be installed in the specified install directory
> 
> (4) *no* '-module' used in LDFLAGS
> 
> ==> the loadable module will be installed in ../bin (relative to the 
> specified install directory)
> 
> As many of the XFCE components assume that a loadable module is (1) 
> named 'libXXXX.<SOEXT>', and (2) located in a specific directory, some 
> of the modules fail to load, because the generated filenames (for 
> g_module_open) don't match the actual library names (btw. xfce4-panel 
> isn't affected by this, as it 'walks' the directory to get the actual 
> filenames of the plugins, same probably for mcs-manager).
> 
> So, we'll need to make sure that (1) all modules are built/installed 
> with the '-module' flag (for one, libxfcegui4 needs to be fixed), and 
> (2) the correct filenames are constructed for passing to g_module_open.

Is that a CFLAG or a LDFLAG?

> 
> In order to accomplish (2), it is sufficient to consistently use 
> g_module_build_path(<directory>, <module name>), where <module name> is 
> *without* a 'lib' prefix *and without* a <SOEXT> suffix. The platform 
> specific implementation of g_module_build_path will make sure that a 
> correct library name is created.

I've fixed and committed xfrun4 to construct the module name as
specified. As soon as you verify that the fix is correct, I will do the
same for module loading in xffm.

regards,

Edscott

> 
> At the least, xfce-utils/xfrun (libxfce4_combo) and xffm 
> (libxfce4_combo, libxfce4_mime) need fixing in this respect. Likely 
> there is more then these apps, and I would like to ask all authors if 
> they can spent a few minutes thinking which other pieces of XFCE might 
> be affected by this.
> 
> If you know of other places where library names are generated, please 
> drop me a mail, and I'll generate patches to make this portable to cygwin.
> 
> Kind regards,
> 
> Maarten
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list