guile-devel
[Top][All Lists]
Advanced

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

Re: SLIB support


From: Greg Troxel
Subject: Re: SLIB support
Date: Sat, 15 Sep 2007 07:30:51 -0400
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix)

address@hidden (Ludovic Courtès) writes:

> So `(load-from-path "guile.init")' (rather than "slib/guile.init") is OK
> for everyone?

No, on pkgsrc(NetBSD), which isn't trying to change paths, you need
slib/guile.init.  Real data follows because it's too hard to say
unambigiously "the slib dir is in the default search path".

poblano gdt 36 ~ > guile
guile> %load-path
("/usr/pkg/share/guile/site" "/usr/pkg/share/guile/1.8" "/usr/pkg/share/guile")

poblano gdt 38 ~ > ls -l /usr/pkg/share/guile/site/slib
lrwxr-xr-x  1 root  wheel  19 Jul 20 13:04 /usr/pkg/share/guile/site/slib -> 
../../../share/slib

poblano gdt 41 ~ > ls -l /usr/pkg/share/slib/guile.init 
-r--r--r--  1 root  wheel  19273 Jun 13 14:11 /usr/pkg/share/slib/guile.init

So it's /usr/pkg/share not /usr/share, because pkgsrc uses /usr/pkg as
PREFIX, but that's not the problem.  slib itself, unmodified, puts
guile.init in the same single directory as everything else, and that's
the debian change.

Now, I think the next issue that you are raising: guile.init vs
slib/guile.init is more subtle.  The pkgsrc way for guile/slib has been
for a very long time not to include the slib dir in %load-path.  After
(use-modules (ice-9 slib)), it still isn't in the path, and then to load
pretty-print, one uses require and not load.

So I think the slib dir should appear in %load-path, but be located in
some directory which is in %load-path

The slib instructions don't seem to address this; they tell you to run
guile with an explicit load of guile.init:

 - Implementation: Guile
     `guile -l ${SCHEME_LIBRARY_PATH}guile.init'



Finally, I think what pkgsrc has done is the guilish way to integrate
slib.  That symlink (which is the 'guile-slib' package, along with
catalog generation) places the slib code in the natural place for guile,
as if it had been a written-for-guile scheme module.

Hope this helps....




reply via email to

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