[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#827518: ocaml: missing dependency on libncurses-dev



On 2016-12-26 10:13, Mehdi Dogguy wrote:
Hi,

Thank you for your bugreport and apologies for not getting back to you
sooner.

On 17/06/2016 12:07, whitequark wrote:
Source: ocaml
Severity: normal

Dear Maintainer,

The ocaml package, as well as its sister packages ocaml-nox, ocaml-base and ocaml-base-nox, are missing a dependency on libncurses-dev. This is apparent when trying to build a bytecode executable with an embedded custom runtime:

  $ touch t.ml
  $ ocamlc t.ml -custom
  /usr/bin/ld: cannot find -lcurses
  collect2: error: ld returned 1 exit status
  File "t.ml", line 1:
  Error: Error while building custom runtime system

Because of this, packages that assume that they can build a custom runtime whenever they can build regular bytecode executables, which is in my opinion a fair assumption, break. A notable case where this presents a significant problem is when the OPAM package manager is used with a system OCaml compiler. Many notable packages, e.g. ocamlfind and lwt, build custom runtimes, and currently the OPAM packages have to be altered to either disable that, when
possible, or else add an explicit dependency on ncurses-dev, through
the depext mechanism, which integrates OPAM with APT.


I acknowledge the problem. IIUI, the fix you're looking for is to move the dependency on libncurses5-dev from ocaml-nox to ocaml-base-nox. But this raises
another question, why ocaml-base-nox is used to compile packages. Its
description contains the following bits:

 This package contains only the runtime system needed to run bytecode
 executables that do not use the graphics library. The 'ocaml' package
 contains the full development suite of Objective Caml.

while ocaml-nox's description has:

 This package contains everything needed to develop OCaml applications
 that do not require the graphics library.

So, if you are trying to build ocaml binaries, ocaml-nox should be preferred
over ocaml-base-nox.

Assuming ocaml-nox does have the dependency on libncurses5-dev the bug report can be closed. My initial message implies that I have tried installing ocaml-nox. However so much time has passed that I do not remember anything about the context,
and thus you have exactly as much information as I do at this point.

--
whitequark


Reply to: