alavrik / piqi

Piqi – universal schema language: JSON, XML, Protocol Buffers data validation and conversion
http://piqi.org
Apache License 2.0
246 stars 36 forks source link

Error: "ulexing.cmx is not a compilation unit description." #58

Closed mars0i closed 6 years ago

mars0i commented 6 years ago

With OCaml 4.06.1 I'm getting

File "piq_lexer.ml", line 1:
Error: /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/ulex/ulexing.cmx
is not a compilation unit description.

I looked at piq_lexer.ml, but I don't understand where this error is coming from or why. Here'sconfigure`'s output:

~/docs/src/ml/piqi(master)$ ./configure
found ocamlfind: /Users/marshall/.opam/4.06.1/bin/ocamlfind
detected macosx OCaml toolchain
checking whether necessary dependencies are already installed...
xmlm is installed in /Users/marshall/.opam/4.06.1/lib/xmlm
ulex is installed in /Users/marshall/.opam/4.06.1/lib/ulex
easy-format is installed in /Users/marshall/.opam/4.06.1/lib/easy-format
base64 is installed in /Users/marshall/.opam/4.06.1/lib/base64
ocaml version: 4.06.1
configure OK

Here is all of the output from make (minus the messages from the successful parts of the the make process):

~/docs/src/ml/piqi(master)$ make
set -e; \
    for dir in piqilib src; do \
        /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $dir ; \
    done
make[2]: `libpiqilib_stubs.a' is up to date.
ocamlfind ocamlopt -package ulex,easy-format,xmlm,base64 -c -pp "camlp4o -I /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/ulex pa_ulex.cma " piq_lexer.ml
findlib: [WARNING] Package base64 has multiple definitions in /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/base64/META, /Users/marshall/.opam/4.06.1/lib/base64/META
findlib: [WARNING] Package easy-format has multiple definitions in /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/easy-format/META, /Users/marshall/.opam/4.06.1/lib/easy-format/META
findlib: [WARNING] Package ulex has multiple definitions in /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/ulex/META, /Users/marshall/.opam/4.06.1/lib/ulex/META
File "piq_lexer.ml", line 1:
Error: /Users/marshall/docs/src/ml/piqi/build/lib/ocaml/ulex/ulexing.cmx
is not a compilation unit description.
make[2]: *** [piq_lexer.cmi] Error 2
make[2]: *** Deleting file `piq_lexer.cmi'
make[1]: *** [native-code-library] Error 2
make: *** [dirs] Error 2
alavrik commented 6 years ago

try running make distclean to cleanup the contents of the build directory, and the try again starting with ./configure

mars0i commented 6 years ago

Thanks! That fixed it.