ocaml-cross/opam-cross-windows

cmdliner seems broken

Closed this issue · 6 comments

pirbo commented

On my machine opam install cmdliner-windows -vvv does
[...]

[cmdliner-windows: ocaml] Command started
+ ocamlfind "-toolchain" "windows" "remove" "uutf" (CWD=/home/pirbo/.opam)
+ ocaml "pkg/git.ml" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- File "pkg/topkg-ext.ml", line 42, characters 12-25:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
[cmdliner-windows: env ocaml] Command started
+ env "OCAMLFIND_TOOLCHAIN=windows" "ocaml" "pkg/build.ml" "native=true" "native-dynlink=true" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- /home/pirbo/.opam/4.02.3/bin/ocamldep.opt -modules src/cmdliner.ml > src/cmdliner.ml.depends
- /home/pirbo/.opam/4.02.3/bin/ocamldep.opt -modules src/cmdliner.mli > src/cmdliner.mli.depends
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmi src/cmdliner.mli
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmx src/cmdliner.ml
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -a src/cmdliner.cmx -o src/cmdliner.cmxa
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmo src/cmdliner.ml
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -a src/cmdliner.cmo -o src/cmdliner.cma
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -shared src/cmdliner.cmx -o src/cmdliner.cmxs
[cmdliner-windows: opam-installer cmdliner.install] Command started
+ opam-installer "--prefix=/home/pirbo/.opam/4.02.3/windows-sysroot" "cmdliner.install" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- Creating directory /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner
- _build/pkg/META                  => /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner/META

[...]

(Note the direct use of /home/pirbo/.opam/4.02.3/bin/ocaml* instead of using ocamlfind)
Therefore, the compilation of uutf (that I'm currently packaging) fails when cmdliner-windows is installed with

- + ocamlfind ocamlopt -linkpkg unix.cmxa -package cmdliner src/uutf.cmx test/utftrip.cmx -o test/utftrip.native
- File "_none_", line 1:
- Error: Files /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner/cmdliner.cmxa
-        and /home/pirbo/.opam/4.02.3/windows-sysroot/lib/ocaml/stdlib.cmxa
-        make inconsistent assumptions over implementation Printexc
- Command exited with code 2.

cc @hcarty who added it

Did you ever resolve this?

Sorry for not responding sooner. I haven't had this issue - what are the steps to reproduce?

I found the issue... I had a local definition of cmdliner with a build fix. PR coming, along with a handful of other packages + fixes that I've been trying to find time to properly upstream.

Sorry it took me so long to find this.

See #20 - one of the commits in the PR fixes the cmdliner issue.