libkdeinit_ libraries

Waldo Bastian bastian at
Wed Jul 16 23:06:03 BST 2003

Hash: SHA1

On Wednesday 16 July 2003 23:45, Michael Matz wrote:
> Hi,
> On Wed, 16 Jul 2003, Adriaan de Groot wrote:
> > Recently, KDE HEAD stopped starting up for me, with all kdeinit started
> > processes yielding errors because of a missing kdemain function. This is
> > documented in the "kdeinit & missing "main" symbol" thread on -devel.
> >
> > The attached patch looks in libkdeinit_foo before looking in foo itself,
> > and gets KDE HEAD started properly. I'm hesitant to just commit it, since
> > I don't really know (a) what this kdeinit stuff is good for (b) what to
> > do in the other branch of the if(), when the pathname starts with a / .
> I have not read the thread on kde-devel, but your patch definitely is
> wrong, in the sense that it's a workaround for something which shouldn't
> happen, which only works on ELF systems.  You can't dlopen libraries
> basically.
> kinit.cpp should search for "kdemain" _and_ "main" symbols in the tried
> DSO, and if I read correctly it indeed does so for version
> "KDE_IS_VERSION(3, 90, 0)".  Unless all (or at least most) of KDE CVS is
> converted to do it correctly this should remain this way (i.e. search main
> if kdemain isn't found).
> It should be investigated, why the DSO in question didn't provide a
> kdemain symbol, and second why kinit didn't look for main in that case.

The problem is that the kdemain() is placed in the wrong library.

kdemain is in dcopserver.cpp and the Makefile adds a forward declaration in as well.

dcopserver.cpp gets compiled into dcopserver.lo and linked into gets compiled into and linked into the 
dcopserver executable. gets linked against dcopserver_dummy.lo (which is build from the 
empty dcopserver_dummy.cpp) and So contains kdemain, but itself does not.

IMHO A solution would be to let dcopserver_dummy.cpp contain a forward 
declaration just like, instead of being empty.

- -- 
bastian at -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


More information about the kde-core-devel mailing list