From c3ecfac181ea3977f7baac7de5d144b4ce800b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Thu, 22 Oct 2026 11:08:28 -0400 Subject: [PATCH] fix(aws-lambda): build x265 for arm64 with the base image compiler x265 builds its SVE2 kernels with -march=armv9-a, which gcc 11 rejects. Turn them off, and stop a failed x265 build from reaching ffmpeg configure as a misleading "x265 not found". --- packages/aws-lambda/image/build-ffmpeg.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/aws-lambda/image/build-ffmpeg.sh b/packages/aws-lambda/image/build-ffmpeg.sh index 34922eb19a..9d1c2ad851 100755 --- a/packages/aws-lambda/image/build-ffmpeg.sh +++ b/packages/aws-lambda/image/build-ffmpeg.sh @@ -30,9 +30,11 @@ git -C "$SRC/x264" checkout -q "$x264_commit" license x264 "$SRC/x264/COPYING" fetch x265_4.1.tar.gz +# SVE2 kernels need -march=armv9-a, which the base's gcc 11 does not know (x86 ignores the flag). cmake -S "$SRC/x265_4.1/source" -B "$SRC/x265-build" -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="$DEPS" -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -cmake --build "$SRC/x265-build" -j"$JOBS" && cmake --install "$SRC/x265-build" + -DCMAKE_INSTALL_PREFIX="$DEPS" -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DENABLE_SVE2=OFF +cmake --build "$SRC/x265-build" -j"$JOBS" +cmake --install "$SRC/x265-build" license x265 "$SRC/x265_4.1/COPYING" fetch libvpx-1.15.0.tar.gz