Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install files for alternative ocamlfind toolchains are not installed. #4204

Open
rizo opened this issue May 22, 2020 · 2 comments
Open

Install files for alternative ocamlfind toolchains are not installed. #4204

rizo opened this issue May 22, 2020 · 2 comments

Comments

@rizo
Copy link

rizo commented May 22, 2020

I'm running into a cross-compilation related issue with opam and dune.

Currently dune has a pretty good support for cross-compilation via findlib toolchains. It correctly separates compilation artefacts for different targets. When a findlib toolchain is used with -x TOOLCHAIN, dune, in addition to producing a PKG.intsall file for the default context, will also produce a PKG-TOOLCAHIN.install file. This works perfectly!

But, the problem is that opam doesn't know about these -TOOLCHAIN.install files and only looks for PKG.install files.

Is there a way to instruct opam install to look for additional install files described above? I'm looking for a solution that does not require changes to the original package.

Might be related to: #2476.

@rizo rizo changed the title OCamlfind toolchain install files produced by dune are not installed. Install files for alternative ocamlfind toolchains are not installed. May 22, 2020
@rjbou
Copy link
Collaborator

rjbou commented May 26, 2020

On install, opam only check for pkg.install file, and there is no way to specify another filename. The only one is to change the opam file (of called command) to move/copy of the generated install file.

Why and what are the generated pkg-toolchain.install files?

@rizo
Copy link
Author

rizo commented May 26, 2020

The pkg-toolchain.install files are generated by dune for cross-compiled targets. See ocaml/dune/.../test-cases/cross-compilation/run.t for a short example of that in practice.

The files listed in pkg-toolchain.install are typically installed in ~/.opam/$switch/$toolchain-sysroot.

In short, if pkg-toolchain.install were installed, package cross-compilation with opam would be much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants