On Thu, Jul 13, 2006 at 07:28:12AM +0200, Yannick Lecaillez wrote:
> In fact, all backends need elektra since they all use Key, KeySet struct
> and their relative function. But, since these backend are dl_open() from
> libelektra it seems symbol are correctly resolved at this time. But i don't
> know if the constation that this works under Linux without add libelektra to
> LIBADD's backends is a suffisant reason to not add it ... ?

Indeed there should be libelektra.la in LIBADD for all the modules
that need libelektra symbols. Recent Linux is a bad platform to test
for implementations of libraries with the kind of deficiencies libtdl
is working around.

> About the static version there are several issue :
>     * We shortcut libtool works providing our hand made stuff ;
>        (and so we have to maintain uninteresting sutff like this
> backend_symbols.c)
>     * That need to compile twice most of source code ;
> 
> Iirc, the only problem which forced us to act like that is we don't know
> the real name of libelektra-default. Libltdl have great stuff for manage
> shared or static version totally transparently, but "default" backend isn't
> a real backend. Searching symbol "kdbBackendFactory" from
> "libelektra-default"
> using libltdl simply fail cause of that (libltdl search for
> "libelektra_default_LTX_kdbBackendFactory"
> symbol). If we are able to know the true name of default backend,
> this would be no more a problem.

In fact kdbBackendFactory should be libelektra_##module##_LTX_kdbBackendFactory
for all the modules in any case. Otherwise, on platform which don't
support having the same symbols defined more than once it will break.
It is explained in 
info libtool 'Modules for libltdl'

However libelektra itself should not have to do the kdbBackendFactory
name mangling. So in my opinion 
typedef struct _KDBBackend *    KDBHandle;
should be in kdb.h and no file in libelektra dir should include kdbbackend.h,
the magic is handled by libtdl.



Still I don't see why 'If we are able to know the true name of default 
backend, this would be no more a problem.' Indeed to have the default-backend
statically compiled in libelektra, one have to shortcut libltdl anyway,
otherwise it will try to use ldopen to find the default-backend, at least
on platforms which support dynamic libraries. 


But maybe I am completly missing your point, since you may be instead 
referring to the fact that currently @default_backend@/DEFAULT_BACKEND
isn't used (in backend_symbols.c) when linking statically because
of libtdl limitations.

--
Pat


-------------------------------------------------------------------------
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

Reply via email to