一. libva.a的编译过程
(1)apt-get install libdrm-dev解决libdrm找不到的问题
(2)wayland-scanner问题
checking pkg-config is at least version 0.9.0... yes
checking for WAYLAND_SCANNER... no
configure: error: Package requirements (wayland-scanner) were not met:
No package ‘wayland-scanner‘ 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 WAYLAND_SCANNER_CFLAGS
and WAYLAND_SCANNER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决:
$ git clone git://anongit.freedesktop.org/wayland/wayland
$ cd wayland
$ ./autogen.sh --prefix=$WLD
$ make && make install
$ cd ..
(3)./autogen.sh出错,解决方法:
apt-get install autoconf
(4)继续安装wayland:
[email protected]:/mnt/shared/wayland# ./autogen.sh
autoreconf: Entering directory `.‘
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:23: installing ‘./install-sh‘
configure.ac:23: installing ‘./missing‘
Makefile.am:140: error: Libtool library used but ‘LIBTOOL‘ is undefined
Makefile.am:140: The usual way to define ‘LIBTOOL‘ is to add ‘LT_INIT‘
Makefile.am:140: to ‘configure.ac‘ and run ‘aclocal‘ and ‘autoconf‘ again.
Makefile.am:140: If ‘LT_INIT‘ is in ‘configure.ac‘, make sure
Makefile.am:140: its definition is in aclocal‘s search path.
Makefile.am: installing ‘./depcomp‘
parallel-tests: installing ‘./test-driver‘
autoreconf: automake failed with exit status: 1
[email protected]:/mnt/shared/wayland#
(5) error: Libtool library used but ‘LIBTOOL‘ is undefined
解决方法: apt-get install libtool试下
(6)继续编译wayland
configure: error: Package requirements (libffi) were not met:
No package ‘libffi‘ 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 FFI_CFLAGS
and FFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
[email protected]:/mnt/shared/wayland#
解决方法:下载安装libffi库:
wget ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz
./configure
make
make install
(7)继续编译wayland
./autogen.sh
出现如下错误:
configure: error: Can‘t find expat.h. Please install expat.
解决方法:
apt-get install libexpat-dev
(8)继续编译wayland:
./autogen.sh
出现如下问题:
checking for doxygen... no
configure: error: Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation
[email protected]:/mnt/shared/wayland#
解决方法:
./configure --disable-documentation
(9)配置wayland成功,编译安装:
make
make install
(10)编译libva.a
./configure
配置通过
make
make install
(11)发现编译出来的是动态库,/usr/local/lib下:
解决方法,将libva-1.3.1/va/Makefile中的libva_ldflags后加上-staitc,即可编出来libva.a
libva_ldflags = \
$(LDADD) -static -no-undefined \
-Wl,-version-script,libva.syms \
$(NULL)
libva的编译大功告成
(二)i965_drv_video.a的编译过程
(1)
./configure
make
出错:
In file included from i965_drv_video.c:37:0:
i965_output_wayland.h:31:26: error: unknown type name ‘VADriverContextP‘
i965_output_wayland_init(VADriverContextP ctx);
^
i965_output_wayland.h:34:31: error: unknown type name ‘VADriverContextP‘
i965_output_wayland_terminate(VADriverContextP ctx);
^
i965_drv_video.c:5243:9: error: ‘i965_output_wayland_init‘ undeclared here (not in a function)
i965_output_wayland_init,
^
i965_drv_video.c:5244:9: error: ‘i965_output_wayland_terminate‘ undeclared here (not in a function)
i965_output_wayland_terminate,
^
make[3]: *** [i965_drv_video_la-i965_drv_video.lo] Error 1
make[3]: Leaving directory `/mnt/shared/libva-intel-driver-1.3.2/src‘
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/shared/libva-intel-driver-1.3.2/src‘
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/shared/libva-intel-driver-1.3.2/src‘
make: *** [all-recursive] Error 1
(2)
[email protected]:/usr/local/include/va# ls
va_backend.h va_backend_vpp.h va_compat.h va_dec_vp8.h va_drm.h va_enc_mpeg2.h va_tpi.h va_vpp.h
va_backend_tpi.h va_backend_wayland.h va_dec_jpeg.h va_drmcommon.h va_enc_h264.h va.h va_version.h va_wayland.h
[email protected]:/usr/local/include/va# pwd
/usr/local/include/va
需要包含这个目录的头文件
将va_backend.h拷贝到src目录下,然后在i965_output_wayland.h中增加:
#include "va_backend.h"
然后就编译通过了
(3)find ./ -name *.so
./.libs/i965_drv_video.so
但同样生成的不是i965_drv_video.a
那么我们用同样的方法,在连接的时候加上-static
480 driver_ldflags = \
481 -module -avoid-version \
482 -no-undefined \
483 -Wl,--no-undefined \
484 -static \
485 $(NULL)
在src/.libs下生成了i965_drv_video.a