Cmake linking error for libQt5WebKit.so.5.5.1



  • I'm trying to build digikam from source from last 5 days in Ubuntu16.04 Xenial. I've cloned the digikam official repo from https://anongit.kde.org/digikam.git

    I followed the instructions present at https://cgit.kde.org/digikam.git/tree/README.md for compiling with cmake(mkdir build && cd build && cmake .. && make && make install)

    I've Qt 5.9.3 installed at /home/Qt/5.9.3/gcc_64/lib. Since Qt5WebKitWidgets which are not present in 5.9.3(QWebEngine is used here) I installed Qt 5.5 from Qt Maintenence tool.

    First when I run cmake it was unable to find QtWebkitWidgets. So I gave the path to Qt5WebKitWidgets in cmakeCache.txt in build directory.

    When I run cmake .. cmd in terminal in build directory the output in the terminal is as follows


    -- Starting CMake configuration for: digikam
    -- Could not set up the appstream test. appstreamcli is missing.
    -- Found Libical version 1.0
    -- KF5::KIOWidgets include dirs: /usr/local/include/KF5/KIOWidgets;/usr/local/include/KF5
    -- Libjpeg version: 84
    -- Boost version: 1.58.0
    -- Found lcms version 2.06, /usr/lib/x86_64-linux-gnu/liblcms2.so
    -- QtAV search path: /home/veluri/Qt/5.9.3/gcc_64/lib/cmake
    -- Could NOT find QtAV (missing: QTAV_LIBRARIES QTAV_INCLUDE_DIRS)
    -- QtAV_FOUND = FALSE
    -- QtAV_INCLUDE_DIR = QTAV_CORE_INCLUDE_DIR-NOTFOUND QTAV_WIDGETS_INCLUDE_DIR-NOTFOUND
    -- QtAV_LIBRARIES = QTAV_CORE_LIBRARY-NOTFOUND;QTAV_WIDGETS_LIBRARY-NOTFOUND
    -- QtAV_VERSION =
    -- First try at finding OpenCV...
    -- OpenCV Root directory is: /usr/local/share/OpenCV
    -- OpenCV: Found version 3.4.1 (required: 3.1.0)
    -- OpenCV headers: /usr/local/include;/usr/local/include/opencv
    -- OpenCV libs : opencv_core;opencv_objdetect;opencv_imgproc;opencv_imgcodecs
    -- libksane : search system based library
    -- libksane found : FALSE
    -- libksane library :
    -- libksane includes :
    -- libmediawiki : search system based library
    -- libmediawiki found : FALSE
    -- libmediawiki library :
    -- libmediawiki includes :
    -- libkvkontakte : search system based library
    -- libkvkontakte found : FALSE
    -- libkvkontakte library :
    -- libkvkontakte includes :
    -- Marble_FOUND = TRUE
    -- MARBLE_INCLUDE_DIR = /usr/include
    -- MARBLE_LIBRARIES = /usr/lib/x86_64-linux-gnu/libmarblewidget-qt5.so
    -- ASTRO_LIBRARIES = /usr/lib/x86_64-linux-gnu/libastro.so
    -- libgphoto2 found : TRUE
    -- libgphoto2 version : 2.5.9
    -- libgphoto2 includes : /usr/include/gphoto2
    -- libgphoto2 libraries: /usr/lib/x86_64-linux-gnu/libgphoto2.so;/usr/lib/x86_64-linux-gnu/libgphoto2_port.so
    -- libgphoto2 API version >= 2.5
    -- liblensfun: Found version 0.2.8.0 (required: 0.2.6.0)


    -- digiKam 6.0.0-git dependencies results http://www.digikam.org

    -- MySQL Database Support will be compiled.. YES (optional)
    -- MySQL Internal Support will be compiled.. YES (optional)
    -- DBUS Support will be compiled............ YES (optional)
    -- App. Style Support will be compiled...... NO (optional)
    -- libboostgraph found...................... YES
    -- libexiv2 found........................... YES
    -- libexpat found........................... YES
    -- libjpeg found............................ YES
    -- libkde found............................. YES
    -- liblcms found............................ YES
    -- libopencv found.......................... YES
    -- libpng found............................. YES
    -- libpthread found......................... YES
    -- libqt found.............................. YES
    -- libtiff found............................ YES
    -- bison found.............................. YES (optional)
    -- doxygen found............................ YES (optional)
    -- flex found............................... YES (optional)
    -- libakonadicontact found.................. YES (optional)
    -- libeigen3 found.......................... YES (optional)
    -- libgphoto2 found......................... YES (optional)
    -- libjasper found.......................... YES (optional)
    -- libkcalcore found........................ YES (optional)
    -- libmediawiki found....................... NO (optional)
    -- digiKam will be compiled without libmediawiki support.
    -- Please install the libmediawiki (version >= 5.1.0) development package.

    -- libkvkontakte found...................... NO (optional)
    -- digiKam will be compiled without libkvkontakte support.
    -- Please install the libkvkontakte (version >= 4.70.0) development package.

    -- libkfilemetadata found................... YES (optional)
    -- libkiconthemes found..................... YES (optional)
    -- libkio found............................. YES (optional)
    -- libknotifications found.................. YES (optional)
    -- libknotifyconfig found................... YES (optional)
    -- libksane found........................... NO (optional)
    -- digiKam will be compiled without flat scanners support.
    -- Please install the libksane (version >= 5.0.0) development package.

    -- liblensfun found......................... YES (optional)
    -- liblqr-1 found........................... YES (optional)
    -- libmarble found.......................... YES (optional)
    -- libqtav found............................ NO (optional)
    -- digiKam will be compiled without Media Player support.
    -- Please install the libqtav (version >= 1.12.0) development package.

    -- libthreadweaver found.................... YES (optional)
    -- libxml2 found............................ YES (optional)
    -- libxslt found............................ YES (optional)
    -- OpenGL found............................. YES (optional)
    -- digiKam can be compiled.................. YES


    --


    -- digiKam RawEngine dependencies checks:

    -- Looking for OpenMP
    -- OpenMP found with CXX flags: -fopenmp
    -- RawEngine will be compiled with OpenMP support
    -- RawEngine will be compiled with RedCine codec
    -- Looking for LibJpeg
    -- RawEngine will be compiled with DNG lossy codec
    -- Looking for PThreads


    --
    -- Configuring done
    CMake Warning (dev) in utilities/assistants/panorama/CMakeLists.txt:
    Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
    Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
    command to set the policy and suppress this warning.

    For compatibility, CMake is excluding the GENERATED source file(s):

    "/home/veluri/digikam/build/utilities/assistants/panorama/panoParser.h"
    

    from processing by AUTOMOC. If any of the files should be processed, set
    CMP0071 to NEW. If any of the files should not be processed, explicitly
    exclude them by setting the source file property SKIP_AUTOMOC:

    set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)
    

    This warning is for project developers. Use -Wno-dev to suppress it.

    CMake Warning (dev) in tests/facesengine/CMakeLists.txt:
    Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
    Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
    command to set the policy and suppress this warning.

    For compatibility, CMake is excluding the GENERATED source file(s):

    "/home/veluri/digikam/build/tests/facesengine/ui_mainwindow.h"
    

    from processing by AUTOMOC. If any of the files should be processed, set
    CMP0071 to NEW. If any of the files should not be processed, explicitly
    exclude them by setting the source file property SKIP_AUTOMOC:

    set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)
    

    This warning is for project developers. Use -Wno-dev to suppress it.

    -- Generating done
    -- Build files have been written to: /home/veluri/digikam/build

    When I run sudo make cmd then building CXX objects for dependecies to all the targets is fine but I'm getting error while linking CXX objects. The output is the terminal is as follows
    Scanning dependencies of target digikam-gitversion
    [ 0%] Built target digikam-gitversion
    Scanning dependencies of target dimg_src_autogen
    [ 0%] Automatic MOC for target dimg_src
    [ 0%] Built target dimg_src_autogen
    Scanning dependencies of target dimg_src
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/dimgloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/pngloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/jpegloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/tiffloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/rawloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/ppmloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/qimageloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/pgfloader.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/jpegsettings.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/pngsettings.cpp.o
    [ 0%] Building CXX object libs/dimg/CMakeFiles/dimg_src.dir/loaders/tiffsettings.cpp.o
    .
    .
    .
    .
    .
    Scanning dependencies of target digikamgui
    [ 79%] Building CXX object app/CMakeFiles/digikamgui.dir/digikamgui_autogen/mocs_compilation.cpp.o
    [ 79%] Linking CXX shared library libdigikamgui.so
    [ 79%] Built target digikamgui
    Scanning dependencies of target digikam_autogen
    [ 79%] Automatic MOC for target digikam
    [ 79%] Built target digikam_autogen
    Scanning dependencies of target digikam
    [ 79%] Building CXX object app/CMakeFiles/digikam.dir/main/main.cpp.o
    [ 79%] Building CXX object app/CMakeFiles/digikam.dir/digikam_autogen/mocs_compilation.cpp.o
    [ 79%] Linking CXX executable digikam
    /home/veluri/Qt/5.5/gcc_64/lib/libQt5WebKit.so.5.5.1: undefined reference to QWindowSystemInterface::registerTouchDevice(QTouchDevice*)
    /usr/local/lib/x86_64-linux-gnu/libKF5ConfigGui.so.5.41.0: undefined reference to QString::arg(QLatin1String, int, QChar) const@Qt_5
    /usr/local/lib/x86_64-linux-gnu/libKF5ConfigCore.so.5.41.0: undefined reference to qt_version_tag@Qt_5.11'
    /home/veluri/Qt/5.5/gcc_64/lib/libQt5WebKit.so.5.5.1: undefined reference to QQuickFlickable::contentItem()'
    collect2: error: ld returned 1 exit status
    app/CMakeFiles/digikam.dir/build.make:150: recipe for target 'app/digikam' failed
    make[2]: *** [app/digikam] Error 1
    CMakeFiles/Makefile2:7987: recipe for target 'app/CMakeFiles/digikam.dir/all' failed
    make[1]: *** [app/CMakeFiles/digikam.dir/all] Error 2
    Makefile:140: recipe for target 'all' failed
    make: *** [all] Error 2

    Can anyone plz help with this?


  • Lifetime Qt Champion

    Hi,

    From the looks of it, you are mixing several versions of Qt.

    How many do you have installed ?



  • 2 versions.

    Qt 5.9.3 and Qt 5.5.1

    I'm using Qt5.5.1 only for QtWebkitWidgets



  • You can use the newer, revived version of QtWebkit.

    https://github.com/annulen/webkit/wiki



  • I tried to build it(qtwebkit) from source but, every time I try to download it as zip file or clone it I'm getting errors. Is there any other solution?? Plzz

    Although I've shared object file of libQt5WebKit.so.5.5.1 which is installed by Qt Maintenance tool why am I getting undefined reference error?

    Do I need to change any environment variables related to QT_versions for using 2 versions of Qt?


  • Moderators

    @Veluri-Mithun said in Cmake linking error for libQt5WebKit.so.5.5.1:

    every time I try to download it as zip file or clone it I'm getting errors

    What errors? Do you have bad internet connection?



  • error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed



  • [ 8%] Linking CXX executable ../../bin/TestWebKitAPI/WTF/TestWTF
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToLowercaseWithoutLocale(): error: undefined reference to 'u_strToLower_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToLowercaseWithoutLocale(): error: undefined reference to 'u_tolower_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToLowercaseWithoutLocale(): error: undefined reference to 'u_strToLower_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithoutLocale(): error: undefined reference to 'u_toupper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithoutLocale(): error: undefined reference to 'u_strToUpper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithoutLocale(): error: undefined reference to 'u_strToUpper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithoutLocale(): error: undefined reference to 'u_toupper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToLowercaseWithLocale(WTF::AtomicString const&): error: undefined reference to 'u_strToLower_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToLowercaseWithLocale(WTF::AtomicString const&): error: undefined reference to 'u_strToLower_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithLocale(WTF::AtomicString const&): error: undefined reference to 'u_strToUpper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::convertToUppercaseWithLocale(WTF::AtomicString const&): error: undefined reference to 'u_strToUpper_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::foldCase(): error: undefined reference to 'u_strFoldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::foldCase(): error: undefined reference to 'u_strFoldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::foldCase(): error: undefined reference to 'u_foldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::stripWhiteSpace(): error: undefined reference to 'u_charDirection_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::stripWhiteSpace(): error: undefined reference to 'u_charDirection_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::findIgnoringCase(unsigned char const*, unsigned int): error: undefined reference to 'u_foldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::findIgnoringCase(WTF::StringImpl*, unsigned int): error: undefined reference to 'u_foldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::findIgnoringCase(WTF::StringImpl*, unsigned int): error: undefined reference to 'u_memcasecmp_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::findIgnoringCase(WTF::StringImpl*, unsigned int): error: undefined reference to 'u_foldCase_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::reverseFindIgnoringCase(WTF::StringImpl*, unsigned int): error: undefined reference to 'u_memcasecmp_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::defaultWritingDirection(bool*): error: undefined reference to 'u_charDirection_55'
    ../../lib/libWTF.a(../../lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/text/StringImpl.cpp.o):StringImpl.cpp:function WTF::StringImpl::defaultWritingDirection(bool*): error: undefined reference to 'u_charDirection_55'
    collect2: error: ld returned 1 exit status
    Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/build.make:1040: recipe for target 'bin/TestWebKitAPI/WTF/TestWTF' failed
    make[2]: *** [bin/TestWebKitAPI/WTF/TestWTF] Error 1
    CMakeFiles/Makefile2:2964: recipe for target 'Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/all' failed
    make[1]: *** [Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 8%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/API/JSContextRef.cpp.o
    [ 8%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/API/JSObjectRef.cpp.o
    .
    .
    .
    [ 25%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/API/JSStringRefQt.cpp.o
    [ 25%] Linking CXX static library ../../lib/libJavaScriptCore.a
    [ 25%] Built target JavaScriptCore
    Makefile:162: recipe for target 'all' failed
    make: *** [all] Error 2



  • There are few errors in that build, so I cloned this reop and there are no errors about qt5Webkit.

    http://code.qt.io/cgit/qt/qtwebkit.git/

    Thank You :)


Log in to reply
 

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