After extensive testing and refactoring, I have pushed a series of changes (from [r14176][] through [r14179][]) to trunk that should, among other things, finally fix the issues associated with loading CFFI.
To affect the fixes, I have introduced a slight change in the merge pathname semantics in [r14178][], which I described in the Manual by the following text:
When merging pathnames and the defaults point to a JAR-PATHNAME, we set the DEVICE of the result to :UNSPECIFIC if the pathname to be be merged does not contain a specified DEVICE, does not contain a specified HOST, does contain a relative DIRECTORY, and we are not running on a MSFT Windows platform. The intent of this rather arcane sounding deviation from conformance is so that the result of a merge won't fill in a DEVICE with the wrong "default device for the host" in the sense of the fourth paragraph in the CLHS description of MERGE-PATHNAMES (the paragraph beginning "If the PATHNAME explicitly specifies a host and not a device"). A future version of the implementation may return to conformance by using the HOST value to reflect the type explicitly.
Additionally TRUENAME on non-Windows now fills in the DEVICE component with :UNSPECIFIC, but this is conforming behaviour.
I will close the relevant tickets when I get a chance (and no one has proved me a liar in the meantime).
[r14176]: http://trac.common-lisp.net/armedbear/changeset/14176 [r14178]: http://trac.common-lisp.net/armedbear/changeset/14178 [r14179]: http://trac.common-lisp.net/armedbear/changeset/14179
Comments, criticisms, usage reports (especially of the "Yay! CFFI works now!" variety), solicited.
-- "A screaming comes across the sky. It has happened before but there is nothing to compare to it now."
Mark Evenson evenson@panix.com writes:
After extensive testing and refactoring, I have pushed a series of changes (from [r14176][] through [r14179][]) to trunk that should, among other things, finally fix the issues associated with loading CFFI.
To affect the fixes, I have introduced a slight change in the merge pathname semantics in [r14178][], which I described in the Manual by the following text:
When merging pathnames and the defaults point to a JAR-PATHNAME, we set the DEVICE of the result to :UNSPECIFIC if the pathname to be be merged does not contain a specified DEVICE, does not contain a specified HOST, does contain a relative DIRECTORY, and we are not running on a MSFT Windows platform. The intent of this rather arcane sounding deviation from conformance is so that the result of a merge won't fill in a DEVICE with the wrong "default device for the host" in the sense of the fourth paragraph in the CLHS description of MERGE-PATHNAMES (the paragraph beginning "If the PATHNAME explicitly specifies a host and not a device"). A future version of the implementation may return to conformance by using the HOST value to reflect the type explicitly.
Additionally TRUENAME on non-Windows now fills in the DEVICE component with :UNSPECIFIC, but this is conforming behaviour.
I will close the relevant tickets when I get a chance (and no one has proved me a liar in the meantime).
Comments, criticisms, usage reports (especially of the "Yay! CFFI works now!" variety), solicited.
First, when loading CFFI I get that ABCL-ASDF package is undefined. After loading abcl-asdf system, I get:
java.lang.ClassCastException: org.armedbear.lisp.Nil cannot be cast to org.armedbear.lisp.Pathname
at org.armedbear.lisp.Pathname.truename(Pathname.java:2244) at org.armedbear.lisp.Pathname.truename(Pathname.java:2136) at org.armedbear.lisp.Load.load(Load.java:169) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) <full backtrace attached>
java.lang.ClassCastException: org.armedbear.lisp.Nil cannot be cast to org.armedbear.lisp.Pathname at org.armedbear.lisp.Pathname.truename(Pathname.java:2244) at org.armedbear.lisp.Pathname.truename(Pathname.java:2136) at org.armedbear.lisp.Load.load(Load.java:169) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.load_1.execute(load.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.map_1.execute(map.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:121) at org.armedbear.lisp.Symbol.execute(Symbol.java:825) at org.armedbear.lisp.LispThread.execute(LispThread.java:666) at org.armedbear.lisp.asdf_450.execute(asdf.lisp:2550) at org.armedbear.lisp.clos_279.execute(clos.lisp:2572) at org.armedbear.lisp.clos_251.execute(clos.lisp:2236) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_389.execute(asdf.lisp:2384) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.clos_283.execute(clos.lisp:2676) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_443.execute(asdf.lisp:2540) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.asdf_445.execute(asdf.lisp:2540) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_442.execute(asdf.lisp:2540) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_392.execute(asdf.lisp:2390) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.asdf_394.execute(asdf.lisp:2390) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_391.execute(asdf.lisp:2390) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.clos_251.execute(clos.lisp:2236) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_501.execute(asdf.lisp:2694) at org.armedbear.lisp.compiler_pass2_372.execute(compiler-pass2.lisp:7413) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_500.execute(asdf.lisp:2694) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_499.execute(asdf.lisp:2694) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.clos_265.execute(clos.lisp:2453) at org.armedbear.lisp.clos_254.execute(clos.lisp:2236) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_504.execute(asdf.lisp:2701) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.asdf_258.execute(asdf.lisp:1803) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_503.execute(asdf.lisp:2701) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_502.execute(asdf.lisp:2701) at org.armedbear.lisp.clos_279.execute(clos.lisp:2572) at org.armedbear.lisp.clos_254.execute(clos.lisp:2236) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Lisp.funcall(Lisp.java:174) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2841) at org.armedbear.lisp.Primitive.execute(Primitive.java:148) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.asdf_508.execute(asdf.lisp:2761) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.map_1.execute(map.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:121) at org.armedbear.lisp.Symbol.execute(Symbol.java:825) at org.armedbear.lisp.LispThread.execute(LispThread.java:666) at org.armedbear.lisp.asdf_509.execute(asdf.lisp:2768) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_531.execute(asdf.lisp:2989) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.asdf_258.execute(asdf.lisp:1803) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_530.execute(asdf.lisp:2989) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:185) at org.armedbear.lisp.Symbol.execute(Symbol.java:882) at org.armedbear.lisp.LispThread.execute(LispThread.java:726) at org.armedbear.lisp.Lisp.funcall(Lisp.java:186) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2823) at org.armedbear.lisp.LispThread.execute(LispThread.java:666) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:567) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Lisp.eval(Lisp.java:511) at org.armedbear.lisp.Load.loadStream(Load.java:602) at org.armedbear.lisp.Load.loadFileFromStream(Load.java:570) at org.armedbear.lisp.Load.load(Load.java:202) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.load_1.execute(load.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:121) at org.armedbear.lisp.Symbol.execute(Symbol.java:825) at org.armedbear.lisp.LispThread.execute(LispThread.java:666) at org.armedbear.lisp.asdf_263.execute(asdf.lisp:1812) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Java$pf_jrun_exception_protected.execute(Java.java:1308) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_261.execute(asdf.lisp:1812) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.asdf_258.execute(asdf.lisp:1803) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_260.execute(asdf.lisp:1812) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_267.execute(asdf.lisp:1866) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.asdf_258.execute(asdf.lisp:1803) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_266.execute(asdf.lisp:1866) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_265.execute(asdf.lisp:1866) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.clos_254.execute(clos.lisp:2236) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_690.execute(asdf.lisp:4428) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Java$pf_jrun_exception_protected.execute(Java.java:1308) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_688.execute(asdf.lisp:4428) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.require_8.execute(require.lisp:55) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.early_defuns_21.execute(early-defuns.lisp:239) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.require_7.execute(require.lisp:55) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.ASDF_TMP_cffi_abcl_3.execute(cffi-abcl.lisp:1) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Java$pf_jrun_exception_protected.execute(Java.java:1308) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.ASDF_TMP_cffi_abcl_1.execute(cffi-abcl.lisp:1) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Primitives$pf_funcall.execute(Primitives.java:2685) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Load.faslLoadStream(Load.java:640) at org.armedbear.lisp.Load$init_fasl.execute(Load.java:435) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:560) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Load.loadStream(Load.java:602) at org.armedbear.lisp.Load.loadFileFromStream(Load.java:570) at org.armedbear.lisp.Load.load(Load.java:202) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.load_1.execute(load.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.map_1.execute(map.lisp:33) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:121) at org.armedbear.lisp.Symbol.execute(Symbol.java:825) at org.armedbear.lisp.LispThread.execute(LispThread.java:666) at org.armedbear.lisp.asdf_450.execute(asdf.lisp:2550) at org.armedbear.lisp.clos_279.execute(clos.lisp:2572) at org.armedbear.lisp.clos_251.execute(clos.lisp:2236) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_389.execute(asdf.lisp:2384) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.clos_283.execute(clos.lisp:2676) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_443.execute(asdf.lisp:2540) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.asdf_445.execute(asdf.lisp:2540) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_442.execute(asdf.lisp:2540) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_392.execute(asdf.lisp:2390) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.asdf_394.execute(asdf.lisp:2390) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2793) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_391.execute(asdf.lisp:2390) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.clos_251.execute(clos.lisp:2236) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:105) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_501.execute(asdf.lisp:2694) at org.armedbear.lisp.compiler_pass2_376.execute(compiler-pass2.lisp:7413) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Java$pf_jrun_exception_protected.execute(Java.java:1308) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.compiler_pass2_372.execute(compiler-pass2.lisp:7413) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_500.execute(asdf.lisp:2694) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2790) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_499.execute(asdf.lisp:2694) at org.armedbear.lisp.clos_281.execute(clos.lisp:2671) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.clos_265.execute(clos.lisp:2453) at org.armedbear.lisp.clos_254.execute(clos.lisp:2236) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_504.execute(asdf.lisp:2701) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.asdf_258.execute(asdf.lisp:1803) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.asdf_503.execute(asdf.lisp:2701) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:135) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.Lisp.funcall(Lisp.java:178) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2805) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.asdf_502.execute(asdf.lisp:2701) at org.armedbear.lisp.clos_279.execute(clos.lisp:2572) at org.armedbear.lisp.clos_254.execute(clos.lisp:2236) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:135) at org.armedbear.lisp.FuncallableStandardObject.execute(FuncallableStandardObject.java:121) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.Lisp.funcall(Lisp.java:178) at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2841) at org.armedbear.lisp.Primitive.execute(Primitive.java:148) at org.armedbear.lisp.Symbol.execute(Symbol.java:837) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.asdf_505.execute(asdf.lisp:2731) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:135) at org.armedbear.lisp.LispThread.execute(LispThread.java:680) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:574) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Primitives$sf_and.execute(Primitives.java:4046) at org.armedbear.lisp.Lisp.eval(Lisp.java:508) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3737) at org.armedbear.lisp.Lisp.eval(Lisp.java:508) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Closure.execute(Closure.java:220) at org.armedbear.lisp.Closure.execute(Closure.java:148) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Primitives$pf__eval.execute(Primitives.java:345) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3737) at org.armedbear.lisp.Lisp.eval(Lisp.java:508) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Closure.execute(Closure.java:220) at org.armedbear.lisp.Closure.execute(Closure.java:148) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp$1.execute(Lisp.java:285) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.top_level_50.execute(top-level.lisp:407) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:109) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.debug_2.execute(debug.lisp:66) at org.armedbear.lisp.Symbol.execute(Symbol.java:792) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.debug_3.execute(debug.lisp:78) at org.armedbear.lisp.Symbol.execute(Symbol.java:792) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.debug_8.execute(debug.lisp:114) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.with_standard_io_syntax_1.execute(with-standard-io-syntax.lisp:35) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.debug_7.execute(debug.lisp:114) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.signal_2.execute(signal.lisp:63) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.restart_70.execute(restart.lisp:303) at org.armedbear.lisp.Symbol.execute(Symbol.java:813) at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Symbol.undefinedFunction(Symbol.java:919) at org.armedbear.lisp.Symbol.execute(Symbol.java:800) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Primitives$pf__eval.execute(Primitives.java:345) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3737) at org.armedbear.lisp.Lisp.eval(Lisp.java:508) at org.armedbear.lisp.Symbol.execute(Symbol.java:792) ; Caught STYLE-WARNING:
at org.armedbear.lisp.LispThread.execute(LispThread.java:653) at org.armedbear.lisp.Symbol.undefinedFunction(Symbol.java:919) at org.armedbear.lisp.Symbol.execute(Symbol.java:800) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Primitives$pf__eval.execute(Primitives.java:345) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:553) at org.armedbear.lisp.Lisp.eval(Lisp.java:518) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3737) at org.armedbear.lisp.Lisp.eval(Lisp.java:508) at org.armedbear.lisp.Lisp.progn(Lisp.java:687) at org.armedbear.lisp.Closure.execute(Closure.java:220) at org.armedbear.lisp.Closure.execute(Closure.java:148) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.Lisp$1.execute(Lisp.java:285) at org.armedbear.lisp.Symbol.execute(Symbol.java:802) at org.armedbear.lisp.LispThread.execute(LispThread.java:640) at org.armedbear.lisp.top_level_50.execute(top-level.lisp:407) at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89) at org.armedbear.lisp.Symbol.execute(Symbol.java:792) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.top_level_51.execute(top-level.lisp:415) at org.armedbear.lisp.LispThread.execute(LispThread.java:628) at org.armedbear.lisp.Interpreter.run(Interpreter.java:361) at org.armedbear.lisp.Main$1.run(Main.java:48) at java.lang.Thread.run(Thread.java:679) #<THREAD "interpreter" {9B2C86E}>: Debugger invoked on condition of type ERROR Caught java.lang.ClassCastException: org.armedbear.lisp.Nil cannot be cast to org.armedbear.lisp.Pathname.
I have debian with OpenJDK 1.6.0_24 and libjna-java at version 3.2.7.
On 10/11/12 3:28 PM, Stas Boukarev wrote:
Mark Evenson evenson@panix.com writes:
After extensive testing and refactoring, I have pushed a series of changes (from [r14176][] through [r14179][]) to trunk that should, among other things, finally fix the issues associated with loading CFFI.
[…]
First, when loading CFFI I get that ABCL-ASDF package is undefined. After loading abcl-asdf system, I get:
From a stock
java.lang.ClassCastException: org.armedbear.lisp.Nil cannot be cast to org.armedbear.lisp.Pathname
at org.armedbear.lisp.Pathname.truename(Pathname.java:2244) at org.armedbear.lisp.Pathname.truename(Pathname.java:2136) at org.armedbear.lisp.Load.load(Load.java:169) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) <full backtrace attached>
I have debian with OpenJDK 1.6.0_24 and libjna-java at version 3.2.7.
I'm building a clone of your os/jvm combination in virtualization, but it is going take a bit as currently, I can't duplicate (ORCL jvm running on Windows/Solaris/OS X).
I've included a patch in [r14183][] which should emit more meaningful diagnostics for this failure in the meantime.
[r14183] http://trac.common-lisp.net/armedbear/changeset/14183
Thanks for "Bearing" with us, Mark evenson@panix.com
Mark Evenson evenson@panix.com writes:
On 10/11/12 3:28 PM, Stas Boukarev wrote:
Mark Evenson evenson@panix.com writes:
After extensive testing and refactoring, I have pushed a series of changes (from [r14176][] through [r14179][]) to trunk that should, among other things, finally fix the issues associated with loading CFFI.
[…]
First, when loading CFFI I get that ABCL-ASDF package is undefined. After loading abcl-asdf system, I get:
From a stock
java.lang.ClassCastException: org.armedbear.lisp.Nil cannot be cast to org.armedbear.lisp.Pathname
at org.armedbear.lisp.Pathname.truename(Pathname.java:2244) at org.armedbear.lisp.Pathname.truename(Pathname.java:2136) at org.armedbear.lisp.Load.load(Load.java:169) at org.armedbear.lisp.Load.load(Load.java:715) at org.armedbear.lisp.Load$_load.execute(Load.java:665) <full backtrace attached>
I have debian with OpenJDK 1.6.0_24 and libjna-java at version 3.2.7.
I'm building a clone of your os/jvm combination in virtualization, but it is going take a bit as currently, I can't duplicate (ORCL jvm running on Windows/Solaris/OS X).
I've included a patch in [r14183][] which should emit more meaningful diagnostics for this failure in the meantime.
[r14183] http://trac.common-lisp.net/armedbear/changeset/14183
I still get the same error and backtrace.
On 10/12/12 5:36 PM, Stas Boukarev wrote:
I still get the same error and backtrace.
[…]
Unfortunately, I was unable to duplicate at my end after installing x64-ubuntu-12.04.LTS with 1.6.0_24-openjdk-6b24-1.11.4-1ubuntu0.12.94.1.
But maybe things have moved on in trunk enough that you could maybe build from scratch and erase the application fasls via
unix$ ant snap abcl abcl.clean.application.fasls
I currently [need to patch CFFI][abcl-cffi] to get past a error about "u955" not being understood by the BABEL reader.
[abcl-cffi]: http://slack.net/~evenson/abcl/cffi/cffi-abcl-20121016a.patch
Mark Evenson evenson@panix.com writes:
On 10/12/12 5:36 PM, Stas Boukarev wrote:
I still get the same error and backtrace.
[…]
Unfortunately, I was unable to duplicate at my end after installing x64-ubuntu-12.04.LTS with 1.6.0_24-openjdk-6b24-1.11.4-1ubuntu0.12.94.1.
But maybe things have moved on in trunk enough that you could maybe build from scratch and erase the application fasls via
unix$ ant snap abcl abcl.clean.application.fasls
I've cleaning things before, and none of your changes affect the error. Looks like I'll need to debug it myself.
Mark Evenson evenson@panix.com writes:
On 10/12/12 5:36 PM, Stas Boukarev wrote:
I still get the same error and backtrace.
[…]
Unfortunately, I was unable to duplicate at my end after installing x64-ubuntu-12.04.LTS with 1.6.0_24-openjdk-6b24-1.11.4-1ubuntu0.12.94.1.
But maybe things have moved on in trunk enough that you could maybe build from scratch and erase the application fasls via
unix$ ant snap abcl abcl.clean.application.fasls
I currently [need to patch CFFI][abcl-cffi] to get past a error about "u955" not being understood by the BABEL reader.
Now when trying to load cffi from quicklisp I get a different error, a misplaced COND body. A patch is attached.
Further, as I'm trying it on a different machine and it doesn't have maven installed. So it throws a not so helpful error: The value NIL is not of type (OR PATHNAME STRING FILE-STREAM SYSTEM:JAR-STREAM SYSTEM:URL-STREAM).
Attached a patch for this as well.
Now, after installing maven I'm able to load cffi from quicklisp, but not in my ordinary setup.
Turns out the error is actually caused by (:asd :jss), more specifically, by (load #P"/tmp/fasls/.../abcl-contrib.jar!/jss/packages.abcl")
Which means that it can't load fasls from directories with "!".
After I do
(setf asdf:*central-registry* (append asdf:*central-registry* (mapcar #'pathname (mapcar #'directory-namestring (directory "~/lisp/impl/abcl/contrib/*/*.asd")))))
(push 'abcl-contrib *modules*)
I'm now able to load CFFI. And also load cl+ssl, although it doesn't actually work.
(drakma:http-request "https://google.com") WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. #<THREAD "interpreter" {29ED3DA1}>: Debugger invoked on condition of type TYPE-ERROR $Proxy5 is not assignable to com.sun.jna.Pointer
And loading cl+ssl in a fresh imaged, after it was compiled beforehand causes: Error loading /tmp/fasls/.../cl+ssl/ffi.abcl at line 168 (offset 9274) #<THREAD "interpreter" {32269133}>: Debugger invoked on condition of type ERROR Class not found: org.armedbear.jna.dynamic.callbacks.G72378
On 10/19/12 5:19 AM, Stas Boukarev wrote:
Mark Evenson evenson@panix.com writes:
I currently [need to patch CFFI][abcl-cffi] to get past a error about "u955" not being understood by the BABEL reader.
Thanks for the work here! In the meantime, I have [started to rework the ABCL implementation CFFI][abcl-cffi] to remove the compiler warnings, and to start fixing bugs for particular versions of the jna.jar for various platforms. jna-3.4.0 seems to be failing for some usages of implementing callbacks, like those required cl+ssl, where jna-3.0.9 seems to work.
[abcl-cffi] http://detroit.slack.net/~evenson/abcl/cffi/cffi-abcl-20121017a.patch
Now when trying to load cffi from quicklisp I get a different error, a misplaced COND body. A patch is attached.
[…]
Further, as I'm trying it on a different machine and it doesn't have maven installed. So it throws a not so helpful error: The value NIL is not of type (OR PATHNAME STRING FILE-STREAM SYSTEM:JAR-STREAM SYSTEM:URL-STREAM).
Attached a patch for this as well.
[…]
Both of your patches have been combined into [r14205][].
[r14205]: http://trac.common-lisp.net/armedbear/changeset/14205
Now, after installing maven I'm able to load cffi from quicklisp, but not in my ordinary setup.
Turns out the error is actually caused by (:asd :jss), more specifically, by (load #P"/tmp/fasls/.../abcl-contrib.jar!/jss/packages.abcl")
Which means that it can't load fasls from directories with "!".
ABCL pathnames *should* allow directories with "!" in them, as long as the hosting JVM implementation can handle them. But "!" has a special meaning in the namestrings that a ABCL PATHNAME converts to/from. In ABCL, a PATHNAME with a namestring of "jar:file://foo/abcl-contrib.jar!/jss/packages.abcl" names a specific entry in a jar archive. The ABCL specific code in the ASDF output translations, namely ASDF::TRANSLATE-JAR-PATHNAME, should now correctly deal with these things. Maybe you are somehow not running the ASDF shipped with ABCL, but instead one that is listed in the ASDF system registry? This could explain why we see different behavior on what should be otherwise fairly identical systems, namely the binaries installed by ubuntu-12.04 system packaging. (Faré: I'm waiting for reports like Stas' to shake out before submitting a patch for asdf-2.26).
[…]
I'm now able to load CFFI. And also load cl+ssl, although it doesn't actually work.
(drakma:http-request "https://google.com") WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. WARNING: JAVA:MAKE-IMMEDIATE-OBJECT is deprecated. #<THREAD "interpreter" {29ED3DA1}>: Debugger invoked on condition of type TYPE-ERROR $Proxy5 is not assignable to com.sun.jna.Pointer
I'll have to get back to the big machine where I installed my Ubuntu-12.04 to check this precisely. Under Solaris (oi-151a6), I get to problems with cl+ssl::*global-lock*, so CFFI definitely needs a bit of love to get things working smoothly. When I initially implemented callbacks with JNA, I left some of the primitive constructs, like mapping vectors to space in memory, unimplemented, and a fair amount untested. That debt now needs to be repaid.
And loading cl+ssl in a fresh imaged, after it was compiled beforehand causes: Error loading /tmp/fasls/.../cl+ssl/ffi.abcl at line 168 (offset 9274) #<THREAD "interpreter" {32269133}>: Debugger invoked on condition of type ERROR Class not found: org.armedbear.jna.dynamic.callbacks.G72378
There is an interactive restart available where one of the options is to "recompile" the interface. As Yogi Bera might say where confronted with options, take it. The current implementation for generating interfaces for CFFI sub-optimally uses GENSYM to name the associated java class. Before abcl-1.1.0, I need to come up with a way to hash a given implementation to a reasonable Java class name, so I can avoid the need for a restart.
Thanks so much for the detective work, Mark
Mark Evenson evenson@panix.com writes:
On 10/19/12 5:19 AM, Stas Boukarev wrote:
Mark Evenson evenson@panix.com writes:
I currently [need to patch CFFI][abcl-cffi] to get past a error about "u955" not being understood by the BABEL reader.
Thanks for the work here! In the meantime, I have [started to rework the ABCL implementation CFFI][abcl-cffi] to remove the compiler warnings, and to start fixing bugs for particular versions of the jna.jar for various platforms. jna-3.4.0 seems to be failing for some usages of implementing callbacks, like those required cl+ssl, where jna-3.0.9 seems to work.
[abcl-cffi] http://detroit.slack.net/~evenson/abcl/cffi/cffi-abcl-20121017a.patch
Another fix for you (offset might be skewed with your patch)
@@ -317,7 +317,7 @@ WITH-POINTER-TO-VECTOR-DATA." "com.sun.jna.Pointer" "int") pointer (jfield "com.sun.jna.Function" - (convert-calling-convention convention)))) + (convert-calling-convention cconv))))
(defun lisp-value-to-java (value foreign-type) (if (eq foreign-type :pointer)
Turns out the error is actually caused by (:asd :jss), more specifically, by (load #P"/tmp/fasls/.../abcl-contrib.jar!/jss/packages.abcl")
Which means that it can't load fasls from directories with "!".
ABCL pathnames *should* allow directories with "!" in them, as long as the hosting JVM implementation can handle them. But "!" has a special meaning in the namestrings that a ABCL PATHNAME converts to/from. In ABCL, a PATHNAME with a namestring of "jar:file://foo/abcl-contrib.jar!/jss/packages.abcl" names a specific entry in a jar archive. The ABCL specific code in the ASDF output translations, namely ASDF::TRANSLATE-JAR-PATHNAME, should now correctly deal with these things. Maybe you are somehow not running the ASDF shipped with ABCL, but instead one that is listed in the ASDF system registry? This could explain why we see different behavior on what should be otherwise fairly identical systems, namely the binaries installed by ubuntu-12.04 system packaging. (Faré: I'm waiting for reports like Stas' to shake out before submitting a patch for asdf-2.26).
What's different is that I'm also using asdf-binary-locations: (asdf:enable-asdf-binary-locations-compatibility :centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
On 10/19/12 6:22 PM, Stas Boukarev wrote:
What's different is that I'm also using asdf-binary-locations: (asdf:enable-asdf-binary-locations-compatibility :centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
What is the value of *FASL-DIR* here? Something like #p"~/tmp/"?
Mark Evenson evenson@panix.com writes:
On 10/19/12 6:22 PM, Stas Boukarev wrote:
What's different is that I'm also using asdf-binary-locations: (asdf:enable-asdf-binary-locations-compatibility :centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
What is the value of *FASL-DIR* here? Something like #p"~/tmp/"?
I don't think that it matters, does it?
On 10/21/12 5:32 PM, Stas Boukarev wrote:
Mark Evenson evenson@panix.com writes:
On 10/19/12 6:22 PM, Stas Boukarev wrote:
What's different is that I'm also using asdf-binary-locations: (asdf:enable-asdf-binary-locations-compatibility :centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
What is the value of *FASL-DIR* here? Something like #p"~/tmp/"?
I don't think that it matters, does it?
This should be fixed in trunk. Filed as ticket [#254][] for posterity.
[#254]: http://trac.common-lisp.net/armedbear/ticket/254
Thanks for the bug report, Mark
armedbear-devel@common-lisp.net