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

pkg-config: attempt to mitigate issue on github runners #26917

Closed
wants to merge 1 commit into from

Conversation

mseri
Copy link
Member

@mseri mseri commented Nov 19, 2024

This will not fix the issue completely unfortunately.

Problem

On homebrew the package pkg-config has been replaced by pkgconf, the executable pkg-config is now a symlink to pkgconf. On GitHub macos runner, pkg-config comes preinstalled and conflicts with the installation of the new package pkgconf, making the CIs fail:

::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
            brew install pkgconf

Moreover, if pkg-config is uninstalled and pkgconf is manually installed, it seems that the symlink to pkg-config that is installed with it is not executable (at least it cannot be found by opam).

Current Solutions

The only solutions, currently, are to either force the installation of conf-pkg-config.2 on macos which uses the old name for the depext, or execute brew unlink pkg-config; brew install pkgconf; brew unlink pkgconf; brew link pkg-config; before installing anything.

UPDATE: there is another solution (see #26891 (comment)) that is running brew update; brew upgrade; brew install pkgconf beforehand

This change

Not changing the package name in the depext, means that the package is broken on any new installation on macos with homebrew, while changing it means that it is broken on GitHub runners. This new version should install fine on both cases, provided that the GitHub runners unlink or remove the old package beforehand: brew uninstall pkg-config. It does not guarantee that pkg-config is a working executable though, that is either a bug in homebrew or in the GitHub runners that we have no control over.

See also the discussions in #26891

@mseri
Copy link
Member Author

mseri commented Nov 21, 2024

This will not solve the issue, we just need to wait for macos runners in github to be updated: actions/runner-images#10984

@mseri mseri closed this Nov 21, 2024
@mseri mseri deleted the pkg-config branch November 21, 2024 12:41
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

Successfully merging this pull request may close these issues.

1 participant