Lisp HUG Maillist Archive

Compiling Ironclad library with LW

I am unable to compile the ironclad library <
http://method-combination.net/lisp/ironclad/ > with Lispworks,
although
it compiles with no issues in SBCL.

Has anyone found a solution?

My best,

Fred Gibson

Founder / Software Developer
http://www.streamfocus.com

(c)2010 Organon Technologies LLC


Re: Compiling Ironclad library with LW

Then show your error backtrace please. Ironclad compiles fine and always fine on my LW.

--binghe

> 
> I am unable to compile the ironclad library <
> http://method-combination.net/lisp/ironclad/ > with Lispworks,
> although
> it compiles with no issues in SBCL.
> 
> Has anyone found a solution?
> 
> My best,
> 
> Fred Gibson
> 
> Founder / Software Developer
> http://www.streamfocus.com
> 
> (c)2010 Organon Technologies LLC
> 


Re: Compiling Ironclad library with LW

I'm running LW 4.4.6 - could this earlier version be the problem?

I noticed in the ironclad.asd file that exceptions where made for sbcl
and cmu.  Could there be a workaround for this earlier LW version as
well?

(defmethod perform :around ((op compile-op) (c ironclad-source-file))
  (let ((*readtable* *ironclad-readtable*)
        (*print-base* 10)               ; INTERN'ing FORMAT'd symbols
        (*print-case* :upcase)
        #+sbcl (sb-ext:*inline-expansion-limit* (max
sb-ext:*inline-expansion-limit* 1000))
        #+sbcl (*features* (list* sb-c:*backend-byte-order*
                                  (if (= sb-vm:n-word-bits 32)
                                      :32-bit
                                      :64-bit)
                                  *features*))
        #+cmu (ext:*inline-expansion-limit* (max
ext:*inline-expansion-limit* 1000))
        #+cmu (*features* (list* (c:backend-byte-order c:*target-backend*)
                                 (if (= vm:word-bits 32)
                                     :32-bit
                                     :64-bit)
                                 *features*)))
    (do-silently (call-next-method))))

The beginning of the code that fails to compile is this:

(defconst +sha256-round-constants+
#32@(#x428A2F98 #x71374491 #xB5C0FBCF #xE9B5DBA5 #x3956C25B #x59F111F1
 #x923F82A4 #xAB1C5ED5 #xD807AA98 #x12835B01 #x243185BE #x550C7DC3
 #x72BE5D74 #x80DEB1FE #x9BDC06A7 #xC19BF174 #xE49B69C1 #xEFBE4786
 #x0FC19DC6 #x240CA1CC #x2DE92C6F #x4A7484AA #x5CB0A9DC #x76F988DA
 #x983E5152 #xA831C66D #xB00327C8 #xBF597FC7 #xC6E00BF3 #xD5A79147
 #x06CA6351 #x14292967 #x27B70A85 #x2E1B2138 #x4D2C6DFC #x53380D13
 #x650A7354 #x766A0ABB #x81C2C92E #x92722C85 #xA2BFE8A1 #xA81A664B
 #xC24B8B70 #xC76C51A3 #xD192E819 #xD6990624 #xF40E3585 #x106AA070
 #x19A4C116 #x1E376C08 #x2748774C #x34B0BCB5 #x391C0CB3 #x4ED8AA4A
 #x5B9CCA4F #x682E6FF3 #x748F82EE #x78A5636F #x84C87814 #x8CC70208
 #x90BEFFFA #xA4506CEB #xBEF9A3F7 #xC67178F2))

Backtrace:

erred while invoking #<ASDF:COMPILE-OP NIL 26D83764> on
#<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4>
   [Condition of type ASDF:COMPILE-ERROR]

Restarts:
 0: [DEFAULT-DEBUGGER] Use default debugger.
 1: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL 26D83764> on
#<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4>.
 2: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL 26D83764> on
#<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4> as having
been successful.
 3: [ABORT] Return to SLIME's top level.
 4: [ABORT] Quit process.

Backtrace:
  0: CONDITIONS::CONDITIONS-ERROR (:INVISIBLEP T ASDF:COMPILE-ERROR
(:COMPONENT #<IRONCLAD-SYSTEM::IRONCL..
      Locals:
        CONDITIONS::DATUM = ASDF:COMPILE-ERROR
        CONDITIONS::ARGUMENTS = (:COMPONENT ..)
  1: (METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE)) NIL
      Locals:
        ASDF:OPERATION = #<ASDF:COMPILE-OP NIL 26D83764>
        ASDF::C = #<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4>
        #:G6769 = (#<"closure" (SUBFUNCTION 1
CLOS::ENSURE-COMPILED-FUNCTION) 234C3932>)
        #:G6770 = #<ASDF:COMPILE-OP NIL 26D83764>
        #:G6771 = #<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4>
        CALL-NEXT-METHOD = #<interpreted closure (LAMBDA (&OPTIONAL
