Hello, I’m having a weird error here. I made a little project using Opium and worked on it last week. I’m using jbuilder for the build system. I had the following on my jbuild file:
(jbuild_version 1)
(library (
(name lib)
(libraries (opium.unix))))
and all was fine and well. But today I tried to compile it again, and it complains about missing opium.unix
library, eventhough I have opium
installed:
$ opam list --installed-root
# Installed packages for 4.04.2-opium:
base-bigarray base Bigarray library distributed with the OCaml compiler
base-threads base Threads library distributed with the OCaml compiler
base-unix base Unix library distributed with the OCaml compiler
core v0.9.1 Industrial strength alternative to OCaml's standard library
ocp-indent 1.6.0 A simple tool to indent OCaml programs
opium 0.16.0 Sinatra like web toolkit based on Lwt + Cohttp
ounit 2.0.0 Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks
utop 2.0.1 Universal toplevel for OCaml
$ make build
jbuilder build @install
Error: External library "opium.unix" not found.
-> required by "lib/jbuild (context default)"
Hint: try: jbuilder external-lib-deps --missing @install
make: *** [build] Error 1
$ jbuilder external-lib-deps --missing @install
Error: The following libraries are missing in the default context:
- opium.unix
Hint: try: opam install opium
For the sake of trying, I changed the definition in the previous jbuild
to use opium
instead of opium.unix
, and the compilation succeeds! Which I find weird because in Opium’s readme, it tells me to use opium.unix
.
One change that I remember making was upgrading versions of packages, notably jbuilder from 1.0+beta10
to 1.0+beta11
. What could possibly cause this error?