[FFmpeg-devel] [PATCH] use the correct option of pkg-config to check version

Guo, Yejun yejun.guo at intel.com
Mon Mar 4 13:57:15 EET 2019



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Timo Rothenpieler
> Sent: Monday, March 04, 2019 5:43 PM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] use the correct option of pkg-config to
> check version
> 
> This seems weird to me, why would there only be an issue on Ubuntu 16.04?

I guess it is a common issue, I'm at home and do not have other systems for a test.

> I'd assume that the code in question has been tested quite a bit.
> 
> Do you have an example of where and how it fails?

I've built and installed libvpx version 1.8 on my system with following vpx.pc:
$ cat /usr/local/lib/pkgconfig/vpx.pc 
# pkg-config file from libvpx v1.8.0-191-g503cb8e
prefix=/usr/local
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: vpx
Description: WebM Project VPx codec implementation
Version: 1.8.0
Requires:
Conflicts:
Libs: -L${libdir} -lvpx -lm
Libs.private: -lm -lpthread
Cflags: -I${includedir}


I did the following experiments to say it is an issue for the version check.

yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx >=1.2
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
0
yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx >=2.3
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
0

yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx --atleast-version=1.2
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
0
yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx --atleast-version=2.3
Requested 'vpx >= 2.3' but version of vpx is 1.8.0
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
1

yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx >= 1.2
Package 1.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `1.2.pc'
to the PKG_CONFIG_PATH environment variable
No package '1.2' found
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
1
yguo18 at yguo18-skl-u1604:/tmp$ pkg-config --exists  --print-errors  vpx >= 2.3
Package 2.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `2.3.pc'
to the PKG_CONFIG_PATH environment variable
No package '2.3' found
yguo18 at yguo18-skl-u1604:/tmp$ echo $?
1



More information about the ffmpeg-devel mailing list