Skip to content

Commit 7833771

Browse files
committed
fix(build): nasm GitHub fallback needs autogen.sh, bump DEPS_VERSION to v8
The GitHub source archive for nasm doesn't include a pre-generated configure script (unlike the official nasm.us tarball). When the primary download fails and we fall back to GitHub, we need to run ./autogen.sh first to generate the configure script. Changes: - Run autogen.sh when using GitHub nasm source archive - Add autoconf to brew install (required by autogen.sh) - Bump DEPS_VERSION to v8 in ci.yml and build-prebuilds.yml - Add glibc variant download for Linux in ci.yml
1 parent d876a70 commit 7833771

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/build-ffmpeg.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ jobs:
241241

242242
- name: Install build dependencies
243243
run: |
244-
brew install automake libtool nasm cmake pkg-config
244+
brew install autoconf automake libtool nasm cmake pkg-config
245245
246246
- name: Cache compiled libraries
247247
uses: actions/cache@v5
@@ -277,14 +277,16 @@ jobs:
277277
if curl -fSL --retry 3 --retry-delay 5 "$NASM_URL" -o nasm.tar.bz2 2>/dev/null; then
278278
echo "Downloaded nasm from primary source"
279279
tar xjf nasm.tar.bz2
280+
cd nasm-${NASM_VERSION}
280281
else
281282
echo "Primary nasm download failed, trying GitHub mirror..."
282283
curl -fSL --retry 3 "$NASM_GITHUB" -o nasm.tar.gz
283284
tar xzf nasm.tar.gz
284-
mv nasm-nasm-${NASM_VERSION} nasm-${NASM_VERSION}
285+
cd nasm-nasm-${NASM_VERSION}
286+
# GitHub source archive requires autogen.sh to create configure script
287+
./autogen.sh
285288
fi
286289
287-
cd nasm-${NASM_VERSION}
288290
./configure --prefix="$TARGET"
289291
make -j$(sysctl -n hw.ncpu)
290292
make install

.github/workflows/build-prebuilds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
name: "prebuild-${{ matrix.platform }}"
4343
runs-on: ${{ matrix.os }}
4444
env:
45-
DEPS_VERSION: ${{ inputs.deps_version || 'v7' }}
45+
DEPS_VERSION: ${{ inputs.deps_version || 'v8' }}
4646
strategy:
4747
fail-fast: false
4848
matrix:

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
name: "build-${{ matrix.platform }}-nodejs-${{ matrix.nodejs_version }}"
3737
runs-on: ${{ matrix.os }}
3838
env:
39-
DEPS_VERSION: v7 # Bump when running new build-ffmpeg workflow
39+
DEPS_VERSION: v8 # Bump when running new build-ffmpeg workflow
4040
strategy:
4141
fail-fast: false
4242
matrix:
@@ -82,7 +82,8 @@ jobs:
8282
with:
8383
repo: ${{ github.repository }}
8484
version: tags/deps-${{ env.DEPS_VERSION }}
85-
file: ffmpeg-${{ matrix.platform }}.tar.gz
85+
# Use glibc variant for Linux (musl libs can't link into glibc shared objects)
86+
file: ffmpeg-${{ matrix.platform }}${{ runner.os == 'Linux' && '-glibc' || '' }}.tar.gz
8687
target: ffmpeg-${{ matrix.platform }}.tar.gz
8788
token: ${{ secrets.GITHUB_TOKEN }}
8889

0 commit comments

Comments
 (0)