pkg-config在ffmpeg构建(Linux)上找不到库 [英] pkg-config cant find libraries on ffmpeg build (linux)

查看:1398
本文介绍了pkg-config在ffmpeg构建(Linux)上找不到库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在ubuntu上为Android构建ffmpeg ...

I'm trying to build ffmpeg for android on ubuntu...

-I've cross-compiled all the dependencies I need for my configuration
-I've set up the configuration parameters

但是/ configure一直说

but ./configure keep saying

ERROR: librtmp not found using pkg-config

我已经测试过,如果删除-enable-librtmp ,它将配置对其他库的抱怨。关键是我自己建立所有库。因此,我确定它存在并且在正确的文件夹中。

I've tested and if I remove --enable-librtmp it will configure complain about other library. The thing is I i build all libs myself. So I'm sure it is present and at right folder.

我不是Linux /编译器专家,到目前为止,我已经花了超过10天的时间才能正确完成该项目所需的一切。我知道我可以简单地在ffmpeg下修改配置文件并删除pkg-config检查,但这不是我正在寻找的解决方案

I'm not linux/compiler specialist and so far i've spend more than 10 days to get everything i need to this project rightly done. I know i can simple modify the configure file under ffmpeg and remove the pkg-config check but this isn't the solution I'm looking for

我运行的命令是:

./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是否可以检测是否安装了任何库?以及如何显示它确实存在我需要的库

I would like to know which tests pkg-config do to detect if any lib is installed? and how can i show it the libs i need are really present

==========更新========

=========UPDATE=========

$ {PREFIX} 代表 build_dir 文件夹 lib / pkgconfig 包含许多.pc文件,包括 librtmp.pc 。那么为什么它可以检测其他人却不能检测到其他人呢?我检查了文件和接缝的内容是否正确,类似于同一文件夹中的其他文件

${PREFIX} stands for build_dir under which i've a folder lib/pkgconfig with many .pc files including librtmp.pc. so why it can detect the others but not this one? i checked the content of the file and seams to be right, similar to others at same folder

推荐答案

在执行do之前尝试此命令。 / configure

try this command before do ./configure

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

安装libx265时遇到了类似的问题。

I met similar problem when I installed libx265.

这篇关于pkg-config在ffmpeg构建(Linux)上找不到库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