You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
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.
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.
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:
init-compilerrequires it to be added totoolchainssupported list. Otherwise, as it is not relocatable, it will suffer the same problem as the compiler.init-*.pkguse 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 asopamwould do. The semantic of%{prefix}is not really clear for me in this context. I'm not confident it has one.%{pkg:init-compiler:share}in theinit-*.pkglock files, we are able to build it to a findable path. However, when doing the variable expansion in other*.pkgfiles (which updates thePATHaccordingly), it is not using the path within toolchains but the one within the_builddirectory. I'm writing a test to reproduce this error.ocaml-variantspackage (after buildinginit-*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 aconfigurebut it can't be executed.I have been discussing with @rgrinberg on how to make Dune Package Management worked with
OxCamland 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.