[FFmpeg-user] compilation error

Moritz Barsnick barsnick at gmx.net
Fri Jun 1 02:08:39 EEST 2018


On Thu, May 31, 2018 at 20:51:35 +0200, Reindl Harald wrote:
> 
> so just install the devel-package, given that you don#t say anything
> about your operating system - who knows - on redhat "yum install
> opus-devel" or remove "--enable-libopus"

It's self-installed, see references to e.g.
/home/ubuntu/ffmpeg_build/include/opus

The pc file is indeed found, as the log file
reports this:
> pkg-config --exists --print-errors opus
> check_func_headers opus_multistream.h opus_multistream_decoder_create -I/home/ubuntu/ffmpeg_build/include/opus -L/home/ubuntu/ffmpeg_build/lib -lopus

This is the subsequent error:
> gcc -L/home/ubuntu/ffmpeg_build/lib -Wl,--as-needed -Wl,-z,noexecstack -I/home/ubuntu/ffmpeg_build/include/opus -L/home/ubuntu/ffmpeg_build/lib -o /tmp/ffconf.zxQfCQxr/test/tmp/ffconf.zxQfCQxr/test.o -lopus
> /home/ubuntu/ffmpeg_build/lib/libopus.a(opus_decoder.o): In function `opus_decode_frame':
> /home/ubuntu/ffmpeg_sources/opus-1.2.1/src/opus_decoder.c:570: undefined reference to `exp'

"-lm" is missing.

It seems libopus is only available statically, and configure does not
realize that, or the opus.pc file does not provide "-lm" in
Libs.private.

Kone, please add "--extra-ldflags=-lm" to your ./configure line, and
see whether that helps.

It might help, instead, to recompile your libopus with
"--enable-shared". It should have been the default though - it was for
my libopus.

> --enable-libfdk-aac
> why?

Because he can. And it's good. (Well, I like it.)

> --enable-libass
> why?

Because he may want to use it?

Moritz


More information about the ffmpeg-user mailing list