[Cffi-devel] pkg-flags (was: Re: Cannot load cffi-libffi)

Stelian Ionescu sionescu at cddr.org
Mon Nov 24 10:32:45 UTC 2014


On Sun, 2014-11-23 at 22:16 +0000, Luís Oliveira wrote:
> OK, so I see two needs for pkg-flags here then.
> 
> 1. finding headers that aren't in the standard locations and wouldn't
> otherwise be found.
> 2. finding headers for a specific version of a library.

The Linux distributions are going in the direction where only libc and
few other core libraries are included directly, but for all the others
pkg-config is becoming mandatory.

> I think the current committed behaviour works nicely for use case #1.
> Use case #2, which you've raised, suggests that ignoring a missing
> pkg-config is a bad default. What about adding making it an option?

That's fine, but the strict mode should be the default.

> Also, if we're going to cater to use case #2, then perhaps we should
> support a list of alternatives à la define-foreign-library. What do
> you think?

I think we should wait until somebody actually asks, because that can
also be a source of compilation errors.

> Finally, how about renaming the directive to pkg-config-cflags? (I can
> sort of imagine we might want a pkg-config-lfags for wrappers at some
> point in the future.)

That's a good idea. I'm also thinking of writing an ASDF extension by
which a set of files is compiled using pkg-config CFLAGS and LDFLAGS. We
should probably load libffi this way, at least on Linux.

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20141124/c68076aa/attachment.sig>


More information about the cffi-devel mailing list