Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #156

Open
XVilka opened this issue Mar 25, 2019 · 3 comments

Comments

@XVilka
Copy link

XVilka commented Mar 25, 2019

Building nocrypto at Alpine Edge docker container, got this error:

ERROR] The compilation of nocrypto failed at "/home/user/.opam/default/bin/ocaml pkg/pkg.ml build --pinned false --tests false --jobs 1 --with-lwt true --xen false --freestanding false".

#=== ERROR while compiling nocrypto.0.5.4-1 ===================================#
# context              2.0.3 | linux/x86_64 | ocaml-system.4.07.1 | https://opam.ocaml.org#e143b0a1
# path                 ~/.opam/default/.opam-switch/build/nocrypto.0.5.4-1
# command              ~/.opam/default/bin/ocaml pkg/pkg.ml build --pinned false --tests false --jobs 1 --with-lwt true --xen false --freestanding false
# exit-code            1
# env-file             ~/.opam/log/nocrypto-1-f44153.env
# output-file          ~/.opam/log/nocrypto-1-f44153.out
### output ###
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-tag' 'debug'
# [...]
#      'accelerate' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md' 'README.md'
#      'src/dllnocrypto_stubs.so' 'src/libnocrypto_stubs.a' 'src/nocrypto.a'
#      'src/nocrypto.cmxs' 'src/nocrypto.cmxa' 'src/nocrypto.cma'
#      'src/nocrypto.cmx' 'src/nocrypto.cmi' 'src/nocrypto.mli'
#      'unix/nocrypto_unix.a' 'unix/nocrypto_unix.cmxs'
#      'unix/nocrypto_unix.cmxa' 'unix/nocrypto_unix.cma'
#      'unix/nocrypto_entropy_unix.cmx' 'unix/nocrypto_entropy_unix.cmi'
#      'unix/nocrypto_entropy_unix.mli' 'lwt/nocrypto_lwt.a'
#      'lwt/nocrypto_lwt.cmxs' 'lwt/nocrypto_lwt.cmxa' 'lwt/nocrypto_lwt.cma'
#      'lwt/nocrypto_entropy_lwt.cmx' 'lwt/nocrypto_entropy_lwt.cmi'
#      'lwt/nocrypto_entropy_lwt.mli']: exited with 10

*.out file contents is:

ocamlfind ocamlopt -pack -g -bin-annot -package ppx_sexp_conv -package bytes -package cstruct -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
+ ocamlfind ocamlopt -pack -g -bin-annot -package ppx_sexp_conv -package bytes -package cstruct -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
       File "src/nocrypto.mli", line 217, characters 2-43:
         Expected declaration
       File "src/hash.ml", line 114, characters 0-86: Actual declaration
Command exited with code 2.
pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-tag' 'debug'
     '-build-dir' '_build' '-plugin-tag' 'package(ocb-stubblr)' '-tag'
     'accelerate' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md' 'README.md'
     'src/dllnocrypto_stubs.so' 'src/libnocrypto_stubs.a' 'src/nocrypto.a'
     'src/nocrypto.cmxs' 'src/nocrypto.cmxa' 'src/nocrypto.cma'
     'src/nocrypto.cmx' 'src/nocrypto.cmi' 'src/nocrypto.mli'
     'unix/nocrypto_unix.a' 'unix/nocrypto_unix.cmxs'
     'unix/nocrypto_unix.cmxa' 'unix/nocrypto_unix.cma'
     'unix/nocrypto_entropy_unix.cmx' 'unix/nocrypto_entropy_unix.cmi'
     'unix/nocrypto_entropy_unix.mli' 'lwt/nocrypto_lwt.a'
     'lwt/nocrypto_lwt.cmxs' 'lwt/nocrypto_lwt.cmxa' 'lwt/nocrypto_lwt.cma'
     'lwt/nocrypto_entropy_lwt.cmx' 'lwt/nocrypto_entropy_lwt.cmi'
     'lwt/nocrypto_entropy_lwt.mli']: exited with 10
@XVilka XVilka changed the title pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-tag' 'debug' 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 Mar 26, 2019
@avsm
Copy link

avsm commented Mar 26, 2019

I'm looking into this. It smells a bit like a compiler bug in 4.07 to do with packing, since it's very hard to reproduce.

@avsm
Copy link

avsm commented Mar 26, 2019

did you have cstruct.4.0.0 pinned while building this @XVilka ?

@XVilka
Copy link
Author

XVilka commented Mar 27, 2019

@avsm indeed, I have Cstruct pinned to the git repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants