From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.user Subject: Re: Another load path idea Date: 29 Jan 2006 17:39:18 -0500 Message-ID: References: <877j9cnoh4.fsf@ossau.uklinux.net> <87oe2hss4d.fsf@laas.fr> <87mzi1jq8j.fsf@ossau.uklinux.net> <87psmobmju.fsf@laas.fr> <87veweeyyk.fsf@ossau.uklinux.net> <1137944316.15250.29.camel@localhost.localdomain> <87fynaagju.fsf@ossau.uklinux.net> <87irs68uie.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138574512 15079 80.91.229.2 (29 Jan 2006 22:41:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2006 22:41:52 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jan 29 23:41:49 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F3LEo-0004qW-OB for guile-user@m.gmane.org; Sun, 29 Jan 2006 23:41:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3LHi-000091-P8 for guile-user@m.gmane.org; Sun, 29 Jan 2006 17:44:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F3LHZ-00007P-4u for guile-user@gnu.org; Sun, 29 Jan 2006 17:44:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F3LHY-00006M-1S for guile-user@gnu.org; Sun, 29 Jan 2006 17:44:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3LFZ-0007LQ-9y for guile-user@gnu.org; Sun, 29 Jan 2006 17:42:26 -0500 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F3LDl-0004Rn-Ko for guile-user@gnu.org; Sun, 29 Jan 2006 17:40:33 -0500 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 1F0665286; Sun, 29 Jan 2006 17:39:18 -0500 (EST) Original-To: guile-user@gnu.org In-Reply-To: <87irs68uie.fsf@zip.com.au> Original-Lines: 92 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5101 Archived-At: Kevin Ryde writes: > Neil Jerram writes: > > > > The basic scenario is this: someone has Guile installed (probably by > > their distro) in /usr, and then builds and installs an additional > > package using ./configure && make && sudo make install, which installs > > with a different prefix than /usr (usually /usr/local). Then they try > > to do a (use-modules (newly-installed-package)), and it doesn't work, > > because the installed Guile's load path doesn't include anything > > beginning with /usr/local/share/guile. > > /usr/local should probably be in the defaults. Of course there's > nothing to stop a distro packaged guile from doing that right now, if > /usr/local is the preferred location for non-distro stuff. I concur with Neil, but his example does not fully cover the possibilities. It's true that on a Linux system guile will be in /usr and some random hand-built package with no --prefix will end up in /usr/local. Yes, adding /usr/local will fix this, but also perhaps pick up unintended stuff. On NetBSD (and other pkgsrc systems), guile will be ok /usr/pkg, and hand-built programs may be in /usr/local, or someplace else. I tend to build program foo (from CVS) into /usr/foo. So IMHO a general mechanism is required. > doing something unusual; and consequently will need to tell some, > maybe all, of their installed guiles to look there. Perhaps for all > users, perhaps just for themself, etc. Exactly, and that's the issue. > I reckon there's much more benefit in getting the guile recommended > locations better described, some sample automakery or whatever, > ie. better to define and assist normal setups, than to try to make > arbitrary arrangements work. I doubt anybody will want completely > arbitrary anyway, surely there's only a handful of different cases. Yes, but there are two sane cases: * put stuff in the same prefix as guile, following standards for $(prefix)/share/guile/site etc. * put stuff in some other prefix, still following standards, e.g. $(otherprefix)/share/guile/site I have run into the second case a lot myself. > I think it will be enough to, > > 1. Add /usr/local into the default %load-path. I'm not sure I like this. NetBSD philosophy is not to include /usr/local (include, lib) by default in system tools. But it seems reasonable. > 2. Put a note in the manual inviting package builders to augment > %load-path further if they wish, eg. for /opt. (By patching > boot-9.scm I would think.) Sure, this makes sense, but doesn't address what I see as the dominant practical issue of someone installing something with a new prefix. But certainly if a particular system has a notion of two or more prefixes that should generally be searched, then packagers for that system should make guile do that. NetBSD pkgsrc does this routinely (to look in /usr/pkgsrc, not two places). > 3. Put a note in the manual encouraging the use of /site by sysadmins, > but with an invitation to extend %load-path if they've got good > reason for violating the usual setup. /site? > And a bit later (but actually needs doing either way), > > 4. Describe better in the manual how a .scm module should hit its own > installed C code modules using load-extension. Yes - in particular, I think a scm module should cons up an absolute path for loading binaries based on it's own $prefix at configure time. I've done this with foo.scm.in and autoconf. An important point is that some people (including me) believe that only files managed by a pkg system belong in the prefix assigned to the system. I think it's been accepted that this view is reasonable and that guile should accomodate those who run their systems this way (as well as those who put things in the same prefix). -- Greg Troxel _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user