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



  • 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 toXCloseDisplay'
    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 functionWebCore::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 toXGetWindowAttributes'
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x168): undefined reference to XRenderFindVisualFormat' GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformImportERKNS_7IntSizeEim+0x18e): undefined reference toXDefaultScreen'
    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 functionWebCore::GraphicsSurface::platformCreate(WebCore::IntSize const&, int)':
    GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformCreateERKNS_7IntSizeEi+0x103): undefined reference to XOpenDisplay' GraphicsSurfaceGLX.cpp:(.text._ZN7WebCore15GraphicsSurface14platformCreateERKNS_7IntSizeEi+0x214): undefined reference toXRenderQueryExtension'
    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?



  • 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).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.