RFC: librep without .la files, rep-gtk combined



While trying to get Sawfish into Fedora I had to remove libtool's .la
files from rpm. By doing that everything broke.

[QuickNote: .la is a simple text file, pointing to .so and with other
info not used by librep.]

It seems that librep uses ".la" file extension to check if
loaded module is a rep module or not. Librep also uses private
extensions inside .la file: rep_open_globally and rep_requires.

After bit of digging I created a quick patch (against tarball, not git):

http://b.bbbs.net/sawfish/librep-0.91.1-dynamicload.patch

Part 1: Changes that librep tries to open .so instead of .la.

Part 2: Assume that .so is a rep module. My quick grep didn't find
anything trying to load .so files.

Sounds dangerous? I hope not. Librep checks if loaded module contains
rep_dl_init/kill symbols correctly. Everything else should also be
protected by "if"'s.

One side effect of this patch: is_rep_module variable is always
true and rep_intern_dl_library() is never called with ".la" file. Lot
of dead code there, which I did not try to remove yet...

As I mentioned, there were private extensions inside .la:

rep_open_globally: only used in rep-gtk's gtk.la and types.la
rep_requires: only used in gtk.la to load types.la

So I had to create another quick and really dirty patch:

http://b.bbbs.net/sawfish/rep-gtk-0.90.5-combinetypes.patch

This combines gtk.so and types.so into one module (gtk.so). Again my
quick grep didn't find anybody using types.so directly.

I applied these two patches, recompiled everything and removed
all .la files: Sawfish works fine for me!

Comments? Ideas? Anything?


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