mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-28 08:31:52 +08:00
fix: 启用 opus 静态链接修复交叉编译
- 添加 OPUS_STATIC=1 和 PKG_CONFIG_ALL_STATIC=1 环境变量 - 为 libopus 配置添加 --prefix 参数确保静态链接
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user