Skip to content

[pkg] Build OxCaml with Dune package management #11652

Description

@maiste

This issue will serve as a meta issue to describe the changes required to build OxCaml with Dune package management.

Currently, I have trying to build it using @gridbugs small repository, hello-oxcaml. The locking happens correctly, but the build encounters various errors:

  1. Building the init-compiler requires it to be added to toolchains supported list. Otherwise, as it is not relocatable, it will suffer the same problem as the compiler.
  2. The init-*.pkg use the %{prefix} variable, which is causing a problem with Dune Package Management because it points to the _build/.sanbox/... path. We extend the path with the dependencies instead of having a global state as opam would do. The semantic of %{prefix} is not really clear for me in this context. I'm not confident it has one.
  3. If we change the path using %{pkg:init-compiler:share} in the init-*.pkg lock files, we are able to build it to a findable path. However, when doing the variable expansion in other *.pkg files (which updates the PATH accordingly), it is not using the path within toolchains but the one within the _build directory. I'm writing a test to reproduce this error.
  4. In the final stage, when building the ocaml-variants package (after building init-* packages), it fails because of the problem discovered in dune-pkg: Local commands (ie ./configure) should be picked up from the sandbox rather than the source #11514. Indeed, (run autoconf) generates a configure but it can't be executed.

I have been discussing with @rgrinberg on how to make Dune Package Management worked with OxCaml and more broadly on how to generalize it to support non-relocatable packages.

I'll update the issue to point to the various resources and changes.

Metadata

Metadata

Labels

acknowledgedoxcamlRelated to the support to OxCaml functionnalitiespackage managementDune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions