mirleft / ocaml-nocrypto

OCaml cryptographic library
ISC License
111 stars 53 forks source link

Doesn't work with 4.05, ppx_deriving: invalid argument "package:ppx_sexp_conv" #122

Open infinity0 opened 7 years ago

infinity0 commented 7 years ago

First, pin and install whitequark/ppx_deriving@8705088 (or later) as that is the first commit that supports 4.05.

Then pin and install nocrypto. However, it fails with:

# + ocamlfind ocamldep -package zarith -package bytes -package sexplib -package ppx_sexp_conv -package cstruct -modules src/nocrypto.mli > src/nocrypto.mli.depends
# ppx_deriving: invalid argument "package:ppx_sexp_conv".

I also tried installing ppx_sexp_conv from git (janestreet/ppx_sexp_conv@a4b2a5c91169f170c1f9ec3d156f4f8aaa6778e4 but this doesn't compile against the version of ppx_deriving that I just installed. The version from opam works however, and that's why I tried to compile nocrypto with.

rnml commented 6 years ago

I have a slightly different issue, but I also cannot [opam install nocrypto] with ocaml 4.05.0.

+ ocamlfind ocamlopt -pack -g -bin-annot -I src src/native.cmx src/uncommon.cmx src/base64.cmx src/hash.cmx src/cipher_stream.cmx src/ccm.cmx src/numeric.cmx src/gcm.cmx src/cipher_block.cmx src/fortuna.cmx src/hmac_drgb.cmx src/rng.cmx src/rsa.cmx src/dsa.cmx src/dh.cmx -o src/nocrypto.cmx
File "src/nocrypto.cmx", line 1:
Error: The implementation (obtained by packing)
       does not match the interface src/nocrypto.mli:
       ...
       In module Hash:
       Values do not match:
         val hash_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> hash
       is not included in
         val hash_of_sexp : Sexplib.Sexp.t -> hash
Command exited with code 2.

I ran into this issue after switching over to 4.05.0

$ opam switch | fgrep C
4.05.0  C 4.05.0  Official 4.05.0 release
cfcs commented 6 years ago

@rnml have you tried pinning to nocrypto master? last release was around some 15 months ago // 70 commits ago, so there's an ok chance that some of those changes fixed something. for me, pinning to master solves most problems (although it seems to break when linking with mirage-xen), but at least it works in linux. :)

cfcs commented 5 years ago

@infinity0 I think this can be closed now considering https://github.com/mirleft/ocaml-nocrypto/commit/a58c6534c5cc5da1598f8c979ea397ea2c6b92e1 ? <3