Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed change to DYNAMIC LINKING
I think we might need a change to the way dynamic linking works.
Let me explain...
Let's say I have two modules.. (X11 gXt) and (X11 gXm). Both are
by shared libraries written in C. The libgXm.so depends on libgXt.so.
Now it had seemed a good idea to install these two libraries into
and set LD_LIBRARY_PATH=/usr/local/lib. Then symlink these libraries
/usr/local/share/guile/site/X11/gXt. Then the built in UNIX dynamic
could find libraries in /usr/local/lib (Which it needs to when the code
libgXm.so starts calling libgXt code). And the guile dynamic linking
can find them where it expects in /usr/local/share/guile/site/X11/gXt.
The trouble is that if you do this, the system thinks you want to load
different libgXt.so libraries. Apart from the waste of memory, all the
variables in the library will occur twice and the whole thing doesn't
Now we could change LD_LIBRARY_PATH to point to every single module
But when you are using many many modules with submodules,
will get to be as long as your arm.
I suspect the right thing to do is to have the guile dynamic linker
make use of LD_LIBRARY_PATH. Maybe the algorithm is that it first
for libraries in LD_LIBRARY_PATH, and only if that fails does it look in
If I'm right, I hope someone takes up the challenge of doing it, because
I didn't want to delve this deeply into the guts of guile in my first
of use! :-)
Guile Home |
Main Index |