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

mtime-windows fails to build with latest ocamlbuild #22

Open
hcarty opened this issue Jan 18, 2017 · 3 comments
Open

mtime-windows fails to build with latest ocamlbuild #22

hcarty opened this issue Jan 18, 2017 · 3 comments
Labels

Comments

@hcarty
Copy link
Collaborator

hcarty commented Jan 18, 2017

If I use the suggested ocamlbuild pin (ocamlbuild's latest master) the mtime-windows build fails for me. Same failure pinning to 0.10.0. However if I pin to https://github.com/ocaml/ocamlbuild.git#90902a0617cee5c95c41e63d012475ce03b04689 explicitly then the build works fine. Seems to be some issue with cmxs creation and the C stubs.

That commit is the one adding -toolchain support to ocamlbuild.

Output from a failed compilation:

$ opam install mtime-windows
The following actions will be performed:
  ∗  install mtime-windows 0.8.3

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of mtime-windows failed at "env OCAMLFIND_TOOLCHAIN=windows ocaml pkg/build.ml native=true native-dynlink=true jsoo=false".
Processing  1/1: [mtime-windows: ocamlfind windows]
#=== ERROR while installing mtime-windows.0.8.3 ===============================#
# opam-version 1.2.2
# os           darwin
# command      env OCAMLFIND_TOOLCHAIN=windows ocaml pkg/build.ml native=true native-dynlink=true jsoo=false
# path         /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3
# compiler     4.04.0
# exit-code    10
# env-file     /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.env
# stdout-file  /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.out
# stderr-file  /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.err
### stdout ###
# [...]
# ocamlfind ocamlopt -c -g -bin-annot -safe-string -I src-os -o src-os/mtime.cmx src-os/mtime.ml
# ocamlfind ocamlopt -a -cclib -lmtime_stubs src-os/mtime_base.cmx src-os/mtime.cmx -o src-os/mtime.cmxa
# ocamlfind ocamlc -c -g -bin-annot -safe-string -I src-os -o src-os/mtime.cmo src-os/mtime.ml
# ocamlfind ocamlc -a -dllib -lmtime_stubs src-os/mtime_base.cmo src-os/mtime.cmo -o src-os/mtime.cma
# ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# + ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# ** Fatal error: Cannot find file "libmtime_stubs"
# File "caml_startup", line 1:
# Error: Error during linking
# Command exited with code 2.



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions failed
  ∗  install mtime-windows 0.8.3
No changes have been performed
@hcarty
Copy link
Collaborator Author

hcarty commented Jan 18, 2017

I can submit a PR updating the README to specify this new pin if you think that's the right approach but I'm not sure if that would cause other issues.

@whitequark
Copy link
Member

This seems wrong. What exactly is the issue here?

@hcarty
Copy link
Collaborator Author

hcarty commented Jan 18, 2017

I think the flags passed to ocamlopt for the cmxs build are incorrect but I don't know enough about how a cmxs is supposed to be built to know the exact issue. If I get time to look into it more I'll comment here.

@whitequark whitequark added the bug label Dec 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants