OPAM is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
let rec test x =
test x
➜ ocaml-tutorial opam install utop
The following actions will be performed:
∗ install cppo 1.1.2 [required by utop]
∗ install utop 1.17
===== ∗ 2 =====
Do you want to continue ? [Y/n] Y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[cppo] Archive in cache
[utop] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ERROR] The compilation of cppo failed at "make".
Processing 1/2: [cppo: ocamlfind remove]
#=== ERROR while installing cppo.1.1.2 ========================================#
# opam-version 1.2.2
# os darwin
# command make
# path /Users/paul/.opam/system/build/cppo.1.1.2
# compiler system (4.03.0)
# exit-code 2
# env-file /Users/paul/.opam/system/build/cppo.1.1.2/cppo-20245-e7966f.env
# stdout-file /Users/paul/.opam/system/build/cppo.1.1.2/cppo-20245-e7966f.out
# stderr-file /Users/paul/.opam/system/build/cppo.1.1.2/cppo-20245-e7966f.err
### stdout ###
# [...]
# ocamlyacc cppo_parser.mly
# ocamllex cppo_lexer.mll
# 368 states, 13139 transitions, table size 54764 bytes
# 3729 additional bytes used for bindings
# ocamlopt -o cppo -dtypes unix.cmxa str.cmxa cppo_version.ml cppo_types.ml cppo_parser.mli cppo_parser.ml cppo_lexer.ml cppo_command.ml cppo_eval.ml cppo_main.ml
# cd ocamlbuild_plugin && ocamlbuild -use-ocamlfind ocamlbuild_cppo.cma ocamlbuild_cppo.cmxa ocamlbuild_cppo.a ocamlbuild_cppo.cmxs
# ocamlfind ocamldep -package ocamlbuild -modules ocamlbuild_cppo.mli > ocamlbuild_cppo.mli.depends
# + ocamlfind ocamldep -package ocamlbuild -modules ocamlbuild_cppo.mli > ocamlbuild_cppo.mli.depends
# ocamlfind: Package `ocamlbuild' not found
# Command exited with code 2.
### stderr ###
# make: *** [ocamlbuild] Error 10
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
The following actions were aborted
∗ install utop 1.17
The following actions failed
∗ install cppo 1.1.2
No changes have been performed
(very new to ocaml, but pretty frustrated) Hey guys, I'm trying to run a simple ocaml file through docker. I'm super confused why this is seemingly so complicated. I've tried
FROM ocaml/opam2:latest
RUN opam depext -i core ssl tls cohttp-lwt cohttp-lwt-unix
COPY test_smoke.ml ./
RUN ocamlc -o test_smoke test_smoke.ml && ./test_smoke
but there is no ocamlc in the image? This was surprising to me. What' would be the equivalent of e.g.
FROM rust:latest
COPY . .
RUN cargo run
for rust
intended to be used from within cygwin