unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Patterson <ajpatter@uwaterloo.ca>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 32770@debbugs.gnu.org
Subject: bug#32770: Packaging SLIME/SWANK as Common Lisp library
Date: Thu, 4 Oct 2018 01:03:08 -0400	[thread overview]
Message-ID: <20181004010308.7825505f@mailservices.uwaterloo.ca> (raw)
In-Reply-To: <8736tmj2vj.fsf@ambrevar.xyz>

Hi,

On Wed, 03 Oct 2018 20:34:24 +0200
Pierre Neidhardt <mail@ambrevar.xyz> 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

  parent reply	other threads:[~2018-10-04  5:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  7:19 bug#32770: Packaging SLIME/SWANK as Common Lisp library Pierre Neidhardt
2018-09-29 19:16 ` Andy Patterson
2018-09-30 21:27   ` Pierre Neidhardt
2018-09-30 21:46     ` Pierre Neidhardt
2018-10-01 13:53       ` Pierre Neidhardt
2018-10-02  8:38         ` Andy Patterson
2018-10-02  8:55       ` Andy Patterson
2018-10-02 10:24         ` Pierre Neidhardt
2018-10-03  5:22           ` Andy Patterson
2018-10-03 18:34             ` Pierre Neidhardt
2018-10-03 19:48               ` Pierre Neidhardt
2018-10-04  5:03               ` Andy Patterson [this message]
2018-10-04  8:37                 ` Pierre Neidhardt
2018-10-04 18:08                   ` Ricardo Wurmus
2018-10-04 20:38                     ` Pierre Neidhardt
2019-10-06 11:53                       ` Pierre Neidhardt
2018-10-05  4:56                   ` Andy Patterson
2018-10-05  8:28                     ` Pierre Neidhardt
2018-10-05 11:44                       ` Ricardo Wurmus
2018-10-05 13:30                         ` Pierre Neidhardt
2018-10-10  5:54                           ` Andy Patterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181004010308.7825505f@mailservices.uwaterloo.ca \
    --to=ajpatter@uwaterloo.ca \
    --cc=32770@debbugs.gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).