Cairo:
是 GTK的 依赖源,选择版本、是否正确安装,将直接决定了GTK能否顺利安装或者安装完能否正常使用(即GTK使用时编译不会报错)
Cairo-1.12.16 下载网址:
http://www.linuxfromscratch.org/blfs/view/svn/x/cairo.html
软件包配置指令:
CFLAGS="$CFLAGS -ffat-lto-objects" ./configure --prefix=/usr --disable-static
指令注释:
CFLAGS="$CFLAGS -ffat-lto-objects": Fixes building with GCC 4.9.
--disable-static
: This switch prevents installation of static versions of the libraries.
--enable-xlib-xcb
: This switch enables experimental Xlib/XCB functions used by some window managers.
--enable-gl
: This switch enablesCairo's experimentalOpenGL surface which is required forWayland compositor and some other packages that are not part of BLFS.
--enable-tee
: This switch enables experimental tee surface backend which is required if using system-installedCairo with Mozilla applications.
--enable-gtk-doc
: Use this parameter ifGTK-Doc is installed and you wish to rebuild and install the API documentation.
重要说明:
编译时出现各种缺少那是比较正常的事情,请根据报错依次解决吧;
编译请务必加上:--disable-static 此条命令参数可以预防安装静态版本的库, 要不可能GTK调用后,编译报错(诸如cairo-XXX有关的函数、定义之类没找到)。