AltGr/opam-bundle

ocaml-base-compiler = 4.06.1 is in conflict with ocaml-bootstrap

UnixJunkie opened this issue · 9 comments

Hello,

I am very interested in opam-bundle, to ship software to non ocaml users.
I tried to bundle a very simple software of mine: get_line, available in opam.

Is there a specific version of the OCaml compiler I should be using?

Here is how my trial went:

# opam switch
#  switch  compiler                    description
→  4.06.1  ocaml-base-compiler.4.06.1  4.06.1
# opam --version
2.0.0
# opam info opam-bundle

<><> opam-bundle: information on all versions <><><><><><><><><><><><><><><><><>
name                   opam-bundle
all-installed-versions 0.3 [4.06.1]
[...]
# opam-bundle get_line
No OCaml version selected, will use 4.06.1.
No environment specified, will use the following for package resolution (based
on the host system):
  - arch = "x86_64"
  - os = "linux"
  - os-distribution = "ubuntu"
  - os-version = "18.04"
  - os-family = "debian"

<><> Initialising repositories ><><><><><><><><><><><><><><><><><><><><><><><><>
[opam.ocaml.org] Initialised

<><> Resolving package set ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] No solution for get_line & ocaml-bootstrap.4.06.1: The following
        dependencies couldn't be met:
          - ocaml-bootstrap → ocaml → ocaml-config → ocaml-base-compiler →
        ocaml !=
            4.06.1
              no matching version
        Your request can't be satisfied:
          - ocaml-base-compiler = 4.06.1 is in conflict with ocaml-bootstrap

This looks like an opam message.
Should I be using a specific version of opam?

AltGr commented

It seems the new ocaml-config package makes opam-bundle choke. I'll be running some tests and push an updated version tested on the latest opam release.

AltGr commented

(as a workaround, in the meantime, a possibility would be to use the repository from before that was introduced, i.e. before commit c732ccaa from Nov. 2)

Even with an opam-repository from Nov 1, and after reinstalling all opam packages I was using, opam-bundle still give the same error.

AltGr commented

just to be sure, I probably wasn't very clear: the repository to change is the one used at opam-bundle runtime, not the one used to compile opam-bundle.

E.g. opam-bundle --repository='git+https://github.com/ocaml/opam-repository#c732ccaa'

I am making right now a new release that will work on the newer opam-repository, though, so you shouldn't have to worry about that.

I sent a PR in opam-repository for the new release: ocaml/opam-repository#13072

Thanks a lot for the new release, I could create a working opam-bundle.
The bundle was created on Linux but could install on a Mac; happy surprise.

AltGr commented

Nice to hear. opam-bundle normally resolves for the current system (you can change using cl flags), but will extract the actual OS requirements from the package informations once the bundle is resolved and print them.

I already filed a PR on friday, but yours got merged more quickly. As long as it's in there ¯_(ツ)_/¯ ... Thanks!

Your PR was also merged I think. It improved the opam file of the package.