Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [Solved] Linker problems when building QtWebKit (inside of Qt 5.0.1 ) on osx.
Forum Updated to NodeBB v4.3 + New Features

[Solved] Linker problems when building QtWebKit (inside of Qt 5.0.1 ) on osx.

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 2.4k 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.
  • M Offline
    M Offline
    miketopen
    wrote on last edited by
    #1

    Hi All,

    I need to have Qt 5.0.1 with QtWebkit compiled from source. Unfortunately I'm running into the following problem:

    @
    clang++ -headerpad_max_install_names -mmacosx-version-min=10.6 -single_module -dynamiclib -compatibility_version 5.0 -current_version 5.0.1 -install_name /Users/mike/src/qt5/qtbase/lib/QtWebKit.framework/Versions/5/QtWebKit -o QtWebKit .obj/release-shared/.rcc/release-shared/qrc_WebCore.o .obj/release-shared/.rcc/release-shared/qrc_WebKit.o .obj/release-shared/.rcc/release-shared/qrc_InspectorBackendCommands.o -F/Users/mike/src/qt5/qtbase/lib -framework QtNetwork -L/opt/local/lib -framework QtCore -framework QtGui -framework Carbon -framework AppKit -L/opt/local/lib -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a -L/Users/mike/src/qt5/qtwebkit/Source/WebKit/release -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/WebKit2/release/libWebKit2.a -L/Users/mike/src/qt5/qtwebkit/Source/WebKit2/release -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/WebCore/release/libWebCore.a -L/Users/mike/src/qt5/qtwebkit/Source/WebCore/release -lz -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuartzCore -framework QTKit -framework Security -framework IOKit /Users/mike/src/qt5/qtwebkit/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a -framework IOSurface -framework CoreFoundation -lsqlite3 -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/ThirdParty/ANGLE/release/libANGLE.a -L/Users/mike/src/qt5/qtwebkit/Source/ThirdParty/ANGLE/release -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/JavaScriptCore/release/libJavaScriptCore.a -L/Users/mike/src/qt5/qtwebkit/Source/JavaScriptCore/release -Wl,-force_load,/Users/mike/src/qt5/qtwebkit/Source/WTF/release/libWTF.a -L/Users/mike/src/qt5/qtwebkit/Source/WTF/release -licucore -framework QtQuick -F/Users/mike/src/qt5/qtbase/lib -framework QtQml -framework QtNetwork -framework QtCore -framework QtGui -framework QtSql -framework OpenGL -framework AGL
    Undefined symbols for architecture x86_64:
    "_xmlByteConsumed", referenced from:
    WebCore::XMLDocumentParser::appendFragmentSource(WTF::String const&) in libWebCore.a(XMLDocumentParserLibxml2.o)
    "_xmlCreateMemoryParserCtxt", referenced from:
    WebCore::XMLParserContext::createMemoryParser(_xmlSAXHandler*, void*, WTF::CString const&) in

      …
    

    @

    Ok, the error is quite clear the architecture of _xmlByteConsumed (used from inside of XMLDocumentParserLibxml2.o) is not x86_64 compatible. My problem is now, which of the used object files or libraries is offering the function? The function is for example provided by the libxml2.dylib library (which can be found on different places), but the ones I checked with the
    otool (otool -vf libxml2.dylib) are all x86_64 compatible.

    Does anyone has an suggestion how to go on, and how to find the library which clang is trying to link with QtWebkit?

    [Update]

    I was able to find out why he couldn't find libxml2.
    Actually he said he had a wrong architecture, but I guess having no architecture is also
    the wrong one …. anyway….

    The problem lied in @qt5/qtwebkit/Source/WebCore/WebCore.pri@

    here:

    @
    enable?(XSLT) {
    use?(LIBXML2) {
    mac {
    INCLUDEPATH += /usr/include/libxml2
    LIBS += -lxml2 -lxslt
    } else {
    PKGCONFIG += libxslt
    }
    } else {
    QT *= xmlpatterns
    }
    }
    @

    The include and the lib was not used. After removing enable? and use?
    Qt 5.0.1 was compiling and building.

    And now new question. How is the intended way to switch XSLT and LIBXML2 on?

    Thanks for your help.

    Mike
    

    www.topen.org

    1 Reply Last reply
    0
    • M Offline
      M Offline
      miketopen
      wrote on last edited by
      #2

      I also posted the problem in an other "subforum":http://qt-project.org/forums/viewthread/24905, but didn't got any answer. But finally today I had some time to dig deeper in the build scripts....

      Fortunately, I was able to solve the problem. It was the missing library libxslt, which caused the problem. After installing it with macports, the problem vanished. :-) I also suggested to change the
      requirement section "here":http://qt-project.org/wiki/Building_Qt_5_from_Git .

      Bests

      Mike

      www.topen.org

      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