From 9cee3b10117e90fe5d0c4f9c65706c75542c11cd Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 22 Nov 2024 10:25:59 +0100 Subject: [PATCH] CI mac: disable pkg-config and use pkgconf pkgconf is more modern version and the CI on macos-14 now fails because both pkg-config and pkgconf (presumably as a dependency) are to be installed. The erroa (the beginning, additional info omittedr): ``` ==> Pouring pkgconf--2.3.0_1.arm64_sonoma.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /opt/homebrew Could not symlink bin/pkg-config Target /opt/homebrew/bin/pkg-config is a symlink belonging to pkg-config@0.29.2. You can unlink it: brew unlink pkg-config@0.29.2 ``` Both pkgconf and pkg-config can be installed automatically as a dependency of some other packages so ensure a defined state (both installed, pkg-config disabled). --- .github/scripts/macOS/prepare.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/scripts/macOS/prepare.sh b/.github/scripts/macOS/prepare.sh index 755cf01fb..3656a3e7a 100755 --- a/.github/scripts/macOS/prepare.sh +++ b/.github/scripts/macOS/prepare.sh @@ -31,6 +31,15 @@ echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" >> "$GITHUB_ENV" echo "/usr/local/opt/qt/bin" >> "$GITHUB_PATH" echo "DYLIBBUNDLER_FLAGS=$DYLIBBUNDLER_FLAGS" >> "$GITHUB_ENV" +# Ensure that pkg-config is installed but unlinked. +# This is to prevent interference with pkgconf - both can be installed as +# a dependency of other packages so ensure a defined state (both installed; +# pkgconf installed and enabled later). +if ! brew list pkg-config 2>/dev/null; then + brew install pkg-config +fi +brew unlink pkg-config + set -- \ asciidoctor \ autoconf \ @@ -46,7 +55,7 @@ set -- \ molten-vk \ opencv \ ossp-uuid `#for cineform` \ - pkg-config \ + pkgconf \ portaudio \ qt \ sdl2 \