Thank you for both Dr. Toms (does the name Thomas imply in depth
knowledge of Tru64 unix? ;-) for helping to solve the
problem! The problem is not with dlopen, but in the way how
shared libraries are used.
The problem was, that dlopen didn't find symbols in a shared
library linked by another shared library. As Dr. Blinn points
out, it has to be known at the invocation time of dlopen(),
where the symbols are defined. Thus, if you dlopen() a shared
module, which references another shared module, care must be
taken to load the modules in such an order, that dependencies
are resolved before the second dlopen(). Apparently, shared
libraries are only scanned once, which makes it difficult to
design the dynamic modules in a way, that all interdependencies
are resolved correctly. This is how it is supposed to work, you
only load what you need when you need it, not everything.
This was also the case with Apache using php4 AND mmap_static.so
(module mmap'ing other stuff to memory to speed things up).
Either one or the other has to be left out, or linked in
statically to make it work. Dr. Leitner provided me with a
working combination of "./configure" -settings to make things
work. However, as I needed to use the mmap_static -module, there
wasn't much more to do than statically link the php4.a into
apache (or vice versa). The only tradeoff of this was increased
memory consumption. In this case, memory is much cheaper than
all the time consumed on changing the code to do it dynamically.
They _do_ say in Apache documentation, that the mmap_static
-module is _experimental_, albeit a working one.
ArNO
2
Received on Mon Jan 29 2001 - 14:39:49 NZDT