sharplispers / ironclad

A cryptographic toolkit written in Common Lisp
BSD 3-Clause "New" or "Revised" License
176 stars 28 forks source link

Does not build on ECL? #56

Closed josharmenta closed 1 year ago

josharmenta commented 1 year ago

To load "ironclad":
  Load 1 ASDF system:
    ironclad
; Loading "ironclad"
.
;;; Internal error:
;;;   ** Error code 1 when executing
;;; (EXT:RUN-PROGRAM "gcc" ("-I." "-I/usr/local/include/" "-I/usr/local/opt/libffi/include" "-g" "-O2" "-fPIC" "-fno-common" "-D_THREAD_SAFE" "-Ddarwin" "-O2" "-c" "/Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.c" "-o" "/Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.o")):
;;; /Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.c:67:3: error: implicit declaration of function 'CHACHA_QUARTER_ROUND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
;;;   CHACHA_QUARTER_ROUND(0, 4, 8, 12);
;;;   ^
;;; /Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.c:174:3: error: implicit declaration of function 'CHACHA_QUARTER_ROUND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
;;;   CHACHA_QUARTER_ROUND(0, 4, 8, 12);
;;;   ^
;;; /Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.c:284:3: error: implicit declaration of function 'CHACHA_QUARTER_ROUND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
;;;   CHACHA_QUARTER_ROUND(0, 4, 8, 12);
;;;   ^
;;; /Users/joshuaarmenta/.cache/common-lisp/ecl-21.2.1-b049695e-macosx-x64/Users/joshuaarmenta/quicklisp/dists/ultralisp/software/sharplispers-ironclad-20221024233048/src/ciphers/chacha.c:394:3: error: implicit declaration of function 'CHACHA_QUARTER_ROUND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
;;;   CHACHA_QUARTER_ROUND(0, 4, 8, 12);
;;;   ^
;;; 4 errors generated.
Debugger received error of type: COMPILE-FILE-ERROR
COMPILE-FILE-ERROR while compiling #<cl-source-file "ironclad/cipher/chacha" "chacha">
Error flushed.'''
glv2 commented 1 year ago

It works on GNU/Linux x86-64 with ECL 21.2.1. What are your OS and ECL versions?

It looks like your compiler doesn't see the CHACHA_QUARTER_ROUND macro defined in "src/opt/ecl/c-functions.lisp". Strange...

josharmenta commented 1 year ago

This is on macOS with the latest develop branch of ECL.Sent from my iPhoneOn Jun 8, 2023, at 00:55, glv2 @.***> wrote: It works on GNU/Linux x86-64 with ECL 21.2.1. What are your OS and ECL versions? It looks like your compiler doesn't see the CHACHA_QUARTER_ROUND macro defined in "src/opt/ecl/c-functions.lisp". Strange...

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

glv2 commented 1 year ago

I applied a patch (62a99d3936825ead445e1820f35b0a1c318ebcce) that should fix this issue. Could you verify if it works for you?

josharmenta commented 1 year ago

Sorry about this, I have been busy with other stuff and forgot to test the new build! Works great, thank you!!