Open ulrikstrid opened 5 years ago
Opened PR to ocaml-nocrypto dune branch to look for CFLAGS that we need to provide endian.h for Windows.
Packaged a endian.h
"polyfill" with esy https://github.com/ulrikstrid/esy-endian
The current blocker is x509:
error: build failed with exit code: 1
build log:
# esy-build-package: building: @opam/x509@github:dune-universe/ocaml-x509:x509.opam#449eeab
# esy-build-package: pwd: C:\Users\Ulrik\.esy\3_\b\opam__s__x509-7df5c6b2
# esy-build-package: running: "dune" "build" "-p" "x509" "-j" "4"
ocamlc lib/.x509.objs/byte/x509_certificate.{cmi,cmo,cmt} (exit 2)
(cd _build/default && C:\Users\Ulrik\.esy\3_\i\ocaml-4.6.10-7ba95816\bin\ocamlc.opt.exe -w -40 -w -8 -g -bin-annot -I lib/.x509.objs/byte -I C:/Users/Ulrik/.esy/3_/i/opam__s__asn1_combinators-opam__c__0.2.0-21eab629/lib\asn1-combinators -I C:/Users/Ulrik/.esy/3_/i/opam__s__astring-opam__c__0.8.3-a4ad5155/lib\astring -I C:/Users/Ulrik/.esy/3_/i/opam__s__cstruct-8e7babb6/lib\cstruct -I C:/Users/Ulrik/.esy/3_/i/opam__s__nocrypto-b5e97ad4/lib\nocrypto -I C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\bytes -I C:/Users/Ulrik/.esy/3_/i/opam__s__ocplib_endian-opam__c__1.0-5229a6d6/lib\ocplib-endian -I C:/Users/Ulrik/.esy/3_/i/opam__s__ppx__sexp__conv-opam__c__v0.12.0-0a7e71a8/lib\ppx_sexp_conv\runtime-lib -I C:/Users/Ulrik/.esy/3_/i/opam__s__ptime-opam__c__0.8.5-7f39e28b/lib\ptime -I C:/Users/Ulrik/.esy/3_/i/opam__s__result-opam__c__1.3-1976f798/lib\result -I C:/Users/Ulrik/.esy/3_/i/opam__s__sexplib-opam__c__v0.10.0-bcf98de1/lib\sexplib -I C:/Users/Ulrik/.esy/3_/i/opam__s__sexplib-opam__c__v0.10.0-bcf98de1/lib\sexplib\0 -I C:/Users/Ulrik/.esy/3_/i/opam__s__sexplib0-opam__c__v0.12.0-255dd660/lib\sexplib0 -I C:/Users/Ulrik/.esy/3_/i/opam__s__zarith-opam__c__1.7-c0c6c5c2/lib\zarith -no-alias-deps -o lib/.x509.objs/byte/x509_certificate.cmo -c -impl lib/x509_certificate.pp.ml)
File "lib/x509_certificate.ml", line 1:
Error: The files C:/Users/Ulrik/.esy/3_/i/opam__s__sexplib-opam__c__v0.10.0-bcf98de1/lib\sexplib\sexplib__Conv.cmi
and C:/Users/Ulrik/.esy/3_/i/opam__s__ppx__sexp__conv-opam__c__v0.12.0-0a7e71a8/lib\ppx_sexp_conv\runtime-lib\ppx_sexp_conv_lib.cmi
make inconsistent assumptions over interface Sexplib0
error: command failed: "dune" "build" "-p" "x509" "-j" "4" (exited with 1)
esy-build-package: exiting with errors above...
building @opam/x509@github:dune-universe/ocaml-x509:x509.opam#449eeab
I also have some overrides that I need to upstream but that shouldn't be a huge deal as they are just taken from https://github.com/fdopen/opam-repository-mingw in most cases
With this PR we get past x509
and I'm now hitting some issues in the tls
library.
error: build failed with exit code: 1
build log:
# esy-build-package: building: @opam/tls@opam:0.10.1
# esy-build-package: pwd: C:\Users\Ulrik\proj\reason-oidc-provider\_esy\windows\store\b\opam__s__tls-opam__c__0.10.1-3e8adc64
# esy-build-package: running: "ocaml" "pkg/pkg.ml" "build" "--pinned" "false" "--tests" "false" "--with-lwt" "true" "--with-mirage" "false"
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamlopt unix.cmxa -I 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild' 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuildlib.cmxa' -linkpkg myocamlbuild.ml 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuild.cmx' -o myocamlbuild.exe
ocamlfind ocamldep -package 'cstruct nocrypto result x509 sexplib' -modules lib/tracing.mli > lib/tracing.mli.depends
+ ocamlfind ocamlc -where > 'C:\Users\Ulrik\proj\reason-oidc-provider\_esy\windows\store\b\opam__s__tls-opam__c__0.10.1-3e8adc64\_build/ocamlc.where'
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamlc -c -g -bin-annot -safe-string -package 'cstruct nocrypto result x509 sexplib' -w +A-4-9-41-42-44-45 -color always -I lib -I lwt -o lib/tracing.cmi lib/tracing.mli
+ ocamlfind ocamlc -c -g -bin-annot -safe-string -package 'cstruct nocrypto result x509 sexplib' -w +A-4-9-41-42-44-45 -color always -I lib -I lwt -o lib/tracing.cmi lib/tracing.mli
findlib: [WARNING] Package compiler-libs has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\compiler-libs\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\compiler-libs\META
findlib: [WARNING] Package dynlink has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\dynlink\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\dynlink\META
findlib: [WARNING] Package bytes has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\bytes\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\bytes\META
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package bigarray has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\bigarray\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\bigarray\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamldep -package 'cstruct nocrypto result x509 sexplib' -modules lib/tracing.ml > lib/tracing.ml.depends
ocamlfind ocamldep -package ppx_sexp_conv -package 'cstruct nocrypto result x509 sexplib' -modules lib/ciphersuite.ml > lib/ciphersuite.ml.depends
+ ocamlfind ocamldep -package ppx_sexp_conv -package 'cstruct nocrypto result x509 sexplib' -modules lib/ciphersuite.ml > lib/ciphersuite.ml.depends
'C:\Users\Ulrik\.esy\3_\i\opam__s__ppx__deriving-opam__c__4.2.1-48a75192\lib\ppx_deriving\.\ppx_deriving' is not recognized as an internal or external command,
operable program or batch file.
File "lib/ciphersuite.ml", line 1:
Error: Error while running external preprocessor
Command line: C:\Users\Ulrik\.esy\3_\i\opam__s__ppx__deriving-opam__c__4.2.1-48a75192\lib\ppx_deriving\.\ppx_deriving package:ppx_sexp_conv "C:\Users\Ulrik\AppData\Local\Temp\camlppxe2cada" "C:\Users\Ulrik\AppData\Local\Temp\camlppxdcf6bc"
Command exited with code 2.
+ ocamlfind ocamlopt unix.cmxa -I 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild' 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuildlib.cmxa' -linkpkg myocamlbuild.ml 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuild.cmx' -o myocamlbuild.exe
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
pkg.ml: [ERROR] cmd ["ocamlbuild" "-use-ocamlfind" "-classic-display" "-j" "4" "-tag" "debug"
"-build-dir" "_build" "opam" "pkg/META" "CHANGES.md" "LICENSE.md"
"README.md" "lib/tls.cmi" "lib/tls.a" "lib/tls.cmxs" "lib/tls.cmxa"
"lib/tls.cma" "lib/tls.cmx" "lwt/tls-lwt.a" "lwt/tls-lwt.cmxs"
"lwt/tls-lwt.cmxa" "lwt/tls-lwt.cma" "lwt/x509_lwt.cmx"
"lwt/x509_lwt.cmi" "lwt/x509_lwt.mli" "lwt/tls_lwt.cmx"
"lwt/tls_lwt.cmi" "lwt/tls_lwt.mli"]: exited with 10
error: command failed: "ocaml" "pkg/pkg.ml" "build" "--pinned" "false" "--tests" "false" "--with-lwt" "true" "--with-mirage" "false" (exited with 1)
esy-build-package: exiting with errors above...
building @opam/tls@opam:0.10.1
esy: exiting due to errors above
The x509 PR isn't good, I need to find a way for it to use the new Cstruct project structure instead. Might be able to rebase the dune branch on master instead
Using the latest x509 fixes the issue, forgot I set the version previously. Current error on ocaml-tls
:
error: build failed with exit code: 1
build log:
# esy-build-package: building: @opam/tls@opam:0.10.2
# esy-build-package: pwd: C:\Users\Ulrik\.esy\3_\b\opam__s__tls-opam__c__0.10.2-97fe8b86
# esy-build-package: running: "ocaml" "pkg/pkg.ml" "build" "--pinned" "false" "--tests" "false" "--with-lwt" "true" "--with-mirage" "false"
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamlopt unix.cmxa -I 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild' 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuildlib.cmxa' -linkpkg myocamlbuild.ml 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuild.cmx' -o myocamlbuild.exe
ocamlfind ocamldep -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -modules lib/tracing.mli > lib/tracing.mli.depends
+ ocamlfind ocamlc -where > 'C:\Users\Ulrik\.esy\3_\b\opam__s__tls-opam__c__0.10.2-97fe8b86\_build/ocamlc.where'
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamlc -c -g -bin-annot -safe-string -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -w +A-4-9-41-42-44-45 -color always -I lib -I lwt -o lib/tracing.cmi lib/tracing.mli
+ ocamlfind ocamlc -c -g -bin-annot -safe-string -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -w +A-4-9-41-42-44-45 -color always -I lib -I lwt -o lib/tracing.cmi lib/tracing.mli
findlib: [WARNING] Package compiler-libs has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\compiler-libs\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\compiler-libs\META
findlib: [WARNING] Package dynlink has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\dynlink\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\dynlink\META
findlib: [WARNING] Package bytes has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\bytes\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\bytes\META
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package bigarray has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\bigarray\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\bigarray\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
ocamlfind ocamldep -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -modules lib/tracing.ml > lib/tracing.ml.depends
ocamlfind ocamldep -package ppx_sexp_conv -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -modules lib/ciphersuite.ml > lib/ciphersuite.ml.depends
+ ocamlfind ocamldep -package ppx_sexp_conv -package 'cstruct cstruct-sexp nocrypto x509 sexplib' -modules lib/ciphersuite.ml > lib/ciphersuite.ml.depends
'C:\Users\Ulrik\.esy\3_\i\opam__s__ppx__deriving-opam__c__4.2.1-48a75192\lib\ppx_deriving\.\ppx_deriving' is not recognized as an internal or external command,
operable program or batch file.
File "lib/ciphersuite.ml", line 1:
Error: Error while running external preprocessor
Command line: C:\Users\Ulrik\.esy\3_\i\opam__s__ppx__deriving-opam__c__4.2.1-48a75192\lib\ppx_deriving\.\ppx_deriving package:ppx_sexp_conv "C:\Users\Ulrik\AppData\Local\Temp\camlppxeea991" "C:\Users\Ulrik\AppData\Local\Temp\camlppx867d54"
Command exited with code 2.
+ ocamlfind ocamlopt unix.cmxa -I 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild' 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuildlib.cmxa' -linkpkg myocamlbuild.ml 'C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlbuild-opam__c__0.14.0-65e48bf2/lib\ocamlbuild/ocamlbuild.cmx' -o myocamlbuild.exe
findlib: [WARNING] Package unix has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\unix\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\unix\META
findlib: [WARNING] Package threads has multiple definitions in C:/Users/Ulrik/.esy/3_/i/opam__s__ocamlfind-opam__c__1.8.0-f93382a7/lib\threads\META, C:\Users\Ulrik\.esy\3_\i\opam__s__ocamlfind-opam__c__1.8.0-f93382a7\lib\threads\META
pkg.ml: [ERROR] cmd ["ocamlbuild" "-use-ocamlfind" "-classic-display" "-j" "4" "-tag" "debug"
"-build-dir" "_build" "opam" "pkg/META" "CHANGES.md" "LICENSE.md"
"README.md" "lib/tls.cmi" "lib/tls.a" "lib/tls.cmxs" "lib/tls.cmxa"
"lib/tls.cma" "lib/tls.cmx" "lwt/tls-lwt.a" "lwt/tls-lwt.cmxs"
"lwt/tls-lwt.cmxa" "lwt/tls-lwt.cma" "lwt/x509_lwt.cmx"
"lwt/x509_lwt.cmi" "lwt/x509_lwt.mli" "lwt/tls_lwt.cmx"
"lwt/tls_lwt.cmi" "lwt/tls_lwt.mli"]: exited with 10
error: command failed: "ocaml" "pkg/pkg.ml" "build" "--pinned" "false" "--tests" "false" "--with-lwt" "true" "--with-mirage" "false" (exited with 1)
esy-build-package: exiting with errors above...
building @opam/tls@opam:0.10.2
This is a issue to track Windows support. It is larger than just this repo as when this works on Windows we have working webserver built with Reason/OCaml on Windows.
Current build tree, I'll try to keep it updated