[solved] "libavcoded is too old!" compilation error in Manjaro

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

[solved] "libavcoded is too old!" compilation error in Manjaro

Post by Naugrim »

I wanted to test and document several compilation options so I started with a clean virtual machine to go step by step.

Installed cmake, gcc and make for now hoping to identify missing packages and go one by one. Eventually adding instruction for osc/openmw and other options.
But on the first step I got stuck:

Code: Select all

mkdir build && cd build && cmake ..
This fails with:

Code: Select all

-- Configuring OpenMW...
-- Found FFmpeg_AVCODEC 
-- Found FFmpeg_AVFORMAT 
-- Found FFmpeg_AVUTIL 
-- Found FFmpeg_SWSCALE 
-- Found FFmpeg_SWRESAMPLE 
-- libavformat is too old! (, wanted 57.56.100)
-- libavcodec is too old! (, wanted 57.64.100)
-- libavutil is too old! (, wanted 55.34.100)
-- libswscale is too old! (, wanted 4.2.100)
-- libswresample is too old! (, wanted 2.3.100)
CMake Error at CMakeLists.txt:275 (message):
  FFmpeg version is too old, 3.2 is required
Which I understand comes from ffmpeg, and the information of the installed package says I have v58-64

Code: Select all

Name            : ffmpeg
Version         : 2:4.4.1-1
Description     : Complete solution to record, convert and stream audio and video
Architecture    : x86_64
URL             : https://ffmpeg.org/
Licenses        : GPL3
Groups          : None
Provides        : libavcodec.so=58-64  libavdevice.so=58-64  libavfilter.so=7-64  libavformat.so=58-64  libavutil.so=56-64
                  libpostproc.so=55-64  libswresample.so=3-64  libswscale.so=5-64
Depends On      : alsa-lib  aom  bzip2  fontconfig  fribidi  gmp  gnutls  gsm  jack  lame  libass.so=9-64  libavc1394
                  libbluray.so=2-64  libdav1d.so=5-64  libdrm  libfreetype.so=6-64  libiec61883  libmfx  libmodplug  libpulse
                  librav1e.so=0-64  libraw1394  librsvg-2.so=2-64  libsoxr  libssh  libtheora  libva.so=2-64
                  libva-drm.so=2-64  libva-x11.so=2-64  libvdpau  libvidstab.so=1.1-64  libvorbisenc.so=2-64
                  libvorbis.so=0-64  libvpx.so=7-64  libwebp  libx11  libx264.so=163-64  libx265.so=199-64  libxcb  libxext
                  libxml2  libxv  libxvidcore.so=4-64  libzimg.so=2-64  opencore-amr  openjpeg2  opus  sdl2  speex  srt
                  svt-av1  v4l-utils  vmaf  xz  zlib
Optional Deps   : avisynthplus: AviSynthPlus support
                  intel-media-sdk: Intel QuickSync support
                  ladspa: LADSPA filters
                  nvidia-utils: Nvidia NVDEC/NVENC support
Required By     : audacious-plugins  chromaprint  electron13  ffmpegthumbnailer  firefox  gst-libav  vlc
Optional For    : gegl  libde265
Conflicts With  : None
Replaces        : None
Installed Size  : 33,90 MiB
Packager        : Maxime Gauduin <[email protected]>
Build Date      : sáb 06 nov 2021 11:33:57
Install Date    : jue 25 nov 2021 00:02:19
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
Furthermore, checking the files/links shows v58 (provided we can trust links naming scheme)

Code: Select all

$ pwd
/usr/lib
$ ls -lah | grep libavcodec
lrwxrwxrwx   1 root root    24 nov  6 11:33 libavcodec.so -> libavcodec.so.58.134.100
lrwxrwxrwx   1 root root    24 nov  6 11:33 libavcodec.so.58 -> libavcodec.so.58.134.100
-rwxr-xr-x   1 root root   15M nov  6 11:33 libavcodec.so.58.134.100
I realized this not a OpenMW issue, but any help would be greatly appreciated.

PS: In my normal metal installation it works fine and I have the same package. But it's been running for 2 years, I keep it quite organized but I would not consider a reference environment.
Last edited by Naugrim on 25 Nov 2021, 19:10, edited 1 time in total.
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: "libavcoded is too old!" compilation error in Manjaro

Post by LoneWolf »

Code: Select all

        if(FFmpeg_AVFORMAT_VERSION VERSION_LESS "57.56.100")
            message(STATUS "libavformat is too old! (${FFmpeg_AVFORMAT_VERSION}, wanted 57.56.100)")
            set(FFVER_OK FALSE)
        endif()
Looks like FFmpeg_AVFORMAT_VERSION results in an empty string on your system.
On linux systems that kind of information usually comes through pkgconf .

Do you have pkgconf installed ?

If yes, post the output of

Code: Select all

pkgconf --modversion libavformat
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: "libavcoded is too old!" compilation error in Manjaro

Post by Naugrim »

Thanks a lot!
These helps means a lot for non c/c++ devs
Post Reply