cmake checks for the presence of cairo-gl and cairo-egl during the configure stage, but the code assumes it present regardless of what cmake found. cmake: -- checking for module 'cairo-gl' -- found cairo-gl, version 1.14.0 -- checking for module 'cairo-egl' -- package 'cairo-egl' not found -- Found CairoGL: /usr/local/include/cairo;/usr/local/include/glib-2.0;/usr/local/lib/glib-2.0/include;/usr/local/include/pixman-1;/usr/local/include/freetype2;/usr/local/include/libpng16;/usr/local/include/libdrm;/usr/local/include;CAIRO_EGL_INCLUDE_DIRS (Required is at least version "1.10.2") In file included from /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.7.3/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:50: /usr/local/include/cairo/cairo-gl.h:95:5: warning: 'CAIRO_HAS_GLX_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^ /usr/local/include/cairo/cairo-gl.h:113:5: warning: 'CAIRO_HAS_WGL_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^ /usr/local/include/cairo/cairo-gl.h:129:5: warning: 'CAIRO_HAS_EGL_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_EGL_FUNCTIONS ^ In file included from /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.7.3/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:50: /usr/local/include/cairo/cairo-gl.h:95:5: warning: 'CAIRO_HAS_GLX_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^ /usr/local/include/cairo/cairo-gl.h:113:5: warning: 'CAIRO_HAS_WGL_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^ /usr/local/include/cairo/cairo-gl.h:129:5: warning: 'CAIRO_HAS_EGL_FUNCTIONS' is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_EGL_FUNCTIONS ^ /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.7.3/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:307:21: error: use of undeclared identifier 'cairo_egl_device_create' m_cairoDevice = cairo_egl_device_create(sharedEGLDisplay(), m_context); ^ 3 warnings and 1 error generated. Source/WebCore/CMakeFiles/WebCorePlatformGTK2.dir/build.make:146: recipe for target 'Source/WebCore/CMakeFiles/WebCorePlatformGTK2.dir/platform/graphics/egl/GLContextEGL.cpp.o' failed