Skip to content

Commit a86d9f0

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 a86d9f0

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/buildmaster.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,22 @@ 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 --force
105+
${PKGMGR_CMD} update
106+
# remove the link to python-2to3 in case python gets upgraded or a
107+
# new version is required
108+
if [ -L $HB_PREFIX/2to3 ]; then
109+
rm '$HB_PREFIX/bin/2to3'
110+
fi
111+
${PKGMGR_CMD} upgrade
112+
${PKGMGR_CMD} install pkg-config ccache qt@5 nasm libsamplerate \
113+
taglib lzo libcec libbluray libass libhdhomerun dav1d x264 x265 \
114+
libvpx openssl sound-touch lame freetype libass libiconv libxml2 \
115+
libzip XviD zlib pyenv-virtualenv python-lxml python-requests \
116+
python-setuptools --force --overwrite
117+
${PKGMGR_CMD} link qt@5 --force
118+
${PKGMGR_CMD} link python --force
110119
# macos-14 updated the linker and needs to be run in "classic" mode
111120
case $OS_VERS in
112121
macos-14)
@@ -115,7 +124,6 @@ jobs:
115124
esac
116125
# homebrew uses different prefixes on x86_64 and arm64, find the
117126
# correct one and setup the correct build variables
118-
HB_PREFIX=$(${PKGMGR_CMD} --prefix)
119127
C_INCLUDE_PATH=$HB_PREFIX/include:$C_INCLUDE_PATH
120128
echo "C_INCLUDE_PATH=$C_INCLUDE_PATH" >> $GITHUB_ENV
121129
CPLUS_INCLUDE_PATH=$HB_PREFIX/include:$CPLUS_INCLUDE_PATH
@@ -169,7 +177,7 @@ jobs:
169177

170178
- name: Install plugin dependencies (macOS)
171179
run: ${PKGMGR_CMD} install minizip flac libvorbis libcdio python-pycurl
172-
python-oauthlib
180+
python-oauthlib --force --overwrite
173181
if: runner.os == 'macOS'
174182

175183
- name: Configure plugins

0 commit comments

Comments
 (0)