Skip to content

Commit e4ebf64

Browse files
committed
Github workflow: Fix linking error on macOS
Homebrew has multiple versions of python which occasionally step on each other. Add the overwrite flag in the install process to explicity oveverwrite old links. Additionally add a call to brew upgrade to handle issues where new packages require updating already installed ones.
1 parent 62ad21b commit e4ebf64

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/buildmaster.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,19 @@ jobs:
100100
env:
101101
OS_VERS: ${{ matrix.os }}
102102
run: |
103-
brew update
104-
${PKGMGR_CMD} install pkg-config ccache qt5 nasm libsamplerate taglib\
105-
lzo libcec libbluray libass libhdhomerun dav1d x264 x265 libvpx \
106-
openssl sound-touch lame freetype libass libiconv libxml2 libzip \
107-
XviD zlib pyenv-virtualenv python-lxml python-requests \
108-
python-setuptools
109-
${PKGMGR_CMD} link qt5 --force
103+
HB_PREFIX=$(${PKGMGR_CMD} --prefix)
104+
${PKGMGR_CMD} unlink python
105+
${PKGMGR_CMD} unlink python@3.11
106+
${PKGMGR_CMD} unlink python@3.12
107+
${PKGMGR_CMD} update
108+
${PKGMGR_CMD} upgrade --force
109+
${PKGMGR_CMD} install pkg-config ccache qt@5 nasm libsamplerate \
110+
taglib lzo libcec libbluray libass libhdhomerun dav1d x264 x265 \
111+
libvpx openssl sound-touch lame freetype libass libiconv libxml2 \
112+
libzip XviD zlib pyenv-virtualenv python-lxml python-requests \
113+
python-setuptools --force --overwrite
114+
${PKGMGR_CMD} link qt@5 --force
115+
${PKGMGR_CMD} link python --force --overwrite
110116
# macos-14 updated the linker and needs to be run in "classic" mode
111117
case $OS_VERS in
112118
macos-14)
@@ -115,7 +121,6 @@ jobs:
115121
esac
116122
# homebrew uses different prefixes on x86_64 and arm64, find the
117123
# correct one and setup the correct build variables
118-
HB_PREFIX=$(${PKGMGR_CMD} --prefix)
119124
C_INCLUDE_PATH=$HB_PREFIX/include:$C_INCLUDE_PATH
120125
echo "C_INCLUDE_PATH=$C_INCLUDE_PATH" >> $GITHUB_ENV
121126
CPLUS_INCLUDE_PATH=$HB_PREFIX/include:$CPLUS_INCLUDE_PATH
@@ -169,7 +174,7 @@ jobs:
169174

170175
- name: Install plugin dependencies (macOS)
171176
run: ${PKGMGR_CMD} install minizip flac libvorbis libcdio python-pycurl
172-
python-oauthlib
177+
python-oauthlib --force --overwrite
173178
if: runner.os == 'macOS'
174179

175180
- name: Configure plugins

0 commit comments

Comments
 (0)