From 9feb74b72c6693a788fab49c3c3a16ab21ebf08f Mon Sep 17 00:00:00 2001 From: mofeng-git Date: Sat, 10 Jan 2026 13:03:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=AF=E7=94=A8=20opus=20=E9=9D=99?= =?UTF-8?q?=E6=80=81=E9=93=BE=E6=8E=A5=E4=BF=AE=E5=A4=8D=E4=BA=A4=E5=8F=89?= =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 OPUS_STATIC=1 和 PKG_CONFIG_ALL_STATIC=1 环境变量 - 为 libopus 配置添加 --prefix 参数确保静态链接 --- build/cross/Dockerfile.arm64 | 3 +++ build/cross/Dockerfile.armv7 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/build/cross/Dockerfile.arm64 b/build/cross/Dockerfile.arm64 index 158b8fe9..ec860e7f 100644 --- a/build/cross/Dockerfile.arm64 +++ b/build/cross/Dockerfile.arm64 @@ -167,6 +167,7 @@ RUN git clone --depth 1 https://github.com/xiph/opus /tmp/opus \ && export RANLIB=aarch64-linux-gnu-ranlib \ && ./autogen.sh \ && ./configure \ + --prefix=/usr/aarch64-linux-gnu \ --host=aarch64-linux-gnu \ --enable-static --disable-shared \ --disable-doc \ @@ -316,4 +317,6 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ PKG_CONFIG_ALLOW_CROSS=1 \ FFMPEG_STATIC=1 \ LIBYUV_STATIC=1 \ + OPUS_STATIC=1 \ + PKG_CONFIG_ALL_STATIC=1 \ RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" diff --git a/build/cross/Dockerfile.armv7 b/build/cross/Dockerfile.armv7 index bb4cfc56..197a265c 100644 --- a/build/cross/Dockerfile.armv7 +++ b/build/cross/Dockerfile.armv7 @@ -156,6 +156,7 @@ RUN git clone --depth 1 https://github.com/xiph/opus /tmp/opus \ && export RANLIB=arm-linux-gnueabihf-ranlib \ && ./autogen.sh \ && ./configure \ + --prefix=/usr/arm-linux-gnueabihf \ --host=arm-linux-gnueabihf \ --enable-static --disable-shared \ --disable-doc \ @@ -305,6 +306,8 @@ ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ PKG_CONFIG_ALLOW_CROSS=1 \ FFMPEG_STATIC=1 \ LIBYUV_STATIC=1 \ + OPUS_STATIC=1 \ + PKG_CONFIG_ALL_STATIC=1 \ RUSTFLAGS="-C linker=arm-linux-gnueabihf-gcc" # Default command