Page 1 of 1

Linking to correct libavcodec

Posted: 16 Apr 2017 14:07
by Marco de Abreu
Hello together,

I'm currently in the process to compile VLC native on Ubuntu 14.04. I've built third-party-libraries using the contrib-method and everything was built successfully.

The execution of the configure-script without parameters fails unfortunately due to issues with the wrong libavcodec version:
checking for AVCODEC... no
configure: error: Requested 'libavcodec >= 57.16.0' but version of libavcodec is 54.35.1. Pass --disable-avcodec to ignore this error.
Executing ffmpeg in the terminal returns the currently installed version of libavcodec as the following:
libavcodec 57. 64.101 / 57. 64.101
As you can see, the required version is already installed, but there seems to be an issue referencing the correct version. I'd really appreciate any hints to solve this problem.

Re: Linking to correct libavcodec

Posted: 17 Apr 2017 10:33
by RĂ©mi Denis-Courmont
What matters is the result of
pkg-config --modversion libavcodec

You might want to uninstall old development files.

Re: Linking to correct libavcodec

Posted: 17 Apr 2017 14:25
by Marco de Abreu
That command returned in fact the old version and I've resolved it as requested by removing libavcodec using the package manager.

Unfortunately is pkg-config not able to link to the libavcodec-library, which is used by FFmpeg. Further executions of that command return, that the module is missing. I've tried to look for the required libavcodec.pc using

Code: Select all

find / -name "libavcodec.pc"
but that file is not present. The only file related to libav can be found at /usr/lib/x86_64-linux-gnu/pkgconfig/libavutil.pc.

Adding /usr/lib/x86_64-linux-gnu/pkgconfig/ to the $PKG_CONFIG_PATH doesn't resolve the issue either. Do you have further ideas?

Re: Linking to correct libavcodec

Posted: 18 Apr 2017 20:26
by Marco de Abreu
Just for the record: The issue was resolved by doing the following:

1. Uninstall dev-files using "apt-get remove libavcodec-dev"
2. Opted in FFmpeg in contribs/src/ffmpeg/rules.mak
3. Recompiled contribs using "make"
4. Recompiled ffmpeg using "make .ffmpeg" in the contribs/native directory

Afterwards, the configure-script ran without errors. Thanks to thresh, ePirat, InTheWings and courmisch.