mfp / oraft

Raft consensus algorithm implementation
Other
33 stars 5 forks source link

String.create -> Bytes.create #4

Closed vbmithr closed 10 years ago

mfp commented 10 years ago

Sorry for sitting on this for so long. I put it in my "review later" mental folder and forgot it. I believed this required some care to compile on both 4.01 and 4.02, but as it turns out the "bytes" package is already required (recursively) by tls.lwt.

mfp commented 10 years ago

BTW, I couldn't build master with 4.02 because tls fails to install (x509.0.1.0 build fails), but I did manage to compile the no-tls branch (identical except for Oraft_lwt_tls not being compiled and some code being removed from dict.ml) on 4.02, so Everything Is Fine(TM).

vbmithr commented 10 years ago

As far as I remember I managed to compile the TLS code under 4.02.0. ocamlfind takes care of the Bytes module on older OCaml version so it should be totally fine to use the Bytes module without having to worry of previous OCaml versions.

mfp commented 10 years ago

On Mon, Sep 29, 2014 at 10:24:24AM -0700, Vincent Bernardoff wrote:

As far as I remember I managed to compile the TLS code under 4.02.0. ocamlfind takes care of the Bytes module on older OCaml version so it should be totally fine to use the Bytes module without having to worry of previous OCaml versions.

Yes, no problem with that (building with 4.01 w/ no issues).

As for ocaml-tls, I just remembered you were using a pinned, unreleased ocaml-tls. The latest version available on the OPAM repos (0.1.0) fails to install w/ 4.02, but it should be a mere matter of time before there's a new release (and in the meantime, pinning does fine).

[ERROR] Due to some errors while processing x509.0.1.0, the following actions will NOT proceed:
 - install tls.0.1.0

===== ERROR while installing x509.0.1.0 =====
# opam-version 1.1.0
# os           linux
# command      ocaml setup.ml -build
# path         /home/mfp/.opam/4.02.0/build/x509.0.1.0
# compiler     4.02.0
# exit-code    1
# env-file     /home/mfp/.opam/4.02.0/build/x509.0.1.0/x509-7868-5f1023.env
# stdout-file  /home/mfp/.opam/4.02.0/build/x509.0.1.0/x509-7868-5f1023.out
# stderr-file  /home/mfp/.opam/4.02.0/build/x509.0.1.0/x509-7868-5f1023.err
### stdout ###
# ...[truncated]
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamldep -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -modules lib/list_ext.ml > lib/list_ext.ml.depends
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamldep -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -modules lib/registry.ml > lib/registry.ml.depends
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamlc -c -g -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -I lib -o lib/list_ext.cmo lib/list_ext.ml
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamlc -c -g -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -I lib -o lib/registry.cmo lib/registry.ml
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamldep -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -modules lib/certificate.mli > lib/certificate.mli.depends
# /home/mfp/.opam/4.02.0/bin/ocamlfind ocamlc -c -g -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -I lib -o lib/asn_grammars.cmo lib/asn_grammars.ml
# + /home/mfp/.opam/4.02.0/bin/ocamlfind ocamlc -c -g -package asn1-combinators -package cstruct -package nocrypto -syntax camlp4o -package sexplib.syntax -I lib -o lib/asn_grammars.cmo lib/asn_grammars.ml
# File "lib/asn_grammars.ml", line 684, characters 58-66:
# Error: Unbound type constructor RSA.priv
# Command exited with code 2.
### stderr ###
# File "setup.ml", line 247, characters 8-26:
# Warning 3: deprecated: String.set
# File "setup.ml", line 2502, characters 6-24:
# Warning 3: deprecated: Lazy.lazy_from_fun
# File "setup.ml", line 247, characters 8-26:
# Warning 3: deprecated: String.set
# File "setup.ml", line 2502, characters 6-24:
# Warning 3: deprecated: Lazy.lazy_from_fun
# E: Failure("Command ''/home/mfp/.opam/4.02.0/bin/ocamlbuild' lib/x509.cma lib/x509.cmxa lib/x509.a lib/x509.cmxs -tag debug' terminated with error code 10")

'opam install tls' failed.

Mauricio Fernández