This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: can't dynamic load guile-gtk+ bindings


Jens-Ulrik Petersen <petersen@kurims.kyoto-u.ac.jp> writes:

> Hmmm, it has never worked for me as far as I can remember...  Do you
> have any suggestions (for a C idiot like me) about what I can do to
> investigate my problem further?

Not many, I dont know anything about shared libs on Solaris myself.
You might want to try some minimal tests like

    guile> (define d (dynamic-link "libX11.so"))
    guile> d
    #<dynamic-object "libX11.so">
    guile> (dynamic-func "XOpenDisplay" d)
    4014519492

Wait I just noticed something...

    guile> (define d (dynamic-link "libgtk.so"))
    ERROR: In procedure dynamic-link in expression (dynamic-link "libgtk.so"):
    ERROR: ld.so.1: guile: fatal: relocation error: symbol not found: g_strcasecmp: referenced in /homes/vollmer/lib/libgtk.so
    ABORT: (misc-error)

    Type "(backtrace)" to get more information.

This is analogous to your problem, right?

I can only speculate here that libgtk.so needs libglib.so but does not
contain enough information to have the dynloader load it
automatically.  This might be an instance of the interlibrary
dependency stuff that libtool has some problems with.

But libguilegtk.so loads fine:

    guile> (define d (dynamic-link "libguilegtk.so"))
    guile> d
    #<dynamic-object "libguilegtk.so">

It looks like as if libguilegtk.so contains enough information about
its dependencies on other libraries.

>     VM> You might want to try a recent gnome-guile snapshot.
> 
> Should that make a big difference?  Maybe I will try
> later, if I have time.

Yes, it is likely that in later versions libguilegtk.so is build
differently, so as to include this extra information on library
dependencies.