Discussion:
Compiling - won't use from site-dir?
Christopher Howard
2017-09-13 04:05:54 UTC
Permalink
Hi, as reading in guile manual section "Modules and the File System", I
installed my-module.scm to %site-dir and then my-module.go to %site-
dir. But when I run guile interpreter and use-modules my-module, it
ignores that one, and instead acts as though the cache in my home
directory is the only place to get compiled modules. So it will compile
the .go file into my cache even if one is in the %site-dir already.

I tried naming it my-module.scm.go instead, but same results.
--
https://qlfiles.net
https://emailselfdefense.fsf.org/en/
Chris Vine
2017-09-13 09:41:17 UTC
Permalink
On Tue, 12 Sep 2017 20:05:54 -0800
Post by Christopher Howard
Hi, as reading in guile manual section "Modules and the File System",
I installed my-module.scm to %site-dir and then my-module.go to %site-
dir. But when I run guile interpreter and use-modules my-module, it
ignores that one, and instead acts as though the cache in my home
directory is the only place to get compiled modules. So it will
compile the .go file into my cache even if one is in the %site-dir
already.
I tried naming it my-module.scm.go instead, but same results.
This bit of the documentation should help: "As with Scheme files, Guile
searches a path to find compiled .go files, the %load-compiled-path. By
default, this path has two entries: a path for Guile’s files, and a
path for site packages. You should install your .go files into the
latter directory, whose value is returned by invoking the
%site-ccache-dir procedure. As in the previous example, if Guile 2.2 is
installed on your system in /usr/, then (%site-ccache-dir) site
packages will be /usr/lib/guile/2.2/site-ccache"

Chris
Christopher Howard
2017-09-13 13:28:52 UTC
Permalink
Post by Chris Vine
On Tue, 12 Sep 2017 20:05:54 -0800
Post by Christopher Howard
Hi, as reading in guile manual section "Modules and the File
System",
I installed my-module.scm to %site-dir and then my-module.go to %site-
dir. But when I run guile interpreter and use-modules my-module, it
ignores that one, and instead acts as though the cache in my home
directory is the only place to get compiled modules. So it will
compile the .go file into my cache even if one is in the %site-dir
already.
I tried naming it my-module.scm.go instead, but same results.
This bit of the documentation should help: "As with Scheme files, Guile
searches a path to find compiled .go files, the %load-compiled-path. By
default, this path has two entries: a path for Guile’s files, and a
path for site packages. You should install your .go files into the
latter directory, whose value is returned by invoking the
%site-ccache-dir procedure. As in the previous example, if Guile 2.2 is
installed on your system in /usr/, then (%site-ccache-dir) site
packages will be /usr/lib/guile/2.2/site-ccache"
Chris
Thank you very much for your help. That is just what I needed, and it
works correctly.
--
https://qlfiles.net
https://emailselfdefense.fsf.org/en/
Loading...