GNU bug report logs - #43394
DYNAMIC-LINK is unbound when using r6rs library syntax

Previous Next

Package: guile;

Reported by: Guy Gastineau <strings.stringsandstrings <at> gmail.com>

Date: Mon, 14 Sep 2020 05:05:02 UTC

Severity: normal

Done: Taylan Kammer <taylan.kammer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Guy Gastineau <strings.stringsandstrings <at> gmail.com>
Subject: bug#43394: closed (DYNAMIC-LINK is unbound when using r6rs
 library syntax)
Date: Wed, 12 May 2021 21:15:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#43394: DYNAMIC-LINK is unbound when using r6rs library syntax

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 43394 <at> debbugs.gnu.org.

-- 
43394: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43394
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: 43394-done <at> debbugs.gnu.org
Subject: DYNAMIC-LINK is unbound when using r6rs library syntax
Date: Wed, 12 May 2021 23:14:00 +0200
As Linus explained, you need to import the (guile) module.

  (library (succeed-link (0 1))
    (export link)
    (import (guile))
    (define link dynamic-link))

Works as intended, so I'm closing this bug. :-)


- Taylan

[Message part 3 (message/rfc822, inline)]
From: Guy Gastineau <strings.stringsandstrings <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: DYNAMIC-LINK is unbound when using r6rs library syntax
Date: Sun, 13 Sep 2020 23:07:26 -0400
[Message part 4 (text/plain, inline)]
Guile version 3.0.4.38-64c894

I am on 64 bit arch linux, and I built guile3.0 from the AUR package
guile-git on Sep 12 2020
https://aur.archlinux.org/guile-git.git for the PKGBUILD (the config
options were practically non-existent).

I am writing to modules that dynamically link.  DYNAMIC-LINK works in the
top level REPL, and when using DEFINE-MODULE.
When using the r6rs library syntax DYNAMIC-LINK is considered unbound and
the compilation fails.
The following is an example of the behavior with a minimally viable source
for reproducing the bug.

(library (fail-link (0 1))
  (export link)
  (import)
  (define link dynamic-link))

What I get:
;;; note: source file /home/guy/guile-fail-link.scm

;;;       newer than compiled
/home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.scm.go

;;; compiling /home/guy/guile-fail-link.scm

;;; guile-fail-link.scm:4:2: warning: possibly unbound variable
`dynamic-link'
;;; compiled
/home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.scm.go

ice-9/boot-9.scm:1669:16: In procedure raise-exception:

Unbound variable: dynamic-link

What I expect:
;;; note: source file /home/guy/guile-fail-link.scm

;;;       newer than compiled
/home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.scm.go

;;; compiling /home/guy/guile-fail-link.scm

;;; compiled
/home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.scm.go

Additional information:
After I load the failing library I lose a bunch of top level definitions
and syntax.  Like IMPORT is no longer recognized and I have to `,q`
in order to get the REPL in a usable state again.

I can just use DEFINE-MODULE, but honestly I like the r6rs syntax.  Even
though imports between schemes differ enough (and FFI anyway)
that none of these libraries will end up being portable, I still like r6rs
library syntax.

If I need to find extra information for to help you all figure out what is
happening, please just let me know.

Also, thank you all for your hard work.  I am excited to have this snappy
Guile 3 on my system now ;)

- Guy Gastineau
[Message part 5 (text/html, inline)]

This bug report was last modified 4 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.