Bug 1194260 - [Regression] CMake 3.2.0 can't detect X11
Summary: [Regression] CMake 3.2.0 can't detect X11
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cmake
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-19 12:37 UTC by Tomas Popela
Modified: 2015-02-21 04:04 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-21 04:04:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
WebKit Project 141796 0 None None None Never

Description Tomas Popela 2015-02-19 12:37:26 UTC
Description of problem:
When compiling webkitgtk4-2.7.90-8 on F22 it fails with:

(truncated) -lpthread -lGL -latk-1.0 -lcairo -lenchant -lfontconfig -lfreetype -lgmodule-2.0 -lharfbuzz -lharfbuzz-icu -licuuc -lgio-2.0 -lgobject-2.0 -lglib-2.0 -ljpeg -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lsoup-2.4 -lxml2 -lxslt -lpng -lsqlite3 -lwebp -lz -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgstpbutils-1.0 -lgsttag-1.0 -lgstvideo-1.0 -lgstaudio-1.0 -lgstfft-1.0 -lEGL -Wl,-rpath,/builddir/build/BUILD/webkitgtk-2.7.90/x86_64-redhat-linux-gnu/lib:
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:63: error: undefined reference to 'XGetErrorText'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:102: error: undefined reference to 'XSetErrorHandler'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp:102: error: undefined reference to 'XSetErrorHandler'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:235: error: undefined reference to 'XFreePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:221: error: undefined reference to 'XResizeWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:222: error: undefined reference to 'XFlush'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:250: error: undefined reference to 'XCompositeNameWindowPixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:257: error: undefined reference to 'XGetWindowAttributes'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:259: error: undefined reference to 'XFreePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:147: error: undefined reference to 'XCreateColormap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:158: error: undefined reference to 'XCreateWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:167: error: undefined reference to 'XMapWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:172: error: undefined reference to 'XCreateWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:183: error: undefined reference to 'XMapWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:185: error: undefined reference to 'XFreeColormap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:191: error: undefined reference to 'XWindowEvent'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:195: error: undefined reference to 'XSelectInput'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:196: error: undefined reference to 'XCompositeRedirectWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:197: error: undefined reference to 'XDamageCreate'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:113: error: undefined reference to 'XDamageQueryExtension'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:117: error: undefined reference to 'XCompositeQueryExtension'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:122: error: undefined reference to 'XCompositeQueryVersion'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:209: error: undefined reference to 'XDamageDestroy'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:210: error: undefined reference to 'XDestroyWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:211: error: undefined reference to 'XDestroyWindow'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:83: error: undefined reference to 'XDamageSubtract'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:154: error: undefined reference to 'XCreateColormap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:159: error: undefined reference to 'XFlush'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:184: error: undefined reference to 'XGetVisualInfo'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:188: error: undefined reference to 'XFree'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:191: error: undefined reference to 'XCreateColormap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:237: error: undefined reference to 'XFreeColormap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:241: error: undefined reference to 'XFreePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:279: error: undefined reference to 'XCreatePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:272: error: undefined reference to 'XFreePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:329: error: undefined reference to 'XSync'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:281: error: undefined reference to 'XSync'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:48: error: undefined reference to 'XFreeGC'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:70: error: undefined reference to 'XCopyArea'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:36: error: undefined reference to 'XCreatePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:37: error: undefined reference to 'XCreateGC'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/GLContext.cpp:83: error: undefined reference to 'XOpenDisplay'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/GLContext.cpp:91: error: undefined reference to 'XCloseDisplay'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:190: error: undefined reference to 'XCreatePixmap'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:230: error: undefined reference to 'XGetGeometry'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:39: error: undefined reference to 'XGetWindowAttributes'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:43: error: undefined reference to 'XVisualIDFromVisual'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:46: error: undefined reference to 'XGetVisualInfo'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:50: error: undefined reference to 'XFree'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:92: error: undefined reference to 'XFree'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:87: error: undefined reference to 'XFree'
/builddir/build/BUILD/webkitgtk-2.7.90/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:127: error: undefined reference to 'XCreatePixmap'


As you see the -lX11 and others are missing (these by defined by the X11_X11_LIB variable, that comes from cmake)). If I compile the same package in F23 (basically the same, but with cmake-3.1.1-1) the flags are added there and the build will finish successfully. What helps is to manually add find_package(X11) to the WebKit's cmake config files, but that was not necessary in 3.1.x.

Comment 1 Rex Dieter 2015-02-19 14:06:39 UTC
Offhand, I'd say adding
find_package(X11)
is the correct thing to do here.

Comment 2 Tomas Popela 2015-02-19 14:53:47 UTC
And another thing.. The build is failing on various places (see the WebKit BZ) in F22 (if the find_package(X11) on the opposite side on F23 (older cmake) everything is fine.

Comment 3 Orion Poplawski 2015-02-21 04:04:07 UTC
It's a feature, not a bug:

Deprecated and Removed Features:

* The "FindOpenGL" module no longer explicitly searches for any
  dependency on X11 libraries with the "FindX11" module.  Such
  dependencies should not need to be explicit. Applications using X11
  APIs themselves should find and link to X11 libraries explicitly.


Note You need to log in before you can comment on or make changes to this bug.