From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#43394: DYNAMIC-LINK is unbound when using r6rs library syntax Date: Mon, 14 Sep 2020 11:29:09 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40792"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.3.0-259-g88fbbfa-fm-20200903.003-g88fbbfa3 To: "Guy Gastineau" , 43394@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Sep 14 17:51:57 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHqln-000AQv-KS for guile-bugs@m.gmane-mx.org; Mon, 14 Sep 2020 17:51:56 +0200 Original-Received: from localhost ([::1]:38512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHqlm-0004F6-Jc for guile-bugs@m.gmane-mx.org; Mon, 14 Sep 2020 11:51:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHqi3-0000CD-OP for bug-guile@gnu.org; Mon, 14 Sep 2020 11:48:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHqi3-0006te-Dq for bug-guile@gnu.org; Mon, 14 Sep 2020 11:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHqi3-0005k4-Co for bug-guile@gnu.org; Mon, 14 Sep 2020 11:48:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Linus =?UTF-8?Q?Bj=C3=B6rnstam?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 14 Sep 2020 15:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43394 X-GNU-PR-Package: guile Original-Received: via spool by 43394-submit@debbugs.gnu.org id=B43394.160009844221985 (code B ref 43394); Mon, 14 Sep 2020 15:48:03 +0000 Original-Received: (at 43394) by debbugs.gnu.org; 14 Sep 2020 15:47:22 +0000 Original-Received: from localhost ([127.0.0.1]:55941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHqhN-0005iW-Dy for submit@debbugs.gnu.org; Mon, 14 Sep 2020 11:47:22 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:40415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHknt-0002xN-0g for 43394@debbugs.gnu.org; Mon, 14 Sep 2020 05:29:42 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 35B3F7DB; Mon, 14 Sep 2020 05:29:35 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute7.internal (MEProxy); Mon, 14 Sep 2020 05:29:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm3; bh=FaPP9 hCclYVuSLvOuKVptP+VhF7RFP1JuLZRF6BQfhk=; b=dM7O17vy9vbsyEndyDU1V /abgMj3jM+jF0HNcRjt6xIBjA8eutuckvDk9DlxXUWicZx9IJ2KywX/BRr4iiP2k UV/g2lpApCNeMjAuHeZJv/GCF0/yUlNgaQO9JpHz5KSyPqlieUmVtp/zZc5C5eLd XQBRP+KmvubltX/jVvm/Jd0fwoP+WBCfs0nCBwVeLf3fvNff661mowjh0IV7PWqO JMwvjy2Kit4+qPt0V/uPt78bN3UmB0GK/cXMYvN1xLqtkur+OVeMvKqkv687cfJc vROvWHp6V5ti0ZT4CLg5WZY3O9nsyjv6GrSAoOUIhYD9FZvohrceFJArXVaX18wL w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=FaPP9hCclYVuSLvOuKVptP+VhF7RFP1JuLZRF6BQf hk=; b=oVfr/p88+QwJ8VD0El+K5OTJ6j7vq9fLUzXWsjWiKNuS2XPhdrvayj+d8 GskRhQLXmaaRUmYjCtECaEwohitiUIeTUH2NQPIM4Ho08SyrAHDj/BAaek4D2ZYN fziLgWt/os55EOlfeaXlMnlTsOHhF1ol2Q22sR/3OwIBLhRD9AJB+tNktfMjdbyT i/no/GZQJN/JJ3ptbcWWMvGbtD6oZ4dc2doemyAJN7VEmYnFLtzfmHVguvL0imGD xxXau35z+ZxvqVJNlAs9vuEKJCIVGVPL8v4EZ58m2SHPGueEXL0IxXNZPjLruzmg HktWbdx3pZbjmh7epNORAn8JEuMbA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeiiedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepnfhinhhushgpuehjnphrnhhsthgrmhcuoehlihhnuhhs rdgsjhhorhhnshhtrghmsehvvghrhihfrghsthdrsghiiieqnecuggftrfgrthhtvghrnh epudetfeelleefudehffdttdfftefggeegvdfhtdeiteelvddtvdeiieelvdehieejnecu ffhomhgrihhnpegrrhgthhhlihhnuhigrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheplhhinhhushdrsghjohhrnhhsthgrmhesvhgv rhihfhgrshhtrdgsihii X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7D154C200A5; Mon, 14 Sep 2020 05:29:34 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: X-Mailman-Approved-At: Mon, 14 Sep 2020 11:47:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9886 Archived-At: In r6rs libraries, only r6rs is available. You need to impor whatever bi= ndings you need from the (guile) module --=20 Linus Bj=C3=B6rnstam On Mon, 14 Sep 2020, at 05:07, Guy Gastineau wrote: > Guile version 3.0.4.38-64c894 >=20 > I am on 64 bit arch linux, and I built guile3.0 from the AUR package=20= > guile-git on Sep 12 2020 > https://aur.archlinux.org/guile-git.git for the PKGBUILD (the config=20= > options were practically non-existent). >=20 > I am writing to modules that dynamically link. DYNAMIC-LINK works in=20= > the top level REPL, and when using DEFINE-MODULE. > When using the r6rs library syntax DYNAMIC-LINK is considered unbound=20= > and the compilation fails. > The following is an example of the behavior with a minimally viable=20= > source for reproducing the bug. >=20 > (library (fail-link (0 1)) > (export link) > (import) > (define link dynamic-link)) >=20 > What I get: > ;;; note: source file /home/guy/guile-fail-link.scm = =20 > =20 > ;;; newer than compiled=20 > /home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.sc= m.go =20 > ;;; compiling /home/guy/guile-fail-link.scm = =20 > =20 > ;;; guile-fail-link.scm:4:2: warning: possibly unbound variable=20 > `dynamic-link' =20 > ;;; compiled=20 > /home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.sc= m.go =20 > ice-9/boot-9.scm:1669:16: In procedure raise-exception: = =20 > =20 > Unbound variable: dynamic-link >=20 > What I expect: > ;;; note: source file /home/guy/guile-fail-link.scm = =20 > =20 > ;;; newer than compiled=20 > /home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.sc= m.go =20 > ;;; compiling /home/guy/guile-fail-link.scm = =20 > =20 > ;;; compiled=20 > /home/guy/.cache/guile/ccache/3.0-LE-8-4.4/home/guy/guile-fail-link.sc= m.go >=20 > Additional information: > After I load the failing library I lose a bunch of top level=20 > definitions and syntax. Like IMPORT is no longer recognized and I hav= e=20 > to `,q` > in order to get the REPL in a usable state again. >=20 > I can just use DEFINE-MODULE, but honestly I like the r6rs syntax. =20= > Even though imports between schemes differ enough (and FFI anyway) > that none of these libraries will end up being portable, I still like=20= > r6rs library syntax. >=20 > If I need to find extra information for to help you all figure out wha= t=20 > is happening, please just let me know. >=20 > Also, thank you all for your hard work. I am excited to have this=20 > snappy Guile 3 on my system now ;) >=20 > - Guy Gastineau