Skip to content

Builds on ocaml 4.07.0 - #5

Closed
ismith wants to merge 3 commits into
imandra-ai:masterfrom
ismith:builds-on-ocaml-4.07.0
Closed

Builds on ocaml 4.07.0#5
ismith wants to merge 3 commits into
imandra-ai:masterfrom
ismith:builds-on-ocaml-4.07.0

Conversation

@ismith

@ismith ismith commented Jan 30, 2019

Copy link
Copy Markdown

Solves #4 without a lock file, and allows for compatibility with ocaml 4.07.0.

Does require

opam pin -y nocrypto git+https://github.com/gasche/ocaml-nocrypto.git#master-ocamlbuild-pack
opam pin -y jwt git+https://github.com/ismith/ocaml-jwt.git#rsa256-verification

@ismith

ismith commented Jan 30, 2019

Copy link
Copy Markdown
Author

Test build on ocaml 4.07.0 using Docker:

FROM ubuntu:xenial

ENV ocaml_version 4.07.0

RUN apt update; \
    apt install -y apt ocaml-nox zlib1g-dev git curl \
      make m4 unzip libgmp-dev pkg-config vim libssl-dev \
      software-properties-common; \
    apt-add-repository ppa:avsm/ppa; \
    apt update; \
    apt install -y opam

RUN opam init -a --disable-sandboxing; \
    opam switch create $ocaml_version ocaml-base-compiler.$ocaml_version; \
    eval $(opam env); \
    opam install dune

RUN opam pin -y nocrypto git+https://github.com/gasche/ocaml-nocrypto.git#master-ocamlbuild-pack
RUN opam pin -y jwt git+https://github.com/ismith/ocaml-jwt.git#rsa256-verification # rsa256-verification
RUN opam pin -y gcloud git+https://github.com/ismith/ocaml-gcloud.git#builds-on-ocaml-4.07.0

@actionshrimp

actionshrimp commented Jan 31, 2019

Copy link
Copy Markdown
Contributor

Interesting, thanks for taking a look! I had a bit of a read of the various nocrypto issue threads, and saw this:

ocaml/opam-repository#12062

So it looks like the other approach for nocrypto+ppx_sexp_conv from this PR is on opam at the minute, although the patches are applied to an older version of nocrypto without the function Nocrypto.Rsa.PKCS1.sign that the jwt fork needs.

I tried your Dockerfile with the PR version of @diml's branch that should be on the more up to date version of nocrypto, but got a built error, so happy to merge this unless you can think of another solution!

[ERROR] The compilation of nocrypto failed at "/root/.opam/4.07.0/bin/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.2 | linux/x86_64 | ocaml-base-compiler.4.07.0 | pinned(git+https://github.com/diml/ocaml-nocrypto.git#detect-ppx_sexp_conv-runtime#6252cc6e)
# path                 ~/.opam/4.07.0/.opam-switch/build/nocrypto.0.5.4-1
# command              ~/.opam/4.07.0/bin/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-6-a75bcf.env
# output-file          ~/.opam/log/nocrypto-6-a75bcf.out
### output ###
# Error: The implementation (obtained by packing)
# [...]
# 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

@ismith ismith closed this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants