[opam-devel] A few questions debugging packages & opam

Thomas Gazagnaire thomas at gazagnaire.org
Tue Nov 3 17:38:15 GMT 2015


my opam-fu is not so much up-to-date, but I can try to answer. Louis will know better.

> 1. Are there any circumstances in which opam (re)install -b deletes the
> build directory?
> I'm fairly sure that while doing an opam reinstall which crashed (i.e. opam
> suffered an exception) during the install bit that the handler deleted the
> build directory, despite -b being specified.
> If opam really did delete the build directory in this instance, is that a
> bug? (in which case I'll add it to my ToDo list)

I think that's indeed a bug.

> 2. What's the correct set of flags to keep and obtain as much information as
> possible for debugging package building?
> -b gives me the build directory. Is the only way to get the
> .{env,info,out,err} files kept to specify --debug?

-vv will print the commands, --debug will print everything. There's no other way to control wether env,info,out,err files are kept. The log location is configurable in the API, but it is not exposed to the command-line I'm afraid.

> 3. Is there a tool or better way to view the output of each command (i.e.
> the aforementioned files) than going through the .info files to find the
> right one and then looking at the appropriate other file?

Use -vv on the command-line.

> Would it be appreciated if opam were patched to give the files a canonical
> order (i.e. so that ls displays the log files in the order they were
> executed)?

It would certainly be appreciated by me: Louis removed my hack to `tee` the build output (with good reasons), so we can have more reliable debug logs. But I still miss reliable log outputs :-)

> 4. When changing opam source files which are part of the .cmxa/.cma
> libraries (e.g. opam-core, opam-format), I'm frequently forced to do make
> clean; make all as otherwise I get "inconsistent assumption" errors over
> .cmx implementation (I'm building with 4.02.2).

I think Louis is using cop-build for day-to-day development of Opam. The Makefile is there only to help distribution. So it might be not very well tested for recompilations.


More information about the opam-devel mailing list