2 Notes on trying to make guile-gtk work on HP-UX.
3 dynlink/libguiledlopenhelper loses bigtime.
7 rukbat;gwave-guile; gwave.go
10 in gwave-guile/scheme/dynlink.scm
12 ;;; WARNING (Cannot find library libguilegtk-1.2)
14 46 [dynamic-wind #<procedure ()> #<procedure ()> #<procedure ()>]
16 48* [primitive-load "/usr/local/contrib/moderated/share/guile/gtk-1.2/gtk.scm"]
17 49* [merge-compiled-code "sgtk_init_gtk_gtk_glue" "libguilegtk-1.2"]
18 50 (let* ((module #) (interface #)) (module-use! module interface) ...)
20 51 [dynamic-wind #<procedure ()> #<procedure ()> #<procedure ()>]
22 53* (let* (# # # #) (if # # #))
23 54* (if modinfo (caddr modinfo) ...)
24 55 (or (dlopen-libtool-library libname) (error "can't open library" libname))
25 56* [dlopen-libtool-library "libguilegtk-1.2"]
26 57 (cond (gtkconf-libtool-is-winning (let* # # #)) (#t (let* # # #)))
27 58 (let* ((path #) (full-name #)) (init-dlopen-funcs) ...)
28 59* [init-dlopen-funcs]
29 60 (if (not #) (save-module-excursion #))
31 61 [dynamic-wind #<procedure ()> #<procedure ()> #<procedure ()>]
33 63* (let ((full-name #)) (set-current-module this-module) ...)
34 64 [dynamic-call sgtk_dlopenhelper_init ...
35 65* [gsubr-apply #<primitive-procedure dynamic-link> ...]
37 /home/msl/tell/proj/gwave/gwave-guile/gtk/dynlink.scm:208:26: In procedure gsubr-apply in expression (dynamic-link full-name):
38 /home/msl/tell/proj/gwave/gwave-guile/gtk/dynlink.scm:208:26: dynamic linking failed
40 0* (append-hook! new-wavewin-hook (lambda () (let* # # #)))
42 ./.gwaverc:17:1: In expression (append-hook! new-wavewin-hook (lambda () #)):
43 ./.gwaverc:17:1: Unbound variable: append-hook!
48 |Date: 08 Nov 1999 22:28:02 +0100
49 |From: Marius Vollmer <mvo@zagadka.ping.de>
50 |To: Stephen Tell <tell@cs.unc.edu>
51 |Cc: Guile-Gtk List <guile-gtk@sourceware.cygnus.com>
52 |Subject: Re: guile-gtk without dlopen (HP-UX)
54 |Yes, dynamic linking is weird with guile-gtk in general, and I'm sorry
57 |However, in recent releases of Guile, dynamic-link uses RTLD_GLOBAL by
58 |default and thus libguiledlopenhelper is not needed at all (on dlopen
59 |platforms). You might have to check the HPUX support of Guile if it
60 |behaves correctly, tho. You could try to hack gtk/dynlink.scm so that
61 |it doesn't use the %sgtk-* functions at all. If this doesn't work, we
62 |can then see how you can get by without dynamic linking.
64 |For the real fix, I think we need to have configure find out whether
65 |libguiledlopenhelper is needed or not because people might still be
66 |using old versions of Guile.
69 |This is recent enough.
73 By setting GUILE_LOAD_PATH, we can insert our own version of dynlink.scm
74 and other guile-gtk modules.
76 module gtk.scm uses module dynlink.scm, then does
77 (gtk-version-alias 'gtk)
80 (gtk-version-alias arranges to get the right version of gtk loaded;
81 I think this results in loading share/guile/gtk-1.2/gtk.scm
83 gtk-1.2/gtk.scm then does
84 (merge-compiled-code "sgtk_init_gtk_gtk_glue" "libguilegtk-1.2")
85 which is were the trouble starts.
87 I think what marius means is to modify this routine.
88 I want it to load /usr/local/contrib/moderated/lib/libguilegtk-1.2.sl
89 Looks like the routine find-and-link-dynamic-module in boot-9.scm does
92 But it assumes the name of the init func from the module name, rats.
93 The underlying routines that it uses,
94 (try-using-libtool-name directory libname)
96 (link-dynamic-module sharlib-full init-func)
101 Doesn't work with standalone guile-gtk apps.