#:G6773 #:G6772) ..)
        NEXT-METHOD-P = #<interpreted closure (LAMBDA () ..)
        ASDF:SOURCE-FILE = #P"C:/Otech/sf/lib/ironclad_0.27/sha256.lisp"
        ASDF::OUTPUT-FILE = #P"C:/Otech/sf/lib/ironclad_0.27/sha256.fsl"
        ASDF::OUTPUT = NIL
        ASDF::WARNINGS-P = ((IRONCLAD::UPDATE-SHA256-BLOCK
#<SIMPLE-ERROR 26D72954>) ..)
        ASDF::FAILURE-P = T
  2: (SUBFUNCTION 1 CLOS::ENSURE-COMPILED-FUNCTION) (:INVISIBLEP T
&REST (#<ASDF:COMPILE-OP NIL 26D83764>..
  3: #<function 203D9852> NIL
  4: CLOS::CALL-NEXT-METHOD-WITH-ORIGINAL (NIL ..)
  5: SYSTEM::ANONYMOUS-LAMBDA NIL
  6: (METHOD ASDF:PERFORM :AROUND (ASDF:COMPILE-OP
IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE)) NIL
      Locals:
        IRONCLAD-SYSTEM::OP = #<ASDF:COMPILE-OP NIL 26D83764>
        IRONCLAD-SYSTEM::C = #<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE
"sha256" 2169A3C4>
        #:G5117 = (#<closure 234C3992>)
        #:G5118 = #<ASDF:COMPILE-OP NIL 26D83764>
        #:G5119 = #<IRONCLAD-SYSTEM::IRONCLAD-SOURCE-FILE "sha256" 2169A3C4>
        CALL-NEXT-METHOD = #<interpreted closure (LAMBDA (&OPTIONAL
#:G5121 #:G5120) ..)
        NEXT-METHOD-P = #<interpreted closure (LAMBDA () ..)
        *READTABLE* = #<READTABLE 2244BF94>
        *PRINT-BASE* = 10
        *PRINT-CASE* = :UPCASE
        #:G5122 = #<"function" MUFFLE-WARNING 202C0C82>
        CONDITIONS::*HANDLER-CLUSTERS* = (((SWANK-BACKEND:SLDB-CONDITION ..)))
  7: (SUBFUNCTION 1 CLOS::ENSURE-COMPILED-FUNCTION) (:INVISIBLEP T
&REST (#<ASDF:COMPILE-OP NIL 26D83764>..
  8: #<function 203D86E2> NIL
  9: SYSTEM::ANONYMOUS-LAMBDA NIL

On Sun, Jan 3, 2010 at 9:57 AM, Chun Tian (binghe)
<binghe.lisp@gmail.com> wrote:
> Then show your error backtrace please. Ironclad compiles fine and always fine on my LW.
>
> --binghe
>
>>
>> I am unable to compile the ironclad library <
>> http://method-combination.net/lisp/ironclad/ > with Lispworks,
>> although
>> it compiles with no issues in SBCL.
>>
>> Has anyone found a solution?
>>
>> My best,
>>
>> Fred Gibson
>>
>> Founder / Software Developer
>> http://www.streamfocus.com
>>
>> (c)2010 Organon Technologies LLC
>>
>
>



-- 
Fred Gibson

Founder / Software Developer
http://www.streamfocus.com

(c)2010 Organon Technologies LLC


Re: Compiling Ironclad library with LW

Unable to parse email body. Email id is 9636

Re: Compiling Ironclad library with LW

"Chun Tian (binghe)" <binghe.lisp@gmail.com> writes:

> It's possible that latest Ironclad code cannot compile correctly on LW 4.4.6, but I can't confirm this.
>
> By the way, the backtrace you showed is useless: the actual issue in hidden by ASDF, I think you can use following steps to get a useful backtrace:
>
> 1) Stop ASDF loading process when it stops at "sha256.lisp"
> 2) Call something like (compile-file "sha256.lisp") manually
> 3) Get the error backtrace and paste here.

No he can't do that because ironclad.asd defines an :AROUND method on
COMPILE-OP as shown in his previous mail. That around method binds
*READTABLE* for the #@ reader macro to work.

He'd have to also bind *READTABLE* appropriately on his call to
COMPILE-FILE.

Ideally, Ironclad used named-readtables available at

  http://common-lisp.net/project/editor-hints/darcs/named-readtables/doc/named-readtables.html

  -T.


Re: Compiling Ironclad library with LW

Jochen Schmidt <jsc@crispylogics.com> writes:

> Am 03.01.2010 um 18:57 schrieb Chun Tian (binghe):
>
> > Then show your error backtrace please. Ironclad compiles fine and
> always fine on my LW.
>
> It did compile here too - so further details (backtrace, LW version
> a.s.o.) would be needed to investigate this further.
>
> But: The compilation conditions tool shows alot of warnings which
> after short introspection of the code should be revised:
>
> 1) Some instantiations of instances use initargs not defined in the
> class (e.g. PBKDF1 doesn't have :digest). 

I think that one is bogus. See my other posting.

  -T.


Re: Compiling Ironclad library with LW

On Sun, Jan 3, 2010 at 1:32 PM, Jochen Schmidt <js@crispylogics.com> wrote:
> 1) Some instantiations of instances use initargs not defined in the class (e.g. PBKDF1 doesn't have :digest).
> 2) Inline expansions are missing for XOR-BLOCK which happens to be a compilation order problem (e.g., modes.lisp, where XOR-BLOCK is defined is not a dependeny for hmac.lisp were it is used).
> 3) Some variables were defined but not used.

I've tried to fix the last two problems and some of the other problems
(e.g. code bloat in the sha256 implementation) mentioned in this
thread.  I'll try to get a 0.27.1 release out by the end of the week.
Otherwise, the code can be found on github:
http://github.com/froydnj/ironclad (clone from
git://github.com/froydnj/ironclad.git).

I have to say, people using Lispworks have been extremely helpful in
ironing out some of the portability issues and outright bugs in
Ironclad.  Please keep sending along problems as you find them!  (And
if the Lispworks hackers want to implement things like unsigned int32
shifts, that would be extremely helpful in opening doors for making
Ironclad faster on Lispworks...)

Thanks,
-Nathan


Updated at: 2020-12-10 08:40 UTC