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

Doesn't compile with OCaml 4.08 and 4.09(beta) #165

Open
XVilka opened this issue Sep 15, 2019 · 3 comments
Open

Doesn't compile with OCaml 4.08 and 4.09(beta) #165

XVilka opened this issue Sep 15, 2019 · 3 comments

Comments

@XVilka
Copy link

XVilka commented Sep 15, 2019

- + 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/cipher_block.cmx src/numeric.cmx src/fortuna.cmx src/hmac_drgb.cmx src/rng.cmx src/rsa.cmx src/dsa.cmx src/dh.cmx -o src/nocrypto.cmx
- Fatal error: exception Invalid_argument("index out of bounds")
- Command exited with code 2.
- pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-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']: exited with 10
[ERROR] The compilation of nocrypto failed at
        "/home/travis/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml
        build --pinned true --tests false --with-lwt false --xen false --mirage
        false --freestanding false".

#=== ERROR while compiling nocrypto.0.5.4-1 ===================================#

# context     2.0.3 | linux/x86_64 | ocaml-base-compiler.4.08.0 | pinned(file:///home/travis/build/mirleft/ocaml-nocrypto)
# path        ~/.opam/ocaml-base-compiler.4.08.0/.opam-switch/build/nocrypto.0.5.4-1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pinned true --tests false --with-lwt false --xen false --mirage false --freestanding false
# exit-code   1
# env-file    ~/.opam/log/nocrypto-31481-58c514.env
# output-file ~/.opam/log/nocrypto-31481-58c514.out
### output ###
# [...]
# Fatal error: exception Invalid_argument("index out of bounds")
# Command exited with code 2.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-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']: exited with 10
@swuecho
Copy link

swuecho commented Oct 15, 2019

in 4.08.0

The following dependencies couldn't be met:
  - nocrypto → ctypes < 0.4.0 → ocaml < 4.03.0
      base of this switch (use `--unlock-base' to force)
  - nocrypto → ocaml < 4.06.0
      base of this switch (use `--unlock-base' to force)
  - nocrypto → ppx_sexp_conv < v0.11.0 → ppx_core < v0.11 → ocaml < 4.06.0
      base of this switch (use `--unlock-base' to force)
  - nocrypto → ppx_sexp_conv < v0.11.0 → ppx_core < v0.11 → ppx_ast < v0.11 → ocaml < 4.08.0
      base of this switch (use `--unlock-base' to force)
  - nocrypto → ppx_sexp_conv < v0.11.0 → ocaml < 4.03
      base of this switch (use `--unlock-base' to force)
  - nocrypto → sexplib < 113.01.00 → ocaml < 4.03.0
      base of this switch (use `--unlock-base' to force)

@hannesm
Copy link
Member

hannesm commented Oct 15, 2019

@swuecho thanks for your comment. Indeed, OCaml 4.08.0 had a bug that made nocrypto incompilable with it. You can use the patch-release 4.08.1, an older release (4.07.1), or a current release (4.09.0) -- all these releases work fine with nocrypto (0.5.4-1).

@swuecho
Copy link

swuecho commented Oct 15, 2019

thanks. switch to 4.08.1 and works grest.

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

3 participants