From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: The load path Date: 14 Nov 2004 09:05:37 -0500 Message-ID: References: <1097949129.4178.31.camel@localhost> <418C126D.5010802@ossau.uklinux.net> <87u0s3r30n.fsf@trouble.defaultvalue.org> <418D0EAE.40703@ossau.uklinux.net> <1100112232.3368.19.camel@localhost> <41952B9C.1020408@ossau.uklinux.net> <87y8h65ze4.fsf@trouble.defaultvalue.org> <41973B3A.8080008@ossau.uklinux.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100441155 10626 80.91.229.6 (14 Nov 2004 14:05:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2004 14:05:55 +0000 (UTC) Cc: guile-devel , Rob Browning Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 14 15:05:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTL0l-0003QP-00 for ; Sun, 14 Nov 2004 15:05:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTL9P-00048G-QY for guile-devel@m.gmane.org; Sun, 14 Nov 2004 09:14:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTL9N-00048A-4N for guile-devel@gnu.org; Sun, 14 Nov 2004 09:14:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTL9M-00047y-K1 for guile-devel@gnu.org; Sun, 14 Nov 2004 09:14:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTL9M-00047v-HC for guile-devel@gnu.org; Sun, 14 Nov 2004 09:14:40 -0500 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CTL0b-0003bT-VM for guile-devel@gnu.org; Sun, 14 Nov 2004 09:05:38 -0500 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 20F8F2175; Sun, 14 Nov 2004 09:05:37 -0500 (EST) Original-To: Neil Jerram In-Reply-To: <41973B3A.8080008@ossau.uklinux.net> Original-Lines: 94 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4392 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4392 Neil Jerram writes: > - it seems to me there isn't a strong need for extra prefixes: the > point about .../1.6 versus .../site is to provide a distinction > between code installed by the Guile install itself, and code installed > by third parties; so $additional_prefix/share/guile/1.6 would usually > be pointless and unused The situation tha motivates this comment is e.g. when one installs guile with --prefix=/usr/pkg (perhaps as part of pkgsrc, so it's semi part of the OS), and then installs some guile module "foo bar" as --prefix=/usr/y0 (not choosing /usr/pkg because every file in /usr/pkg is supposed to be registered as part of the pkg db). Then, one wants to be able to (use-modules (foo bar)) in guile without fuss. the foo bar module source is nominally expecting to install in the same prefix as guile, so it might have installed things in either $prefix/share/guile or $prefix/share/guile/site. (If it's not ok to install in the former, a) please point me to the docs that say this and b) explain why it's in the load path :-) So, in the general case, to suppport packages in /usr/y0, one needs to add /usr/y0/share/guile and /usr/y0/share/guile/site to %load-path - the "standard" locations within the load path. /usr/y0/share/guile/1.6 would be for _parts of guile_, and I agree that this makes no sense for alternate prefixes. I view 'site' as being a directory that can be shared among a group of admin'd machines, but really it's like site-lisp in emacs and thus local. I put things in /usr/pkg/share/guile (no site) when they are packaged rather than local. > - in the case where one explicitly wants to include the non-site > directory of another Guile installation (dangerous though this > sounds!), one can do so by listing it as an "actual directory"; also > note that if one is doing such strange things, the $effective_version > of the other Guile install might be different from the one being > configured, so the prefix approach wouldn't help anyway. Sure, and I agree that this is odd. > >It would also be nice to be able to include $prefix/lib/guile/site, so > >that packages intended for guile ttn-1.4 work without needing a > >symlink into share. > Out of interest, can you expand on this? What kind of file is > installed there, and is that the only thing needed to make ttn-guile > packages work? Sorry, I was too brief and used the wrong word. ttn's guile supports binary modules (which I think are a cool thing, despite also seeing the merits of the arguments that one should use a scheme shim to load them and export symbols). These are deprecated in guile 1.6, but I really hope they don't go away, because it would make guile-pg (PostgreSQL interface with automatic type conversion - very spiffy) harder to use under the upcoming 1.8, and I don't see the harm in leaving them as a deprecated feature. Because these modules are shlibs, rather than scheme, they are arch-dependent and can't go in $prefix/share, and in ttn-guile they belong in LIBSITE_DIR, which is normally $prefix/lib/guile/site: > l -R /usr/pkg/lib/guile/site/ total 1 drwxr-xr-x 2 root wheel 512 Nov 13 10:44 database /usr/pkg/lib/guile/site//database: total 144 lrwxr-xr-x 1 root wheel 11 Nov 13 10:43 libpostgres.la -> postgres.la -r--r--r-- 1 root wheel 2806 Nov 13 10:43 postgres-col-defs.scm -r--r--r-- 1 root wheel 9882 Nov 13 10:43 postgres-meta.scm -r--r--r-- 1 root wheel 3644 Nov 13 10:43 postgres-resx.scm -r--r--r-- 1 root wheel 24073 Nov 13 10:43 postgres-table.scm -r--r--r-- 1 root wheel 11345 Nov 13 10:43 postgres-types.scm -rw-r--r-- 1 root wheel 43368 Nov 13 10:43 postgres.a -rwxr-xr-x 1 root wheel 898 Nov 13 10:43 postgres.la lrwxr-xr-x 1 root wheel 17 Nov 13 10:43 postgres.so -> postgres.so.0.0.0 lrwxr-xr-x 1 root wheel 17 Nov 13 10:43 postgres.so.0 -> postgres.so.0.0.0 -rwxr-xr-x 1 root wheel 47248 Nov 13 10:43 postgres.so.0.0.0 This is in ttn-guile's %load-path, but not in 1.6. So, I symlinked /usr/pkg/lib/guile/site/database into /usr/pkg/share/guile/site in the pkgsrc entry for guile-pg: > l /usr/pkg/share/guile/site/database lrwxr-xr-x 1 root wheel 32 Nov 13 10:43 /usr/pkg/share/guile/site/database -> ../../../lib/guile/site/database This is a bit hackish, but was simpler and more self-contained than adding a patch to guile's pkgsrc entry or trying to make guile-pg install things someplace else. (In general, pkgsrc entries try to munge upstream software as little as possible, or at least that's my philosophy for it.) -- Greg Troxel _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel