作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建具有依赖关系的静态二进制文件。它失败了:
ERROR: libass not found using pkg-config
git clone --depth 1 https://github.com/l-smash/l-smash \
&& git clone --depth 1 git://source.ffmpeg.org/ffmpeg \
&& git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git \
&& git clone --depth 1 https://github.com/mulx/aacgain.git \
&& git clone --depth 1 git://git.videolan.org/x264.git \
&& hg clone https://bitbucket.org/multicoreware/x265 \
&& git clone --depth 1 https://chromium.googlesource.com/webm/libvpx \
&& git clone --depth 1 git://git.opus-codec.org/opus.git \
&& git clone --depth 1 https://github.com/libass/libass.git
mkdir /usr/local/src/nasm
cd /usr/local/src/nasm
curl http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.bz2 | tar -xj -C .
cd nasm-2.13.01
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
mkdir /usr/local/src/harfbuzz/
cd /usr/local/src/harfbuzz/
curl https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2 | tar -xj -C .
cd harfbuzz-1.4.6
./configure --prefix=$TARGET_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
cd /usr/local/src/libass
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR --enable-static --disable-shared \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# Build L-SMASH
# =================================
cd /usr/local/src/l-smash
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libx264
# =================================
cd /usr/local/src/x264
./configure --prefix=$TARGET_DIR --enable-static --disable-shared --disable-opencl --enable-pic \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libx265
# =================================
cd /usr/local/src/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$TARGET_DIR" -DENABLE_SHARED:bool=off ../../source
make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libfdk-aac
# =================================
cd /usr/local/src/fdk-aac
autoreconf -fiv \
&& ./configure --prefix=$TARGET_DIR --disable-shared \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# # =================================
# # Build libvpx
# # =================================
# cd /usr/local/src/libvpx
# ./configure --disable-examples --disable-unit-tests --enable-pic \
# && make --quiet -j ${NUM_CORES} \
# && make --quiet install
# # =================================
# # Build libopus
# # =================================
# cd /usr/local/src/opus
# ./autogen.sh \
# && ./configure --disable-shared \
# && make --quiet -j ${NUM_CORES} \
# && make --quiet install
# =================================
# Build ffmpeg.
# =================================
# --enable-libx265 - Remove until we can figure out compile error
cd /usr/local/src/ffmpeg
[ ! -f config.status ] && PATH="$BIN_DIR:$PATH" \
PKG_CONFIG_PATH="$TARGET_DIR/lib/pkgconfig" ./configure \
--extra-libs="-ldl" \
--prefix="$TARGET_DIR" \
--pkg-config-flags="--static" \
--extra-cflags="-I$TARGET_DIR/include" \
--extra-ldflags="-L$TARGET_DIR/lib" \
--extra-ldexeflags="-static" \
--bindir="$BIN_DIR" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-postproc \
--enable-pic \
--enable-pthreads \
--enable-shared \
--disable-stripping \
--disable-static \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# Remove all tmpfile
最佳答案
你为什么要 git 克隆,然后还要下载源包?
libass 默认构建静态库
libass 要求您运行 autogen.sh 以生成配置脚本
试试这样
git clone https://github.com/libass/libass.git
&& cd libass
&& ./autogen.sh
&& ./configure
&& make
&& make install
&& pkg-config libass
&& cd ../
&& git clone https://github.com/l-smash/l-smash
&& cd l-smash
&& ./configure
&& make install
&& cd ../
关于docker - 如何在 Alpine 中使用 libass/l-smash/x264/fdk-aac 静态编译 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44379055/
我正在尝试构建具有依赖关系的静态二进制文件。它失败了: ERROR: libass not found using pkg-config 我关注 https://github.com/zimbatm/
我是一名优秀的程序员,十分优秀!