我正在尝试安装tcoq,但出现以下错误:
"/Users/pinocchio/.opam/4.05.0/bin/ocamlfind" ocamlc -rectypes -w -3-52-56 -c grammar/compat5.ml
OCAMLC -c -pp grammar/gramCompat.mlp
>> Fatal error: OCaml and preprocessor have incompatible versions
Fatal error: exception Misc.Fatal_error
make[1]: *** [grammar/gramCompat.cmo] Error 2
make: *** [submake] Error 2
有人知道吗:
- 错误是什么意思?
- 如何解决?
我在网上看到相关帖子:
https://coq-club.inria.narkive.com/h4i0KOH0/problem-compiling-coq
但这并不是很有帮助。我做了:
ocaml -I +camlp5
正如他们所建议的那样,它似乎工作正常......
我确实这样做make clean
了,但这没有帮助。
我刚刚意识到我跳过了安装的第 3 步,但如果它与问题相关或者我想用它做什么,我会知道:
3- The uncompression and un-tarring of the distribution file gave birth
to a directory named "coq-8.xx". You can rename this directory and put
it wherever you want. Just keep in mind that you will need some spare
space during the compilation (reckon on about 300 Mb of disk space
for the whole system in native-code compilation). Once installed, the
binaries take about 30 Mb, and the library about 200 Mb.
我正在尝试安装游戏手柄,并且需要按照说明进行操作。特别是我运行了以下 3 个命令:
opam switch 4.05.0
opam install camlp4
opam install ocamlfind
最新错误:
make
/Library/Developer/CommandLineTools/usr/bin/make --warn-undefined-variable --no-builtin-rules -f Makefile.build
OCAMLC -c -pp grammar/gramCompat.mlp
>> Fatal error: OCaml and preprocessor have incompatible versions
Fatal error: exception Misc.Fatal_error
make[1]: *** [grammar/gramCompat.cmo] Error 2
make: *** [submake] Error 2
在阅读了那个错误之后,我奇迹般地想到打印两个ocaml
和的版本camlp5
:
$ camlp5 -v
Camlp5 version 7.07 (ocaml 4.07.0)
和:
ocaml
OCaml version 4.05.0
很明显那是错误的,所以也许第一步是修复camlp5
工作,4.05.0
因为那是我需要的。
我尝试卸载camlp5
但它拒绝了!
brew uninstall camlp5
Error: Refusing to uninstall /usr/local/Cellar/camlp5/7.07
because it is required by coq, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies camlp5