5 Q. Configure spews error messages when guile and guile-gtk are installed
8 A. When running configure, one of the many lines printed might be:
10 > checking for guile... /usr/bin/guile
12 (Here we see that your guile is installed in /usr/bin ...)
15 > checking for build-guile-gtk... /usr/local/bin/build-guile-gtk
17 (And here we find that guile-gtk's script "build-guile-gtk" is in
18 /usr/local. OK, but because its not in /usr, things are tricky. Then:)
20 > checking for guile-gtk CFLAGS... Backtrace:
21 > In /usr/local/bin/build-guile-gtk:
22 > 105: 0* (define-module (build-guile-gtk) #{:use-module}# ...)
23 > 105: 1 (eval-case (# #) (else #))
26 > ?: 2 (let ((m (process-define-module #))) (set-current-module m) m)
27 > ?: 3* [process-define-module ((build-guile-gtk) #:use-module (#) ...)]
28 > ?: 4 (let* (# # # #) (beautify-user-module! module) (letrec # #) ...)
29 > ?: 5* (letrec ((loop (lambda # #))) (loop kws (quote ()) (quote ()) (quote
31 > ?: 6 [loop (#:use-module ((gtk-1.2 config)) #:use-module ...) () ...]
33 > ?: 7 (let* ((interface-args #) (interface #)) (and (eq? # #) (or # #)
35 > ?: 8* [apply #<procedure resolve-interface (name . args)> ((gtk-1.2
37 > ?: 9 [resolve-interface (gtk-1.2 config)]
39 > ?: 10 (let* (# # # #) (and # #) (if # public-i #))
40 > ?: 11* (and (or (not module) (not public-i)) (error "no code for module"
42 > ?: 12 [error "no code for module" (gtk-1.2 config)]
44 > ?: 13 [scm-error misc-error #f ...]
46 > <unnamed port>: In procedure scm-error in expression (scm-error (quote
47 > misc-error) #f ...):
48 > <unnamed port>: no code for module (gtk-1.2 config)
50 And as soon as configure runs `build-guile-gtk cflags`, the guile script
51 blows up. (Likewise for `build-guile-gtk libs` later.)
53 build-guile-gtk cflags
54 from the command line.
56 > <unnamed port>: no code for module (gtk-1.2 config)
58 This is real error, that build-guile-gtk is looking for a guile module
59 named (gtk-1.2 config) and can't find it. Its is probably because guile
60 doesn't know to look in /usr/local for to find the files of guile code
61 that guile-gtk installed there.
63 I think adding /usr/local/share/guile to your GUILE_LOAD_PATH environment
64 variable may fix things.
65 (Likewise, LD_LIBRARY_PATH will need to contain /usr/local/lib, unless
66 you've add /usr/local/lib to /etc/ld.so.conf)
68 I generally try to install guile-gtk in the same prefix as guile to avoid
69 having to muck with the environment. When on a redhat system, I do so by
70 building a guile-gtk RPM.
72 And like INSTALL says, I recommend making sure that the demo scripts
73 shipped with guile-gtk itself work before trying to build gwave.
76 Q. "undefined reference to sgtk_wrap_gtkobj" errors linking gwave
78 A. I can't be completely sure, since you don't include configure and
79 make output, but I can take a guess.
81 sgtk_wrap_gtkobj is certainly related to the guile-gtk package, which you
82 do have installed, right?
84 What versions of guile and of guile-gtk do you have? The Gwave readme
85 lists some combinations known to work.
87 Most common thing that goes wrong with guile-gtk: installing it into a
88 nonstandard location on your system, and then not patching up all of the
89 necessary environment variables and configuration. If, for example,
90 guile-gtk was installed into /usr/local, is /usr/local/lib either in
91 $LD_LIBRARY_PATH or /etc/ld.so.conf ?
92 Next common problem: installing guile-gtk into a different location from
93 guile itself, typical /usr/local vs. /usr. In this case, $GUILE_LOAD_PATH
96 Most trouble-free way to install guile-gtk is to do it the same way you
97 installed guile. Either configure/make/install both from source, or
98 install both from precompiled packages.
100 Do the test programs supplied with guile-gtk work?
104 Q. Everything builds OK but when I try running gwave I get the following
105 message: "relocation error: undefined symbol: scm_root"
107 A. Oh, the joy of shared libraries - nothing is fully done linking until you
110 A tour through the guile-1.6.7 source yields what "scm_root" is all
111 about and some hints as to fixing this problem.
113 Guile's scm_root is either a global pointer or a macro that expands to
114 somthing accessing thread-local data, depending on whether or not
115 guile's configure decided to build with threads or not.
117 That configure result gets communicated by the USE_THREADS #define in
118 libguile/scmconfig.h, which should get constructed and installed
119 into $prefix/include at guile build time. This ghen gets used by
120 the guile-gtk and gwave build process to do the right thing.
122 This "scm_root" error means that somehow the USE_THREADS setting got
123 miscommunicated from the guile build process to the guile-gtk and/or gwave
124 builds. Here are some things to check:
126 1. Did the guile build+install process install its include files?
127 2. Did guile-gtk and gwave find the _right_ guile includes?
128 3. When you run gwave, is it finding the matching libguile.so shared libs?
129 ("ldd gwave" will list what shared libraries it is finding.
130 LD_LIBRARY_PATH can influence that)
131 4. Are there any other versions of guile laying around?
132 If, for example, you have a guile in /usr but installed another
133 version in /usr/local, preventing your compiler from seeing the
134 one in /usr first can be very difficult.