Step by step: build libva 1.2.0 on Ubuntu 12.04 LTS 3


After finished my first phase of GPU – Intel Media SDK research, now it’s time to get into libva, my goal is to get a set of performance test report for both MSDK and libva, so that we can finally choose one of them, or both of them for product use. If you don’t know libva, or not sure if you know it or not, please visit here for more informations: http://www.freedesktop.org/wiki/Software/vaapi/ or http://rg4.net/archives/971.html (a copy in RG4.NET)

logo

And the first step of research on libva will be download & build libva.

Environment

As usual, I shall introduce my develop environment here:

OS: Ubuntu 12.04 LTS 64 bit with kernel 3.2.0-29

CPU: Core ivy bridge i7-3770

Target libva version: 1.2.1 (latest release for now)

Related projects/libraries

  • libdrm : http://dri.freedesktop.org/wiki/Download/
  • intel-driver: …
  • libva: http://www.freedesktop.org/wiki/Software/vaapi/

Brief compile steps

Download & compile intel-driver

Download the source code

git clone git://anongit.freedesktop.org/vaapi/intel-driver intel-driver
cd intel-driver

Compile

./configure

checking for DRM… no
configure: error: Package requirements (libdrm >= 2.4.45) were not met:

Requested ‘libdrm >= 2.4.45’ but version of libdrm is 2.4.43

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DRM_CFLAGS
and DRM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Remove & install the latest version of libdrm

Remove the existing libdrm:

sudo apt-get autoremove libdrm-dev

Download the lastest version of libdrm: http://dri.freedesktop.org/libdrm/ in which I choose libdrm-2.4.46.tar.bz2Remove & install the latest version of libdrm
Remove the existing libdrm:

sudo apt-get autoremove libdrm-dev

Download the lastest version of libdrm:

git clone git://anongit.freedesktop.org/git/mesa/drm

for
http://dri.freedesktop.org/libdrm/ in which I choose libdrm-2.4.46.tar.bz2

Compiling libdrm

./configure
make install

Install pciaccess

However if you encournter error like this: Package requirements (pciaccess >= 0.10) were not met:
checking for native atomic primitives… Intel
checking for PCIACCESS… no
configure: error: Package requirements (pciaccess >= 0.10) were not met:

No package ‘pciaccess’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

All you need to do is:

sudo apt-get install libpciaccess-dev

FAQ/Tips

Q1: va_getDriverName() failed with operation failed,driver_name=i965
jacky@ubuntu-va:/opt/softwares/VA/intel-driver$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
vaInitialize failed with error code 1 (operation failed),exit
A2: vainfo may need root permission to work, try

sudo vainfo

Leave a comment

Your email address will not be published. Required fields are marked *

3 thoughts on “Step by step: build libva 1.2.0 on Ubuntu 12.04 LTS