OCamlPro / ocplib-endian

Optimised functions to read and write int16/32/64 from strings, bytes and bigarrays, based on primitives added in version 4.01.
Other
14 stars 22 forks source link

Build failure in MinGW OCaml #7

Open camlspotter opened 9 years ago

camlspotter commented 9 years ago

ocaml setup.ml -build fails in MinGW. I have no knowledge of ocamlbuild but it seems it fails around *.cppo.ml* name resolution:

$ ocaml setup.ml -build
File "setup.ml", line 213, characters 8-26:
Warning 3: deprecated: String.set
Use Bytes.set instead.
File "setup.ml", line 1788, characters 6-24:
Warning 3: deprecated: Lazy.lazy_from_fun
Use Lazy.from_fun instead.
W: Cannot find source file matching module 'EndianBigstring' in library bigstring
W: Cannot find source file matching module 'EndianBigstring' in library bigstring
W: Cannot find source file matching module 'EndianString' in library ocplib_endian
W: Cannot find source file matching module 'EndianBytes' in library ocplib_endian
W: Cannot find source file matching module 'EndianString' in library ocplib_endian
W: Cannot find source file matching module 'EndianBytes' in library ocplib_endian
mkdir 'C:\cygwin\home\1357521\ocplib-endian.0.8\ocplib-endian\_build'
''C:/ocamlmgw64/bin/ocamlc.opt unix.cma -I 'C:/ocamlmgw64/lib\ocamlbuild' 'C:/ocamlmgw64/lib\ocamlbuild/ocamlbuildlib.cma' myocamlbuild.ml 'C:/ocamlmgw64/lib\ocamlbuild/ocamlbuild.cmo' -o myocamlbuild.exe
mkdir src
Solver failed:
  Ocamlbuild knows of no rules that apply to a target named src/ocplib_endian.cppo.mly. This can happen if you ask Ocamlbuild to build a target with the wrong extension (e.g. .opt instead of .native) or if the source files live in directories that have not been specified as include directories.
Backtrace:
  - Failed to build the target src/ocplib_endian.cma
      - Building src/ocplib_endian.cma:
          - Failed to build all of these:
              - Building src/ocplib_endian.cmo:
                  - Failed to build all of these:
                      - Building src/ocplib_endian.ml:
                          - Failed to build all of these:
                              - Building src/ocplib_endian.cppo.ml:
                                  - Failed to build all of these:
                                      - Building src/ocplib_endian.cppo.mly
                                      - Building src/ocplib_endian.cppo.mll
                              - Building src/ocplib_endian.mly
                              - Building src/ocplib_endian.mll
                      - Building src/ocplib_endian.mli:
                          - Failed to build all of these:
                              - Building src/ocplib_endian.cppo.mli
                              - Building src/ocplib_endian.mly
                      - Building src/ocplib_endian.mlpack
                      - Building src/ocplib_endian.mli:
                          - Failed to build all of these:
                              - Building src/ocplib_endian.cppo.mli:
                                  - Building src/ocplib_endian.cppo.mly
                              - Building src/ocplib_endian.mly
              - Failed to build all of these:
                  - Building EndianString.cmo:
                      - Failed to build all of these:
                          - Building EndianString.ml:
                              - Failed to build all of these:
                                  - Building EndianString.cppo.ml:
                                      - Failed to build all of these:
                                          - Building EndianString.cppo.mly
                                          - Building EndianString.cppo.mll
                                  - Building EndianString.cppo.ml:
                                      - Failed to build all of these:
                                          - Building EndianString.cppo.mly
                                          - Building EndianString.cppo.mll
                                  - Building EndianString.mly
                                  - Building EndianString.mll
                          - Building EndianString.mli:
                              - Failed to build all of these:
                                  - Building EndianString.cppo.mli
                                  - Building EndianString.cppo.mli
                                  - Building EndianString.mly
                          - Building EndianString.mlpack
                          - Building EndianString.mli:
                              - Failed to build all of these:
                                  - Building EndianString.cppo.mli:
                                      - Building EndianString.cppo.mly
                                  - Building EndianString.cppo.mli:
                                      - Building EndianString.cppo.mly
                                  - Building EndianString.mly
                  - Building endianString.cmo:
                      - Failed to build all of these:
                          - Building endianString.ml:
                              - Failed to build all of these:
                                  - Building endianString.cppo.ml:
                                      - Failed to build all of these:
                                          - Building endianString.cppo.mly
                                          - Building endianString.cppo.mll
                                  - Building endianString.cppo.ml:
                                      - Failed to build all of these:
                                          - Building endianString.cppo.mly
                                          - Building endianString.cppo.mll
                                  - Building endianString.mly
                                  - Building endianString.mll
                          - Building endianString.mli:
                              - Failed to build all of these:
                                  - Building endianString.cppo.mli
                                  - Building endianString.cppo.mli
                                  - Building endianString.mly
                          - Building endianString.mlpack
                          - Building endianString.mli:
                              - Failed to build all of these:
                                  - Building endianString.cppo.mli:
                                      - Building endianString.cppo.mly
                                  - Building endianString.cppo.mli:
                                      - Building endianString.cppo.mly
                                  - Building endianString.mly
                  - Building src/EndianString.cmo:
                      - Failed to build all of these:
                          - Building src/EndianString.ml:
                              - Failed to build all of these:
                                  - Building src/EndianString.cppo.ml:
                                      - Failed to build all of these:
                                          - Building src/EndianString.cppo.mly
                                          - Building src/EndianString.cppo.mll
                                  - Building src/EndianString.mly
                                  - Building src/EndianString.mll
                          - Building src/EndianString.mli:
                              - Failed to build all of these:
                                  - Building src/EndianString.cppo.mli
                                  - Building src/EndianString.mly
                          - Building src/EndianString.mlpack
                          - Building src/EndianString.mli:
                              - Failed to build all of these:
                                  - Building src/EndianString.cppo.mli:
                                      - Building src/EndianString.cppo.mly
                                  - Building src/EndianString.mly
                  - Building src/endianString.cmo:
                      - Failed to build all of these:
                          - Building src/endianString.ml:
                              - Failed to build all of these:
                                  - Building src/
                                  - Building src/endianString.mly
                                  - Building src/endianString.mll
                          - Building src/endianString.mli:
                              - Failed to build all of these:
                                  - Building src/
                                  - Building src/endianString.mly
                          - Building src/endianString.mlpack
                          - Building src/endianString.mli:
                              - Failed to build all of these:
                                  - Building src/
                                  - Building src/endianString.mly
E: Failure("Command 'C:\\ocamlmgw64\\bin\\ocamlbuild.EXE -classic-display -no-log -no-links -install-lib-dir C:/ocamlmgw64/lib\\ocamlbuild -byte-plugin src/ocplib_endian.cma src/ocplib_endian.cmxs src/ocplib_endian.cmxa src/ocplib_endian.a src/bigstring.cma src/bigstring.cmxs src/bigstring.cmxa src/bigstring.a -tag debug' terminated with error code 6")
chambart commented 9 years ago

I won't be able to test any change myself, I have no installed windows right now. Could you try to produce an 'strace' or windows equivalent to see if there are some non-portable command executed. It may also be linked with capitalization, could you try to capitalize some files to see if it changes anythiing ?

djs55 commented 8 years ago

I suspect this patch fixes it: https://github.com/fdopen/opam-repository-mingw/blob/master/packages/ocplib-endian/ocplib-endian.0.8/files/ocplib-endian-0.8.patch

avsm commented 5 years ago

I'm pretty sure this will be fixed by #14, but need to add an Appveyor test into the matrix