Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-35667

QtWebKit (libWTF) build needs to link icuuc and icui18n for symbols _u_charDirection_51, _u_charType_5 etc.

XMLWordPrintable

    • 43736f1be8c933d08607f991c6b36f0f332717a0

      While building QtWebKit, the following error is encountered:

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -o ../../bin/jsc .obj/debug/jsc.o   -F/Users/williamg/Projects/VertusLLP/Development/Vendor/qt-everywhere-opensource-src-5.2.0-build/qtbase/lib -L/opt/local/lib -Wl,-force_load,/Users/williamg/Projects/VertusLLP/Development/Vendor/qt-everywhere-opensource-src-5.2.0-build/qtwebkit/Source/JavaScriptCore/debug/libJavaScriptCore_debug.a -L/Users/williamg/Projects/VertusLLP/Development/Vendor/qt-everywhere-opensource-src-5.2.0-build/qtwebkit/Source/JavaScriptCore/debug -Wl,-force_load,/Users/williamg/Projects/VertusLLP/Development/Vendor/qt-everywhere-opensource-src-5.2.0-build/qtwebkit/Source/WTF/debug/libWTF_debug.a -L/Users/williamg/Projects/VertusLLP/Development/Vendor/qt-everywhere-opensource-src-5.2.0-build/qtwebkit/Source/WTF/debug -licucore -framework AppKit -framework QtCore
      Undefined symbols for architecture x86_64:
        "_u_charDirection_51", referenced from:
            WTF::Unicode::direction(int) in libWTF_debug.a(Base64.o)
            WTF::Unicode::direction(int) in libWTF_debug.a(StringImpl.o)
            WTF::Unicode::direction(int) in libWTF_debug.a(WTFString.o)
        "_u_charType_51", referenced from:
            WTF::Unicode::category(int) in libJavaScriptCore_debug.a(Lexer.o)
            WTF::Unicode::isSeparatorSpace(int) in libJavaScriptCore_debug.a(Lexer.o)
            WTF::Unicode::isSeparatorSpace(int) in libJavaScriptCore_debug.a(FunctionPrototype.o)
            WTF::Unicode::isSeparatorSpace(int) in libJavaScriptCore_debug.a(JSGlobalObjectFunctions.o)
        "_u_foldCase_51", referenced from:
            WTF::Unicode::foldCase(int) in libWTF_debug.a(StringImpl.o)
        "_u_memcasecmp_51", referenced from:
            WTF::Unicode::umemcasecmp(unsigned short const*, unsigned short const*, int) in libWTF_debug.a(StringImpl.o)
        "_u_strFoldCase_51", referenced from:
            WTF::Unicode::foldCase(unsigned short*, int, unsigned short const*, int, bool*) in libWTF_debug.a(StringImpl.o)
        "_u_strToLower_51", referenced from:
            WTF::Unicode::toLower(unsigned short*, int, unsigned short const*, int, bool*) in libWTF_debug.a(StringImpl.o)
        "_u_strToUpper_51", referenced from:
            WTF::Unicode::toUpper(unsigned short*, int, unsigned short const*, int, bool*) in libWTF_debug.a(StringImpl.o)
        "_u_tolower_51", referenced from:
            WTF::Unicode::toLower(int) in libJavaScriptCore_debug.a(YarrInterpreter.o)
            WTF::Unicode::toLower(int) in libWTF_debug.a(StringImpl.o)
        "_u_toupper_51", referenced from:
            WTF::Unicode::toUpper(int) in libJavaScriptCore_debug.a(YarrInterpreter.o)
            WTF::Unicode::toUpper(int) in libWTF_debug.a(StringImpl.o)
        "_ucol_close_51", referenced from:
            WTF::Collator::releaseCollator() in libWTF_debug.a(CollatorICU.o)
        "_ucol_getAttribute_51", referenced from:
            WTF::Collator::createCollator() const in libWTF_debug.a(CollatorICU.o)
        "_ucol_getLocaleByType_51", referenced from:
            WTF::Collator::createCollator() const in libWTF_debug.a(CollatorICU.o)
        "_ucol_open_51", referenced from:
            WTF::Collator::createCollator() const in libWTF_debug.a(CollatorICU.o)
        "_ucol_setAttribute_51", referenced from:
            WTF::Collator::createCollator() const in libWTF_debug.a(CollatorICU.o)
        "_ucol_strcoll_51", referenced from:
            WTF::Collator::collate(unsigned short const*, unsigned long, unsigned short const*, unsigned long) const in libWTF_debug.a(CollatorICU.o)
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[4]: *** [../../bin/jsc] Error 1
      make[3]: *** [debug] Error 2
      make[2]: *** [sub-jsc-pro-make_first-ordered] Error 2
      make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered] Error 2
      make: *** [module-qtwebkit-make_first] Error 2
      

      The reason for these missing symbols is /I think/ that libicuuc does not appear on the linker command line.

      forth:qt-everywhere-opensource-src-5.2.0-build williamg$ nm -A /opt/local/lib/libicu*.dylib | grep _u_charDirection_51
      /opt/local/lib/libicuuc.51.2.dylib: 000000000006fca0 T _u_charDirection_51
      /opt/local/lib/libicuuc.51.dylib: 000000000006fca0 T _u_charDirection_51
      /opt/local/lib/libicuuc.dylib: 000000000006fca0 T _u_charDirection_51
      forth:qt-everywhere-opensource-src-5.2.0-build williamg$ nm -A /opt/local/lib/libicu*.dylib | grep _ucol_close_51
      /opt/local/lib/libicui18n.51.2.dylib: 0000000000074070 T _ucol_close_51
      /opt/local/lib/libicui18n.51.dylib: 0000000000074070 T _ucol_close_51
      /opt/local/lib/libicui18n.dylib: 0000000000074070 T _ucol_close_51
      
      

      libicuuc and libicui18n should therefore be included as one of the linked libraries in the build for libWTF and libJavaScriptCore.

      It appears that adding these libraries to WTF.pri fixes the link error. I'll submit a patch via Gerrit.

      Configure command line is:

      ../qt-everywhere-opensource-src-5.2.0/configure -sdk macosx10.9 -warnings-are-errors -system-proxies -no-linuxfb -no-directfb -no-dbus -pch -optimized-qmake -v -no-compile-examples -nomake examples -no-glib -no-c++11 -opensource -confirm-license -force-debug-info -debug-and-release -prefix `(cd ../qt-everywhere-opensource-src-5.2.0-deploy/; pwd -P)` -icu -no-xcb -I /opt/local/include -L /opt/local/lib
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mibrunin Michael Bruning
            gallafent William Gallafent
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes