From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Patterson Subject: bug#32770: Packaging SLIME/SWANK as Common Lisp library Date: Thu, 4 Oct 2018 01:03:08 -0400 Message-ID: <20181004010308.7825505f@mailservices.uwaterloo.ca> References: <87museeyy5.fsf@ambrevar.xyz> <20180929151630.00cf6396@mailservices.uwaterloo.ca> <87lg7iwu9i.fsf@ambrevar.xyz> <87k1n2wten.fsf@ambrevar.xyz> <20181002045531.78223c72@mailservices.uwaterloo.ca> <878t3gwsrm.fsf@ambrevar.xyz> <20181003012224.5baff3ac@mailservices.uwaterloo.ca> <8736tmj2vj.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7vnz-0004j0-Ec for bug-guix@gnu.org; Thu, 04 Oct 2018 01:04:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7vnu-00084o-B1 for bug-guix@gnu.org; Thu, 04 Oct 2018 01:04:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7vnu-00084i-48 for bug-guix@gnu.org; Thu, 04 Oct 2018 01:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g7vnt-0003kD-RP for bug-guix@gnu.org; Thu, 04 Oct 2018 01:04:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8736tmj2vj.fsf@ambrevar.xyz> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 32770@debbugs.gnu.org Hi, On Wed, 03 Oct 2018 20:34:24 +0200 Pierre Neidhardt wrote: > Last (hopefully?) step before getting Next up and running: add > support for CFFI. > > I've re-used your CFFI package and they seem to work. Now if I want > to package cl-sqlite, it fails because sqlite.so cannot be found. > Indeed, the patch to /gnu/store/...-sqlite.../lib must be added to the > cffi:*foreign-library-directories* global variable before compiling. > > If I do that from quicklisp, it works. Now I guess we need to tweak > asdf-build-system so that packages can specify which paths to add to > that global variable. I've been using a cffi consumer for a while now, and my approach for that package was to update references to library and header files with the full paths to their respective store items. Adding to *foreign-library-directories* at compile time may allow a package to compile, but I get the feeling that it may not have the desired effect when you try to load the package later on. I guess another approach we could take if replacement is undesirable would be to modify the cffi package to honour some environment variable for its default, and then add that variable to the search path for cffi. Maybe such a variable already exists, even. I think this is the approach that Nix takes. I personally tend to favour replacement, but others could chime in here as well since this problem isn't specific to lisp packaging. > > Makes sense? > > I've given it a quick shot (patch attached) but then every ASDF build > fails with > > --8<---------------cut here---------------start------------->8--- > ice-9/boot-9.scm:222:17: In procedure map1: > Syntax error: > unknown location: unexpected syntax in form () > --8<---------------cut here---------------end--------------->8--- > It's confusing, but you either need to double quote the default argument (e.g. (cffi-foreign-library-directories ''())), or re-quote the unquoted variable when you pass it along, depending on how you want users to specify the argument in the package (quoted for the former, unquoted for the latter). Hoping that helps, -- Andy