Hi all! I’m using opam 2.3.0 and I have started recently receiving the following warning:
[WARNING] Opam package conf-pkg-config.3 depends on the following system package that can no longer be found: pkg-config
As far as I can tell, this is not actually causing me any problem, but I wasn’t sure what to do with it. The thing is that if I run which pkg-config on my command line, it is found at /opt/homebrew/bin/pkg-config; so it seems there may be some issue with opam being able to see this, and I wasn’t sure what I should do to fix it. Maybe it is a Homebrew issue…
Anyone else seen and fixed this before? Thanks very much in advance!
Some further information, in case it helps: when I ran opam upgrade, the following occurred:
<><> 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" "pkg-config"
- Warning: pkgconf 2.3.0_1 is already installed and up-to-date.
- To reinstall 2.3.0_1, run:
- brew reinstall pkgconf
I was a little scared to select (3) because the message doesn’t really tell me what the consequences of doing that would be…
Thanks! Unfortunately the following methods proposed on that ticket don’t seem to work for me:
brew unlink pkg-config; brew install pkgconf; brew link pkg-config
or brew update; brew upgrade; brew install pkgconf
(Both of these result in the same warning being displayed upon invoking opam.)
Please note that I also cannot actually uninstall pkg-config, because many parts of the macOS Homebrew ecosystem depend on it. One other comment: the ticket refers to “old versions of homebrew”, but I am using the latest version of homebrew (4.4.6).
I run into the problem last week. From what I understand, brew has deprecated the pkg-config package. Upon upgrade, it is removed by brew and replaced by the package pkgconf (at least that is what happened on my machine). The problem is that packages in opam have depext on pkg-config. Such dependency seems to be checked using the name of the package. By consequence, opam does not know you still have the pkg-config binary (it has been installed by pkgconf). You can safely continue and let opam recompile every dependency (this only causes unnecessary recompilation) or select option 3 and never bother again. But from what I understand, the problem has been tackled by the change linked above.
I think the old brew mentioned is not an old version of brew but rather people that use brew with an old package universe (they still use the package pkg-config).
Ah, ok. So although I don’t completely understand everything, it sounds like it will be OK if I (1) just ignore the issue, and (2) await a new release of opam reflecting the linked change.
opam has already a new release using pkgconf. In principle with opam update; opam upgrade conf-pkg-config you should get the updated conf- package using homebrew’s pkgconf