Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt5 Beta1 in Linux - Can't build QtWebkit. Missing X11 libraries [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Qt5 Beta1 in Linux - Can't build QtWebkit. Missing X11 libraries [SOLVED]

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 1 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hipersayan_x
    wrote on last edited by
    #1

    These are the command that I'm using for compile Qt5 under Linux:

    @

    from "WebKit doesn’t compile, missing ICU"

    in http://qt-project.org/wiki/Building_Qt_5_from_Git

    mv qtwebkit qtwebkit-tmp
    mv qtwebkit-examples-and-demos qtwebkit-examples-and-demos-tmp

    from http://github.com/anselmolsm/archlinux-qt5-git/blob/master/qtbase/qt.profile

    export QTDIR=/opt/qt5
    export PATH=$QTDIR/bin:$PATH
    export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH

    ./configure --prefix=/opt/qt5 -opensource --confirm-license -silent -continue
    make

    mv qtwebkit-tmp qtwebkit
    mv qtwebkit-examples-and-demos-tmp qtwebkit-examples-and-demos

    qmakepath="$PWD/qtbase/bin/qmake"

    cd qtwebkit

    from http://github.com/anselmolsm/archlinux-qt5-git/blob/master/qtwebkit/PKGBUILD

    and "Building QtWebKit"

    in http://qt-project.org/wiki/Building_Qt_5_from_Git

    export WEBKITOUTPUTDIR="$PWD/WebKitBuild"
    perl Tools/Scripts/build-webkit --qt --qmake="$qmakepath" --install-libs=/opt/qt5 --makeargs="$MAKEARGS" --qmakearg="LIBS+=-lX11"
    @

    Even with the --qmakearg="LIBS+=-lX11" and the X11 development libraries installed, the compiler returns this error:

    @
    linking ../lib/libQtWebKit.so.5.0.0
    /home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release/Source/WebCore/release/libWebCore.a(GraphicsSurfaceGLX.o): In function WebCore::GraphicsSurface::platformDestroy()': GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface15platformDestroyEv+0x55): undefined reference to XCloseDisplay'
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface15platformDestroyEv+0x105): undefined reference to XFreePixmap' /home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release/Source/WebCore/release/libWebCore.a(GraphicsSurfaceGLX.o): In function WebCore::GraphicsSurface::platformImport(WebCore::IntSize const&, int, unsigned long)':
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0xf8): undefined reference to XOpenDisplay' GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x15a): undefined reference to XGetWindowAttributes'
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x168): undefined reference to XRenderFindVisualFormat' GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x18e): undefined reference to XDefaultScreen'
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x202): undefined reference to XFree' /home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release/Source/WebCore/release/libWebCore.a(GraphicsSurfaceGLX.o): In function WebCore::GraphicsSurface::platformCreate(WebCore::IntSize const&, int)':
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformCreateERKNS_7IntSizeEi+0x103): undefined reference to XOpenDisplay' GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformCreateERKNS_7IntSizeEi+0x214): undefined reference to XRenderQueryExtension'
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformCreateERKNS_7IntSizeEi+0x2f7): undefined reference to XChangeWindowAttributes' collect2: error: ld devolvió el estado de salida 1 make[2]: *** [../lib/libQtWebKit.so.5.0.0] Error 1 make[2]: se sale del directorio /home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release/Source'
    make[1]: *** [sub-api-pri-make_first-ordered] Error 2
    make[1]: se sale del directorio `/home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release/Source'
    make: *** [sub-Source-QtWebKit-pro-make_first-ordered] Error 2

    ===== BUILD FAILED ======

    The build failed with exit code 2. This may have been because you

    • added an #include to a source/header
    • added a Q_OBJECT macro to a class
    • added a new resource to a qrc file

    as dependencies are not automatically re-computed for local developer builds.
    You may try computing dependencies manually by running 'make qmake' in:

    /home/user/qt-everywhere-opensource-src-5.0.0-beta1/qtwebkit/WebKitBuild/Release

    or passing --makeargs="qmake" to build-webkit.

    =========================
    @

    How I can fix it?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hipersayan_x
      wrote on last edited by
      #2

      Ok, I forget to install some xcb libraries. For Arch Linux users, this is the full list of packages:

      Dependencies

      @libxcb xcb-proto xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm libedit libwebp@

      Build dependencies

      @git perl gperf fontconfig@

      Also, I have simplified the build commands to:

      @
      export QTDIR=/opt/qt5
      export PATH=$QTDIR/bin:$PATH
      export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH

      ./configure --prefix=/opt/qt5 -opensource --confirm-license -silent -continue
      make -j 2
      @

      NOTE: Qt5 takes at least 8 hs for compile with all modules in a 64 bits dual core CPU in power save mode (1.6 GHz).

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved