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

findlib sometimes cannot be built on Windows #105

Open
JasonGross opened this issue Jul 5, 2022 · 3 comments
Open

findlib sometimes cannot be built on Windows #105

JasonGross opened this issue Jul 5, 2022 · 3 comments

Comments

@JasonGross
Copy link

I'm not sure if this is the right place to report this, but there seems to be a nondeterministic issue with the setup of OCaml/opam on Windows:

<><>Processing actions<><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ocamlfind failed at "D:\\cygwin\\bin\\make.exe opt".
-> installed conf-findutils.1
-> installed conf-gmp.4
-> installed dune.3.3.1
#===ERRORwhile compiling ocamlfind.1.9.5====================================#
#context     2.0.10 | win32/x86_64 | ocaml-variants.4.11.1+mingw64c | git+https://github.com/fdopen/opam-repository-mingw.git#opam2
#path        D:/a/fiat-crypto/fiat-crypto/_opam/.opam-switch/build/ocamlfind.1.9.5
#command     D:\cygwin\bin\make.exe opt
#exit-code   2
#env-file    D:/.opam/log/ocamlfind-1[38](https://github.com/mit-plv/fiat-crypto/runs/7199984869?check_suite_focus=true#step:14:39)4-03b1a4.env
#output-file D:/.opam/log/ocamlfind-1384-03b1a4.out
### output ###
# for p in findlib; do ( cd src/$p; /usr/bin/make opt ) || exit; done
# make[1]: Entering directory '/cygdrive/d/a/fiat-crypto/fiat-crypto/_opam/.opam-switch/build/ocamlfind.1.9.5/src/findlib'
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c findlib_config.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_split.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_metatoken.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_meta.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_metascanner.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_topo.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_package_base.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c findlib.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_args.ml
# ocamlopt -I +compiler-libs -g -opaque  -I +unix -I +dynlink -c fl_lint.ml
# ocamlopt -I +compiler-libs -g -a -o findlib.cmxa findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx fl_lint.cmx
# if [ 1 -gt 0 ]; then \
#     ocamlopt -I +compiler-libs -g -shared -o findlib.cmxs findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx fl_lint.cmx; \
# fi
# ** Fatal error: Cannot run cygpath -m findlib.cmxs
# File "caml_startup", line 1:
# Error: Error during linking (exit code 2)
# make[1]: *** [Makefile:71: findlib.cmxa] Error 2
# make[1]: Leaving directory '/cygdrive/d/a/fiat-crypto/fiat-crypto/_opam/.opam-switch/build/ocamlfind.1.9.5/src/findlib'
# make: *** [Makefile:18: opt] Error 2
<><>Error report<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build ocamlfind 1.9.5
+- 
+- The following changes have been performed (the rest was aborted)
| - install conf-findutils 1
| - install conf-gmp       4
| - install dune           3.3.1
+- 
[NOTE] Pinning command successful, but your installed packages may be out of sync.

https://github.com/mit-plv/fiat-crypto/runs/7199984869?check_suite_focus=true#step:14:68

@smorimoto
Copy link
Member

CC: @ocaml/opam-repository

@kit-ty-kate
Copy link
Member

Why pinging us? I'm not seeing any reference to cygpath in opam-repository.
I'd suggest to look into ocamlfind or opam-repository-mingw instead

@dra27 dra27 transferred this issue from ocaml/setup-ocaml Sep 1, 2022
@dra27
Copy link
Member

dra27 commented Sep 1, 2022

The issue appears to be a sporadic failure when flexlink calls cygpath (I’ve seen it before, too). It’s possibly it can be fixed by adding a retry loop to the call (as it tends to succeed on the following call)

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

No branches or pull requests

4 participants