On Wed, Jul 12, 2006 at 07:04:06PM -0300, Avi Alkalay wrote: > I think that if a developer wants to staticaly link itself to Elektra and > some specific backend, the package should provide .a of them all, and the > linkage should be constructed by himself.
It seems to me that it is not possible without some 'cooperation' with the code in libloader. The current code allows to statically select the statically linked backends, I don't have a better idea on top of my head (when libloader is compiled with -D__STATIC, the list being provided in libelektra/backend_symbols.c, still with -D__STATIC). > Also, seems to be desireable to link to several static backends together, > but symbol colision may happen since all backends implement at least one > symbol with same name called > "kdbBackendFactory<http://elektra.sourceforge.net/elektra-api/html/group__backend.html#ga20> > ". This is solved by the current code, in a way that seems satisfactory to me, with the help of libtool which 'enforce' namespacing of the symbols. > I don't know if all this is possible, and I don't know why libltdl was > included in Elektra source. It simplifies a lot dlopening. Especially for platforms without shared libraries. > The final purpose of the lib is to bee shared, with external pluggable > backends, but in a transition time, while Elektra is not included by default > in distros, developers may want to staticaly link to it. I don't feel good > to sacrifyce a simple shared linkage to have a complex static linkage. > > What can we do to fix it ? My opinion is that the code associated with the static linking is hacky but clean. So it is fine, except that there is this circular dependency: libelektra needs backends (for the static filesys) backends needs libelektra (for kdbd) I have come with a solution for that issue. I attach a patch for src/Makefile.am in order to ensure that first backends/filesys is built, then libelektra, then other backends. (as a side note I have an additionnal patch that allows to have a working make distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-experimental" that I'll propose once the others are merged). -- Pat
Index: Makefile.am =================================================================== --- Makefile.am (révision 837) +++ Makefile.am (copie de travail) @@ -6,6 +6,12 @@ AM_CFLAGS=-g -O2 -SUBDIRS = libloader backends libelektra libelektratools libregistry kdb include bindings +all-local: + (cd backends/filesys && $(MAKE) $(AM_MAKEFLAGS) all) +if EXPERIMENTAL + (cd backends/ini && $(MAKE) $(AM_MAKEFLAGS) all) +endif + +SUBDIRS = . libloader libelektra backends libelektratools libregistry kdb include bindings EXTRA_DIST = Doxyfile
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Registry-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/registry-list
