CentOS 7 libva及其驱动vaapi-driver编译
一. 下载libva vaapi-dirver
下载目前vaapi-driver最新版 intel-vaapi-driver 2.3.0,及其配套的 libva 2.3.0
二. 卸载老版本libva
如果安装了旧版本的libva,使用如下命令卸载:
yum remove libva.x86_64 libva-devel.x86_64 -y
三. libva编译
- 安装相关依赖包:
yum install libdrm-devel.x86_64 xorg-x11-server-devel.x86_64 -y
- 解压
tar -jxvf libva-2.3.0.tar.bz2
- 进入目录
cd libva-2.3.0/
- 配置
./configure --prefix=/usr --libdir=/usr/lib64 CFLAGS=-DNDEBUG
- 编译并安装
make -j4 make install
四. libva驱动编译
- 解压
tar -jxvf intel-vaapi-driver-2.3.0.tar.bz2
- 进入目录
cd intel-vaapi-driver-2.3.0/
- 配置
./configure CFLAGS=-DNDEBUG --prefix=/usr
- 编译并安装
make -j4 make install
五. 重新生成链接
使用如下命令刷新生成动态库链接:
ldconfig
六. 检查链接是否正确
执行:
ll /usr/lib64
示例结果如下:
-rwxr-xr-x. 1 root root 967 Sep 1 12:35 libva-drm.la
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-drm.so -> libva-drm.so.2.300.0
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-drm.so.2 -> libva-drm.so.2.300.0
-rwxr-xr-x. 1 root root 13712 Sep 1 10:32 libva-drm.so.2.100.0
-rwxr-xr-x. 1 root root 13776 Sep 1 12:35 libva-drm.so.2.300.0
-rwxr-xr-x. 1 root root 1018 Sep 1 12:35 libva-glx.la
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-glx.so -> libva-glx.so.2.300.0
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-glx.so.2 -> libva-glx.so.2.300.0
-rwxr-xr-x. 1 root root 29480 Sep 1 10:32 libva-glx.so.2.100.0
-rwxr-xr-x. 1 root root 29480 Sep 1 12:35 libva-glx.so.2.300.0
-rwxr-xr-x. 1 root root 917 Sep 1 12:35 libva.la
lrwxrwxrwx. 1 root root 16 Sep 1 12:35 libva.so -> libva.so.2.300.0
lrwxrwxrwx. 1 root root 16 Sep 1 12:35 libva.so.2 -> libva.so.2.300.0
-rwxr-xr-x. 1 root root 186568 Sep 1 10:32 libva.so.2.100.0
-rwxr-xr-x. 1 root root 190720 Sep 1 12:35 libva.so.2.300.0
-rwxr-xr-x. 1 root root 1008 Sep 1 12:35 libva-wayland.la
lrwxrwxrwx. 1 root root 24 Sep 1 12:35 libva-wayland.so -> libva-wayland.so.2.300.0
lrwxrwxrwx. 1 root root 24 Sep 1 12:35 libva-wayland.so.2 -> libva-wayland.so.2.300.0
-rwxr-xr-x. 1 root root 24512 Sep 1 10:33 libva-wayland.so.2.100.0
-rwxr-xr-x. 1 root root 24512 Sep 1 12:35 libva-wayland.so.2.300.0
-rwxr-xr-x. 1 root root 989 Sep 1 12:35 libva-x11.la
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-x11.so -> libva-x11.so.2.300.0
lrwxrwxrwx. 1 root root 20 Sep 1 12:35 libva-x11.so.2 -> libva-x11.so.2.300.0
-rwxr-xr-x. 1 root root 33824 Sep 1 10:32 libva-x11.so.2.100.0
-rwxr-xr-x. 1 root root 33824 Sep 1 12:35 libva-x11.so.2.300.0
确保libva相关的库都正确链接到了你需要的版本!