janestreet/sexplib

Compilation broken on Windows

murmour opened this issue · 10 comments

This is what I get when doing opam install sexplib with the official installer:

#=== ERROR while installing sexplib.113.33.03 =================================#
# opam-version 1.2.2
# os           cygwin
# command      make
# path         /home/mrm/.opam/system/build/sexplib.113.33.03
# compiler     system (4.02.3)
# exit-code    2
# env-file     /home/mrm/.opam/system/build/sexplib.113.33.03/sexplib-2312-d2d111.env
# stdout-file  /home/mrm/.opam/system/build/sexplib.113.33.03/sexplib-2312-d2d111.out
# stderr-file  /home/mrm/.opam/system/build/sexplib.113.33.03/sexplib-2312-d2d111.err
### stdout ###
# [...]
# Create documentations: ............................... true
# Compile tests executable and library and run them: ... false
# pkg_bigarray: ........................................ C:/OCaml/lib
# pkg_num: ............................................. C:/wodi32/home/mrm/.opam/system/lib/num
# pkg_unix: ............................................ C:/OCaml/lib
#
# ./setup.exe -build
# mkdir 'C:\wodi32\home\mrm\.opam\system\build\sexplib.113.33.03\_build'
# Plugin tag "", line 1, characters 0-1:
# Lexing error: Not a valid parametrized tag.
### stderr ###
# W: Cannot find source file matching module 'sexplib_unix' in library sexplib_unix
# W: Cannot find source file matching module 'sexplib_num' in library sexplib_num
# W: Cannot find source file matching module 'sexplib' in library sexplib
# E: Failure("Command 'C:\\OCaml\\bin\\ocamlbuild.EXE -classic-display -no-log -no-links -install-lib-dir C:\\OCaml\\lib\\ocamlbuild -byte-plugin src/sexplib.cma src/sexplib.cmxa src/sexplib.a src/sexplib.cmxs num/lib/sexplib_num.cma num/lib/sexplib_num.cmxa num/lib/sexplib_num.a num/lib/sexplib_num.cmxs unix/lib/sexplib_unix.cma unix/lib/sexplib_unix.cmxa unix/lib/sexplib_unix.a unix/lib/sexplib_unix.cmxs -use-ocamlfind -plugin-tags 'package(js-build-tools.ocamlbuild_goodies)' -tag debug' terminated with error code 8")
# make: *** [Makefile:15: build] Error 1

I had to pin sexplib.113.00.00, which has no build issues.

What opam-repository are you using?

Good question:

$ opam repository
   0 [http]     default     https://opam.ocaml.org

Surprise! Shouldn't it be https://github.com/fdopen/opam-repository-mingw? It could be that I accidentally messed up some of the OPAM settings.

Hm. Isn't that a repository for OCaml 4.03? The official installer doesn't seem to be using it yet.

That wodi32 in the log above is misleading -- I have named the Cygwin folder that way for historical/compatibility purposes.

I don't know much about the status of opam on Windows, but I'm pretty sure that https://opam.ocaml.org is not suitable for Windows atm. The error in the log seems to indicate that it's not the right version of ocamlbuild

Most packages from the official repository work just fine -- I use dozens of them. But alright -- it's high time updating to 4.03 (although I'm one of those boring people who hate spending effort on software updates). I'll try that unofficial mingw repository and post the results here.

The error in the log seems to indicate that it's not the right version of ocamlbuild

Shouldn't then the OPAM package contain a dependency on a particular version of either OCamlbuild or OCaml?

It does AFAIK

hhugo commented

This is likely solved by the switch to jbuilder.

hhugo commented

reopen if needed.