guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1.6.0 problems with libguilereadline-v-12 and fix


From: Greg Troxel
Subject: 1.6.0 problems with libguilereadline-v-12 and fix
Date: Wed, 18 Sep 2002 16:33:11 -0400

I built 1.6.0 on FreeBSD/i386 4.6-ish (tracking stable) with
--prefix=/usr/foo
I have (use-modules (ice-9 readline)) in my .guile, and guile failed
on startup trying to dynlink libguilereadline-v-12.
It seems that dynamic-link only looks in standard places.

For reasons I do not understand, guile/readline with the same /usr/foo
works on NetBSD 1.5.4_ALPHA/i386, even without the below patch.  It
finds /usr/foo/lib/libguilereadline-v-12, but it seems incorrect of
libtool to look there.

This seems broken in two ways:

  guile should look for its own libraries in exactly one place, the
  location where it was installed.

  guile should certainly look in $(prefix)/lib

So, I modified guile-readline/readline.scm to look in the right place
(although perhaps not only in the right place).

Perhaps a new procedure that is like dynamic link, but only looks in
the installed prefix, is in order, for internal use?
I suspect this problem affects the srfi code.

For you hard-core regression testers, perhaps testing with a
non-standard prefix is in order.  For extra points, put defective
versions of the libs in /usr/local or some other 'normal' place.

Index: readline.scm
===================================================================
RCS file: /QUIST-CVS/guile/guile-readline/readline.scm,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- readline.scm        2002/07/19 17:56:31     1.1.1.2
+++ readline.scm        2002/09/18 20:19:17     1.2
@@ -36,7 +36,11 @@
 
 (if (not (feature? 'readline))
     (dynamic-call "scm_init_readline"
-                  (dynamic-link "libguilereadline-v-12")))
+                  (dynamic-link 
+                  (string-append
+                   (assq-ref %guile-build-info 'libdir)
+                   "/"
+                   "libguilereadline-v-12"))))
 
 (if (not (feature? 'readline))
     (scm-error 'misc-error


On NetBSD, guile mysteriously looks in the right place:

  9315 guile    CALL  open(0x8102280,0,0x1b6)
  9315 guile    NAMI  "/usr/lib/libguilereadline-v-12.la"
  9315 guile    RET   open -1 errno 2 No such file or directory
  9315 guile    CALL  open(0x80a2dc0,0,0x1b6)
  9315 guile    NAMI  "libguilereadline-v-12.la"
  9315 guile    RET   open -1 errno 2 No such file or directory
  9315 guile    CALL  open(0x48059080,0,0x48052d20)
  9315 guile    NAMI  "/usr/lib/libguilereadline-v-12.so"
  9315 guile    RET   open -1 errno 2 No such file or directory
  9315 guile    CALL  __stat13(0x48059100,0xbfbfce70)
  9315 guile    NAMI  "/usr/foo/lib/libguilereadline-v-12.so"
  9315 guile    RET   __stat13 0
  9315 guile    CALL  open(0x48059100,0,0x48052d20)
  9315 guile    NAMI  "/usr/foo/lib/libguilereadline-v-12.so"
  9315 guile    RET   open 5
  9315 guile    CALL  read(0x5,0xbfbfce3c,0x34)

env|grep foo turns up only /usr/foo/bin in PATH and /usr/foo/man in
MANPATH.
It can't be from PATH, since other dirs in PATH like /usr/gnats/bin
come first and /usr/gnats/lib is not tried.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]