Forgive me if you've heard me rant about this before, but there is a mutual incompatibility between CLX, trivial-features (which, for me at least, gets pulled in whenever I try to use CFFI) and SBCL. The problem is that trivial-features puts :little-endian on *features* and CLX has the following code in defdeps.lisp:
#+(or lispm vax little-endian Minima) (eval-when (eval compile load) (pushnew :clx-little-endian *features*))
These old-style eval-when conditions cause SBCL to issue a warning, which causes ASDF to stop compiling CLX. There are many workarounds to this, such as loading CLX before CFFI and there are many possible fixes (such as making SBCL less pedantic or making ASDF not stop on warnings of this kind, etc...) But it seems to me that either fixing the CLX source code such that it is more tolerant of SBCL's pedantry or, alternatively, picking less common names for the *features* in trivial-features would be a good thing. I don't really have a preference, but it would be nice if the CLX and trivial-features maintainers would play nice with each other such that, at least when using SBCL, one can load trivial-features and then CFFI.
I'm certainly open to other suggestions, but I've grown tired of working around this particular problem.
thanks,
Cyrus
On Fri, Feb 18, 2011 at 9:40 PM, Cyrus Harmon ch-lisp@bobobeach.com wrote:
Forgive me if you've heard me rant about this before, but there is a mutual incompatibility between CLX, trivial-features (which, for me at least, gets pulled in whenever I try to use CFFI) and SBCL. The problem is that trivial-features puts :little-endian on *features* and CLX has the following code in defdeps.lisp:
#+(or lispm vax little-endian Minima) (eval-when (eval compile load) (pushnew :clx-little-endian *features*))
trivial-features is a bit impolite about pushing :little-endian to *features*. In my defense, one of the design goals of trivial-features is to effortlessly disappear over time. I.e., at some point in the future Lisps will have agreed on what keywords to use, and trivial-features will be a no-op or removed altogether without changes to code that uses it. As such, my decision was to use the same keywords that are in widespread use and make minimal adjustments to provide consistency across Lisps.
Perhaps if we can sneak a :little/big-endian feature into SBCL proper, the CLX fix will become inevitable and we'll be a tiny bit closer to achieving trivial-features' goal? :-)
Cheers,
I think the CLX maintainer who objects to modifying CLX to play nice with a lisp implementation that defines :little-endian and doesn't accept old-school eval-when conditions is unlikely to think that this is a step in the right direction.
Cyrus
On Feb 23, 2011, at 10:44 AM, Luís Oliveira wrote:
On Fri, Feb 18, 2011 at 9:40 PM, Cyrus Harmon ch-lisp@bobobeach.com wrote:
Forgive me if you've heard me rant about this before, but there is a mutual incompatibility between CLX, trivial-features (which, for me at least, gets pulled in whenever I try to use CFFI) and SBCL. The problem is that trivial-features puts :little-endian on *features* and CLX has the following code in defdeps.lisp:
#+(or lispm vax little-endian Minima) (eval-when (eval compile load) (pushnew :clx-little-endian *features*))
trivial-features is a bit impolite about pushing :little-endian to *features*. In my defense, one of the design goals of trivial-features is to effortlessly disappear over time. I.e., at some point in the future Lisps will have agreed on what keywords to use, and trivial-features will be a no-op or removed altogether without changes to code that uses it. As such, my decision was to use the same keywords that are in widespread use and make minimal adjustments to provide consistency across Lisps.
Perhaps if we can sneak a :little/big-endian feature into SBCL proper, the CLX fix will become inevitable and we'll be a tiny bit closer to achieving trivial-features' goal? :-)
Cheers,
-- Luís Oliveira http://r42.eu/~luis/
The following patch "fixes" CLX such that SBCL (or, more precisely, and SBCL that is configured to have :little-endian on its *features* list) no longer sees the old-style eval when conditions and makes clx.asd stop breaking the compilation due to the subsequent style-warning issued by SBCL:
diff -rN -u old-clx/depdefs.lisp new-clx/depdefs.lisp --- old-clx/depdefs.lisp 2011-03-11 08:31:55.000000000 -0800 +++ new-clx/depdefs.lisp 2011-03-11 08:31:55.000000000 -0800 @@ -141,7 +141,7 @@ ;;; You must define this to match the real byte order. It is used by ;;; overlapping array and image code.
-#+(or lispm vax little-endian Minima) +#+(or lispm vax (and (not sbcl) little-endian) Minima) (eval-when (eval compile load) (pushnew :clx-little-endian *features*))
Any objections to that patch?
thanks,
Cyrus
On Feb 18, 2011, at 1:40 PM, Cyrus Harmon wrote:
Forgive me if you've heard me rant about this before, but there is a mutual incompatibility between CLX, trivial-features (which, for me at least, gets pulled in whenever I try to use CFFI) and SBCL. The problem is that trivial-features puts :little-endian on *features* and CLX has the following code in defdeps.lisp:
#+(or lispm vax little-endian Minima) (eval-when (eval compile load) (pushnew :clx-little-endian *features*))
These old-style eval-when conditions cause SBCL to issue a warning, which causes ASDF to stop compiling CLX. There are many workarounds to this, such as loading CLX before CFFI and there are many possible fixes (such as making SBCL less pedantic or making ASDF not stop on warnings of this kind, etc...) But it seems to me that either fixing the CLX source code such that it is more tolerant of SBCL's pedantry or, alternatively, picking less common names for the *features* in trivial-features would be a good thing. I don't really have a preference, but it would be nice if the CLX and trivial-features maintainers would play nice with each other such that, at least when using SBCL, one can load trivial-features and then CFFI.
I'm certainly open to other suggestions, but I've grown tired of working around this particular problem.
thanks,
Cyrus
clx-devel mailing list clx-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/clx-devel
On Fri, Mar 11, 2011 at 4:43 PM, Cyrus Harmon ch-lisp@bobobeach.com wrote:
The following patch "fixes" CLX such that SBCL (or, more precisely, and SBCL that is configured to have :little-endian on its *features* list) no longer sees the old-style eval when conditions and makes clx.asd stop breaking the compilation due to the subsequent style-warning issued by SBCL:
FWIW, SBCL on little-endian MIPS pushes :little-endian to *features* out of the box.