GaloisInc / saw-script

The SAW scripting language.
BSD 3-Clause "New" or "Revised" License
442 stars 63 forks source link

Update setup-ocaml to v3 #2153

Open smorimoto opened 3 days ago

RyanGlScott commented 2 days ago

Thank you for the PR, @smorimoto! I'm assuming that the failure in the Run integration tests with coverage reporting job is unrelated, as that job doesn't use OCaml in any way.

Do you have any ideas what might be causing the opam-related build failure in this job?

The following actions will be performed:
=== install 11 packages
  ∗ conf-findutils         1      [required by coq]
  ∗ conf-gmp               4      [required by zarith]
  ∗ conf-pkg-config        3      [required by zarith]
  ∗ coq                    8.15.2
  ∗ coq-bits               1.1.0
  ∗ coq-mathcomp-algebra   1.15.0 [required by coq-bits]
  ∗ coq-mathcomp-fingroup  1.15.0 [required by coq-mathcomp-algebra]
  ∗ coq-mathcomp-ssreflect 1.15.0 [required by coq-mathcomp-fingroup]
  ∗ dune                   3.16.1 [required by coq]
  ∗ ocamlfind              1.9.6  [required by coq]
  ∗ zarith                 1.14   [required by coq]

The following system packages will first need to be installed:
    pkgconf

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><>  🐫 

opam believes some required external dependencies are missing. opam can:
> 1. Run brew to install them (may need root/sudo access)
  2. Display the recommended brew command and wait while you run it manually (e.g. in another terminal)
  3. Continue anyway, and, upon success, permanently register that this external dependency is present, but not detectable
  4. Abort the installation

[1/2/3/4] 1

+ /opt/homebrew/bin/brew "install" "pkgconf"
[ERROR] System package install failed with exit code 1 at command:
- ==> Downloading https://ghcr.io/v2/homebrew/core/pkgconf/manifests/2.3.0
            brew install pkgconf
- ==> Fetching pkgconf
- ==> Downloading https://ghcr.io/v2/homebrew/core/pkgconf/blobs/sha256:4d7c5803943bf2dcc8cb9ff8c838ea4283eeab24f49982df044cbc3031856fd8
- ::error::Cannot install pkgconf because conflicting formulae are installed.%0A  pkg-config: because both install `pkg.m4` file%0A%0APlease `brew unlink pkg-config` before continuing.%0A%0AUnlinking removes a formula's symlinks from /opt/homebrew. You can%0Alink the formula again after the install finishes. You can `--force` this%0Ainstall, but the build may fail or cause obscure side effects in the%0Aresulting software.%0A
[ERROR] These packages are still missing: pkgconf

[NOTE] You can retry with '--assume-depexts' to skip this check, or run 'opam option depext=false' to permanently disable handling of system packages.

This currently works on master, and the only difference I can see is that the successful job on master installs opam-2.1.6, while the failing job in this PR installs opam-2.3.0. Should we be running opam install with --assume-depexts to prevent opam from trying to install pkgconf?

sauclovian-g commented 2 days ago

I noticed on one of my machines that updating brew caused it to uninstall pkgconf but keep pkg-config, because of a conflict. So I think something's changed in brew such that you can no longer have both of those at once.

Now, you shouldn't need to, so my guess is that opam is doing something wrong and either it or the conf-pkg-config wrapper package, or both, need to be updated in setup-ocaml@v3.

Apparently this doesn't happen with setup-ocaml@v2...