【发布时间】:2018-11-12 18:07:30
【问题描述】:
我正在尝试在 ubuntu 上为 android 构建 ffmpeg...
-I've cross-compiled all the dependencies I need for my configuration
-I've set up the configuration parameters
但是./configure 一直在说
ERROR: librtmp not found using pkg-config
我已经测试过,如果我删除--enable-librtmp,它将配置抱怨其他库。问题是我自己构建了所有库。所以我确定它存在并且位于正确的文件夹中。
我不是 linux/编译器专家,到目前为止,我已经花费了 10 多天的时间来正确完成这个项目所需的一切。我知道我可以简单地修改 ffmpeg 下的配置文件并删除 pkg-config 检查,但这不是我正在寻找的解决方案
我运行的命令是:
./configure --prefix=$PREFIX \
--arch=${ARCH}\
--cpu=${CPU} \
--cross-prefix=$CROSS_PREFIX \
--enable-cross-compile \
--sysroot=$SYSROOT \
--target-os=linux \
--sysinclude=$NDK/sysroot/usr/include \
--pkg-config=$(which pkg-config) \
--pkg-config-flags="--static" \
--enable-pic \
--enable-gpl \
--enable-nonfree \
\
--disable-shared \
--enable-static \
\
--enable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
\
--enable-librtmp \
--enable-zlib \
--enable-mediacodec \
--enable-libx264 \
--enable-libfdk-aac\
--enable-libfreetype\
--enable-libmp3lame\
--enable-openssl\
--enable-libfontconfig\
--enable-bsf=aac_adtstoasc \
\
--disable-doc \
$ADDITIONAL_CONFIGURE_FLAG
我想知道 pkg-config 执行哪些测试来检测是否安装了任何库?以及如何向它展示我需要的库确实存在
=========更新=========
${PREFIX} 代表build_dir,在该文件夹下我有一个文件夹lib/pkgconfig,其中包含许多.pc 文件,包括librtmp.pc。那么为什么它可以检测到其他但不能检测到这个呢?我检查了文件的内容和接缝是否正确,类似于同一文件夹中的其他人
【问题讨论】:
标签: android linux ffmpeg cross-compiling pkg-config