compilation error
Hi,
Getting an error trying to compile the code. Am on MacOS Mavericks with OCAML 4.01.0 and find lib 1.4. The output of make is pasted below.
Thanks in advance, Devasis
$ make cd lib/dcg && make ocamlc -c msg.ml ocamlopt -c msg.ml ocamlc -c dcg.ml ocamlopt -c dcg.ml ocamlc -c matcher.ml ocamlopt -c matcher.ml ocamlc -a -o dcg.cma msg.cmo dcg.cmo matcher.cmo ocamlopt -a -o dcg.cmxa msg.cmx dcg.cmx matcher.cmx ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_dcg.ml echo
cd lib/ipp && make ocamlc -c ipp.ml ocamlopt -c ipp.ml ocamlc -c printer.ml ocamlopt -c printer.ml ocamlc -a -o ipp.cma ipp.cmo printer.cmo ocamlopt -a -o ipp.cmxa ipp.cmx printer.cmx ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_ipp.ml echo
ocamlfind ocamlc -pp "camlp4o -I lib/dcg -I lib/ipp pa_dcg.cmo pa_ipp.cmo" -w usy -thread -I lib -I lib/dcg -I lib/ipp -c semantics.ml File "semantics.ml", line 212, characters 2-102: Error: The method `reset_modif' has multiple definitions in this object make: *** [semantics.cmo] Error 2 $
Comments (5)
-
reporter -
repo owner Hi,
thanks for the feedback. The error is only returned since OCaml 4.01, and I use OCaml 4.00.1 so far. I have pushed a new version that should be OK. Tell me.
-
reporter Thanks - that worked!
-
Hello.
Compilation problem is exist on Ubuntu 16.04. Could you help with it.
File pa_dcg.cmo exist.
ls lib/dcg/pa_dcg.*
lib/dcg/pa_dcg.cmi lib/dcg/pa_dcg.cmo lib/dcg/pa_dcg.mlmake[1]: Leaving directory '/home/seluser/study/squall2sparql/lib' cd lib/dcg && make make[1]: Entering directory '/home/seluser/study/squall2sparql/lib/dcg' ocamlc -I .. -c msg.ml ocamlopt -I .. -c msg.ml ocamlc -I .. -c dcg.ml ocamlopt -I .. -c dcg.ml ocamlc -I .. -c matcher.ml ocamlopt -I .. -c matcher.ml ocamlc -I .. -a -o dcg.cma msg.cmo dcg.cmo matcher.cmo ocamlopt -I .. -a -o dcg.cmxa msg.cmx dcg.cmx matcher.cmx ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_dcg.ml echo make[1]: Leaving directory '/home/seluser/study/squall2sparql/lib/dcg' cd lib/ipp && make make[1]: Entering directory '/home/seluser/study/squall2sparql/lib/ipp' ocamlc -c ipp.ml ocamlopt -c ipp.ml ocamlc -c printer.ml ocamlopt -c printer.ml ocamlc -a -o ipp.cma ipp.cmo printer.cmo ocamlopt -a -o ipp.cmxa ipp.cmx printer.cmx ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_ipp.ml echo make[1]: Leaving directory '/home/seluser/study/squall2sparql/lib/ipp' ocamlfind ocamlc -pp "camlp4o -I ../lib/dcg -I ../lib/ipp pa_dcg.cmo pa_ipp.cmo" -w usy -thread -I ../lib -I ../lib/dcg -I ../lib/ipp -c semantics.ml Camlp4: Uncaught exception: DynLoader.Error ("pa_dcg.cmo", "file not found in path") File "semantics.ml", line 1, characters 0-1: Error: Preprocessor error makefile:41: recipe for target 'semantics.cmo' failed make: *** [semantics.cmo] Error 2
And problem with cygwin on windows 10.
[ERROR] The compilation of ocaml-base-compiler failed at "/home/qz/.opam/3.12.1/.opam-switch/build/ocaml-base-compiler.3.12.1/./configure -prefix /home/qz/.opam/3.12.1". #=== ERROR while compiling ocaml-base-compiler.3.12.1 =========================# # context 2.0.4 | cygwin/x86_64 | | https://opam.ocaml.org#8c89732f # path ~/.opam/3.12.1/.opam-switch/build/ocaml-base-compiler.3.12.1 # command ~/.opam/3.12.1/.opam-switch/build/ocaml-base-compiler.3.12.1/./configure -prefix /home/qz/.opam/3.12.1 # exit-code 2 # env-file ~/.opam/log/ocaml-base-compiler-20346-05296d.env # output-file ~/.opam/log/ocaml-base-compiler-20346-05296d.out ### output ### # [...] # /bin/universe = # /usr/bin/arch -k = # /bin/arch = x86_64 # /usr/bin/oslevel = # /usr/convex/getsysinfo = # # UNAME_MACHINE = x86_64 # UNAME_RELEASE = 3.1.4(0.340/5/3) # UNAME_SYSTEM = CYGWIN_NT-10.0 # UNAME_VERSION = 2020-02-19 08:49 # Cannot guess host type # You must specify one with the -host option <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> ┌─ The following actions failed │ λ build ocaml-base-compiler 3.12.1 └─ ┌─ The following changes have been performed (the rest was aborted) │ ∗ install base-bigarray base │ ∗ install base-threads base │ ∗ install base-unix base └─ Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] y
-
In Ubuntu problem was in variable
LIB_DIR
in makefile. It should be set ./lib not ../lib. - Log in to comment
One more thing: the first line in the makefile should read OCAMLFIND=<path-to-you-copy-of-ocamlfind>
I have it set as follows OCAMLFIND =ocamlfind
Currently, it points to the binary in a personal directory.