[FFmpeg-user] Building ffmpeg - pkgconfig, again

darkmoon at frontier.com darkmoon at frontier.com
Sat Dec 1 14:53:56 EET 2018

On Sat, 1 Dec 2018 12:08:36 +0100, Moritz Barsnick <barsnick at gmx.net> wrote:

> On Sat, Dec 01, 2018 at 00:01:38 -0800, Jeff wrote:
>> Here is the relevant portion of 'ffbuild/config.log' for Opus. Please
>> can some experienced person help out with this?
> I can tell that the linker flag "-lm" seems to be missing.
> You information is a bit sparse. Can you show us your complete
> configure command line as well please?

../ffmpeg/configure --enable-gpl --enable-version3 --disable-podpages 
--enable-libx264 --enable-gmp --enable-libopus --enable-libmp3lame 

> And also the content of opus.pc

# Opus codec reference implementation pkg-config file


Name: opus
Description: Opus IETF audio codec (floating-point, custom modes build)
URL: https://opus-codec.org/
Version: 1.3
Libs: -L${libdir} -lopus
Libs.private: -lm
Cflags: -I${includedir}/opus

> (I hope you didn't rename it).

The log I posted was generated on my initial attempt to build, before I 
decided to start renaming things. Since I only prepended 'lib', it is 
easy enough to restore the original names.

> Possibly, you only built a static libopus,

Yes. I built all libs static only, because I am building only the static 
version of ffmpeg. No problem for me to go back and rebuild the libs, 
enabling the dynamic builds also.

>   but pkg-config is being
> called for synamic linking (and thereby omits Libs.private).
> (A quick workaround may be to add "--extra-ldflags=-lm".)

I can try that. Thank you, Moritz, I seriously appreciate your help.


More information about the ffmpeg-user mailing list