如何配置ocamlc

时间:2017-10-30 22:05:18

标签: ocaml opam ocamlbuild

this post所示,ocaml 4.03.0编译器或更高版本默认警告31为错误。这使我无法使用命令camlidl安装opam install camidl包,因为它包含名称与stdlib.cma中名称冲突的模块。我该如何配置ocaml以便运行命令?

这是错误消息:

#=== ERROR while installing camlidl.1.05     ======================================#
# opam-version 1.2.2
# os           darwin
# command      make all
# path         /Users/xxx/.opam/system/build/camlidl.1.05
# compiler     system (4.05.0)
# exit-code    2
# env-file     /Users/xxx/.opam/system/build/camlidl.1.05/camlidl-58074-a71bb4.env
# stdout-file  /Users/xxx/.opam/system/build/camlidl.1.05/camlidl-58074-a71bb4.out
# stderr-file  /Users/xxx/.opam/system/build/camlidl.1.05/camlidl-58074-a71bb4.err
### stdout ###
# [...]
# ocamlc -g -c lexer_midl.mli
# ocamlc -g -c lexer_midl.ml
# ocamlc -g -c parse.mli
# ocamlc -g -c parse.ml
# ocamlc -g -c fixlabels.mli
# ocamlc -g -c fixlabels.ml
# ocamlc -g -c normalize.mli
# ocamlc -g -c normalize.ml
# ocamlc -g -c main.ml
# ocamlc -g -o camlidl config.cmo utils.cmo clflags.cmo prefix.cmo lexpr.cmo cvttyp.cmo variables.cmo array.cmo struct.cmo enum.cmo union.cmo cvtval.cmo structdecl.cmo enumdecl.cmo uniondecl.cmo typedef.cmo funct.cmo constdecl.cmo intf.cmo file.cmo predef.cmo linenum.cmo parse_aux.cmo parser_midl.cmo lexer_midl.cmo parse.cmo fixlabels.cmo normalize.cmo main.cmo
### stderr ###
# [...]
# File "parse_aux.ml", line 459, characters 10-26:
# Warning 3: deprecated: String.lowercase
# Use String.lowercase_ascii instead.
# 12 shift/reduce conflicts.
# File "array.cmo", line 1:
# Warning 31: files array.cmo and /usr/local/lib/ocaml/stdlib.cma(Array) both define a module named Array
# File "_none_", line 1:
# Error: Some fatal warnings were triggered (1 occurrences)
# make[1]: *** [camlidl] Error 2
# make: *** [all] Error 2

0 个答案:

没有答案