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. Build failure of Qt 5.2 on Mac OS 10.9 with Xcode 5.0.2 - can't find MacPorts ICU
Forum Updated to NodeBB v4.3 + New Features

Build failure of Qt 5.2 on Mac OS 10.9 with Xcode 5.0.2 - can't find MacPorts ICU

Scheduled Pinned Locked Moved Installation and Deployment
15 Posts 4 Posters 7.1k 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.
  • Z Offline
    Z Offline
    ZOleg73
    wrote on last edited by
    #5

    and one more error:
    @....
    loader/FrameLoader.cpp:877:44: error: member access into incomplete type 'WebCore::Archive'
    ArchiveResource* mainResource = archive->mainResource();
    ^
    loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
    class Archive;
    ^
    loader/FrameLoader.cpp:882:47: error: member access into incomplete type 'WebCore::ArchiveResource'
    SubstituteData substituteData(mainResource->data(), mainResource->mimeType(), mainResource->textEncoding(), KURL());
    ^
    loader/DocumentLoader.h:63:11: note: forward declaration of 'WebCore::ArchiveResource'
    class ArchiveResource;
    ^
    loader/FrameLoader.cpp:884:41: error: member access into incomplete type 'WebCore::ArchiveResource'
    ResourceRequest request(mainResource->url());
    ^
    loader/DocumentLoader.h:63:11: note: forward declaration of 'WebCore::ArchiveResource'
    class ArchiveResource;
    ^
    In file included from loader/FrameLoader.cpp:36:
    In file included from loader/FrameLoader.h:38:
    In file included from dom/IconURL.h:34:
    In file included from platform/KURL.h:30:
    In file included from ../WTF/wtf/HashMap.h:24:
    In file included from ../WTF/wtf/HashTable.h:28:
    In file included from ../WTF/wtf/HashTraits.h:24:
    In file included from ../WTF/wtf/HashFunctions.h:24:
    In file included from ../WTF/wtf/RefPtr.h:29:
    ../WTF/wtf/PassRefPtr.h:52:16: error: member access into incomplete type 'WebCore::Archive'
    ptr->deref();
    ^
    ../WTF/wtf/PassRefPtr.h:67:39: note: in instantiation of function template specialization 'WTF::derefIfNotNullWebCore::Archive' requested here
    ALWAYS_INLINE ~PassRefPtr() { derefIfNotNull(m_ptr); }
    ^
    loader/FrameLoader.cpp:852:39: note: in instantiation of member function 'WTF::PassRefPtrWebCore::Archive::~PassRefPtr' requested here
    RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName(), url);
    ^
    loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
    class Archive;
    ^
    In file included from loader/FrameLoader.cpp:36:
    In file included from loader/FrameLoader.h:38:
    In file included from dom/IconURL.h:34:
    In file included from platform/KURL.h:30:
    In file included from ../WTF/wtf/HashMap.h:24:
    In file included from ../WTF/wtf/HashTable.h:28:
    In file included from ../WTF/wtf/HashTraits.h:24:
    In file included from ../WTF/wtf/HashFunctions.h:24:
    ../WTF/wtf/RefPtr.h:62:35: error: no matching function for call to 'derefIfNotNull'
    ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
    ^~~~~~~~~~~~~~
    loader/FrameLoader.cpp:852:39: note: in instantiation of member function 'WTF::RefPtrWebCore::Archive::~RefPtr' requested here
    RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName(), url);
    ^
    ../WTF/wtf/PassRefPtr.h:49:48: note: candidate template ignored: substitution failure [with T = WebCore::Archive]
    template<typename T> REF_DEREF_INLINE void derefIfNotNull(T* ptr)
    ^
    ../WTF/wtf/PassRefPtr.h:46:16: error: member access into incomplete type 'WebCore::Archive'
    ptr->ref();
    ^
    ../WTF/wtf/PassRefPtr.h:60:43: note: in instantiation of function template specialization 'WTF::refIfNotNullWebCore::Archive' requested here
    PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
    ^
    loader/FrameLoader.cpp:890:32: note: in instantiation of member function 'WTF::PassRefPtrWebCore::Archive::PassRefPtr' requested here
    documentLoader->setArchive(archive.get());
    ^
    loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
    class Archive;
    ^
    6 errors generated.
    make[3]: *** [.obj/debug/loader/FrameLoader.o] Error 1
    make[2]: *** [debug-all] Error 2
    make[1]: *** [sub-Target-pri-make_first-ordered] Error 2
    make: *** [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
    ZOleg-Mac:qtwebkit zoleg$
    @

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZOleg73
      wrote on last edited by
      #6

      Any news from developers of Qt?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgraber
        wrote on last edited by
        #7

        I am hitting this also. The root of the issue is that the file which is failing to compile is an objective-c file. The way the configure script is written, it is taking the include paths you specified and adding them to QMAKEs CFLAGS and CXXFLAGS. Unfortunately, when compiling objective-c, neither of these variables are included. I just kicked off my build after making a change to the configure script in qtbase/configure which I believe should fix it. I will post if this doesn't work ... builds take a long time.

        Search for I_FLAGS in the configure file. Add a new flag called INC_FLAGS. In the case statement that is setting the I_FLAGS, add a line to set the INC_FLAGS ,but leave out the "-I". Then search for where the script is add the QMake variable (it will be QMakeVar add QMAKE_CXXFLAGS I_FLAGS). You will see that the script is setting the CFLAGS and CXXFLAGS. Instead of setting them, set the "INCLUDEPATH" (no QMAKE prefix) and pass INC_FLAGS. I use a new variable because INCLUDEPATH does not want "-I" and the I_FLAGS variable is used in many places and I didn't want to change them.

        One thing to note is to make sure your install_name is correct for the ICU libraries. My ICU libraries were custom built in a temp directory and the install_name was not correct and at points in the build, they will try to load. Either fix the install_name or export DYLD_LIBRARY_PATH to get around it

        HTH. This is definitely a bug in the qt build system. I don't know if the way I fixed it is the way they will eventually, but it seemed the most "correct"

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgraber
          wrote on last edited by
          #8

          Update ... my fix for the configure file to set INCLUDEPATH got me past most of the issues. Now I have hit an issue because Qt links to icucore, an internal (private) icu build for Mac. There is an interesting thread on this "here":https://bugreports.qt-project.org/browse/QTBUG-31419#comment-224370. To workaround this, also I have edited the following (I commented out the INCLUDEPATH because I added my own -I for my built ICU headers so they shouldn't be needed):

          qtwebkit/Source/WebCore/Target.pri --
          commented out "INCLUDEPATH += $$PWD/icu"

          qtwebkit/Source/WTF/WTF.pri --
          commented out "INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WTF/icu"
          changed "-licucore" to "-licui18n -licuuc -licudata"

          I will let you know if this works. If someone else has gotten past this, let me know.

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZOleg73
            wrote on last edited by
            #9

            Ok, thanks.
            I already change qtwebkit/Source/WebCore/Target.pri and qtwebkit/Source/WebCore/Target.pri, but build stop with error as i posted above.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lgraber
              wrote on last edited by
              #10

              I was able to eventually complete my build linking successfully to my icu binaries. I had to disable building WebKit2 and also the webkit/examples because they had issues that I don't think were related to icu. I don't care about WebKit2 yet so I moved forward. Let me know if you don't get past it.

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZOleg73
                wrote on last edited by
                #11

                Please post all your diffs to sources:
                diff -ruN oldsrc newsrc >qt520.diff

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lgraber
                  wrote on last edited by
                  #12

                  This is the set related to the ICU issue. There are also some changes but they are not related to ICU and it makes my post too long. Note, I also deleted the qtbase/examples and qtbase/tests.

                  HTH (Sorry I can't seem to get it formatted right so I am just pasting)

                  diff -rup /Users/lgraber/dev/third-party/qt/5.2/upstream/qtbase/configure /Users/lgraber/dev/third-party/qt/5.2/local/qtbase/configure
                  --- /Users/lgraber/dev/third-party/qt/5.2/upstream/qtbase/configure 2013-12-10 13:55:53.000000000 -0800
                  +++ /Users/lgraber/dev/third-party/qt/5.2/local/qtbase/configure 2013-12-19 23:29:03.000000000 -0800
                  @@ -695,6 +695,7 @@ CFG_FRAMEWORK=auto
                  DEFINES=
                  D_FLAGS=
                  I_FLAGS=
                  +INC_FLAGS=
                  L_FLAGS=
                  RPATH_FLAGS=
                  W_FLAGS=
                  @@ -1986,6 +1987,7 @@ while [ "$#" -gt 0 ]; do
                  ;;
                  add_ipath)
                  I_FLAGS="$I_FLAGS -I\"${VAL}""

                  • INC_FLAGS="$INC_FLAGS \"${VAL}""
                    ;;
                    add_lpath)
                    L_FLAGS="$L_FLAGS -L\"${VAL}""
                    @@ -5885,10 +5887,9 @@ if [ "$CFG_RPATH" = "yes" ]; then
                    QT_CONFIG="$QT_CONFIG rpath"
                    fi

                  -if [ '!' -z "$I_FLAGS" ]; then
                  +if [ '!' -z "$INC_FLAGS" ]; then
                  # add the user define include paths

                  • QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
                  • QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
                  • QMakeVar add INCLUDEPATH "$INC_FLAGS"
                    fi

                  if [ '!' -z "$W_FLAGS" ]; then
                  diff -rup /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/QtWebKit.pro /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/QtWebKit.pro
                  --- /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/QtWebKit.pro 2013-12-10 13:57:26.000000000 -0800
                  +++ /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/QtWebKit.pro 2013-12-20 14:29:51.000000000 -0800
                  @@ -39,8 +39,8 @@ build?(webkit1) {
                  SUBDIRS += tests
                  }

                  • examples.file = WebKit/qt/examples/examples.pro
                  • examples.CONFIG += no_default_target
                  • examples.makefile = Makefile
                  • SUBDIRS += examples
                    +# examples.file = WebKit/qt/examples/examples.pro
                    +# examples.CONFIG += no_default_target
                    +# examples.makefile = Makefile
                    +# SUBDIRS += examples
                    }
                    diff -rup /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/WTF/WTF.pri /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/WTF/WTF.pri
                    --- /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/WTF/WTF.pri 2013-12-10 13:57:32.000000000 -0800
                    +++ /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/WTF/WTF.pri 2013-12-20 10:06:05.000000000 -0800
                    @@ -11,8 +11,10 @@ INCLUDEPATH += $$PWD
                    mac {

                    Mac OS does ship libicu but not the associated header files.

                    Therefore WebKit provides adequate header files.

                  • INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WTF/icu
                  • LIBS += -licucore
                  • Modifications since we are using our own ICU library

                  • INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WTF/icu

                  • LIBS += -licui18n -licuuc -licudata
                    } else {
                    contains(QT_CONFIG,icu) {
                    win32: LIBS += -licuin -licuuc -licudt
                    diff -rup /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/WebCore/Target.pri /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/WebCore/Target.pri
                    --- /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Source/WebCore/Target.pri 2013-12-10 13:57:30.000000000 -0800
                    +++ /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Source/WebCore/Target.pri 2013-12-20 10:09:06.000000000 -0800
                    @@ -2981,7 +2981,9 @@ contains(QT_CONFIG,icu)|mac: SOURCES +=
                    mac {

                    For Mac we use the same SmartReplace implementation as the Apple port.

                    SOURCES += editing/SmartReplaceCF.cpp
                  • INCLUDEPATH += $$PWD/icu
                  • We are using our own ice headers

                  • INCLUDEPATH += $$PWD/icu

                  } else {
                  SOURCES += editing/SmartReplaceICU.cpp
                  }
                  diff -rup /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Tools/qmake/mkspecs/features/configure.prf /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Tools/qmake/mkspecs/features/configure.prf
                  --- /Users/lgraber/dev/third-party/qt/5.2/upstream/qtwebkit/Tools/qmake/mkspecs/features/configure.prf 2013-12-10 13:57:33.000000000 -0800
                  +++ /Users/lgraber/dev/third-party/qt/5.2/local/qtwebkit/Tools/qmake/mkspecs/features/configure.prf 2013-12-20 12:43:22.000000000 -0800
                  @@ -49,7 +49,7 @@ defineTest(runConfigure) {

                   WEBKIT_CONFIG += \
                       build_webkit1 \
                  
                  •    build_webkit2 \
                    

                  +# build_webkit2
                  build_tests
                  $$WEBKIT_TOOLS_CONFIG

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZOleg73
                    wrote on last edited by
                    #13

                    [quote author="lgraber" date="1387696476"]This is the set related to the ICU issue. There are also some changes but they are not related to ICU and it makes my post too long. Note, I also deleted the qtbase/examples and qtbase/tests.

                    HTH (Sorry I can't seem to get it formatted right so I am just pasting)

                    ...
                    [/quote]

                    Thanks!

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      ZOleg73
                      wrote on last edited by
                      #14

                      again error:
                      @
                      ...
                      loader/FrameLoader.cpp:877:44: error: member access into incomplete type 'WebCore::Archive'
                      ArchiveResource* mainResource = archive->mainResource();
                      ^
                      loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
                      class Archive;
                      ^
                      loader/FrameLoader.cpp:882:47: error: member access into incomplete type 'WebCore::ArchiveResource'
                      SubstituteData substituteData(mainResource->data(), mainResource->mimeType(), mainResource->textEncoding(), KURL());
                      ^
                      loader/DocumentLoader.h:63:11: note: forward declaration of 'WebCore::ArchiveResource'
                      class ArchiveResource;
                      ^
                      loader/FrameLoader.cpp:884:41: error: member access into incomplete type 'WebCore::ArchiveResource'
                      ResourceRequest request(mainResource->url());
                      ^
                      loader/DocumentLoader.h:63:11: note: forward declaration of 'WebCore::ArchiveResource'
                      class ArchiveResource;
                      ^
                      In file included from loader/FrameLoader.cpp:36:
                      In file included from loader/FrameLoader.h:38:
                      In file included from dom/IconURL.h:34:
                      In file included from platform/KURL.h:30:
                      In file included from ../WTF/wtf/HashMap.h:24:
                      In file included from ../WTF/wtf/HashTable.h:28:
                      In file included from ../WTF/wtf/HashTraits.h:24:
                      In file included from ../WTF/wtf/HashFunctions.h:24:
                      In file included from ../WTF/wtf/RefPtr.h:29:
                      ../WTF/wtf/PassRefPtr.h:52:16: error: member access into incomplete type 'WebCore::Archive'
                      ptr->deref();
                      ^
                      ../WTF/wtf/PassRefPtr.h:67:39: note: in instantiation of function template specialization 'WTF::derefIfNotNullWebCore::Archive' requested here
                      ALWAYS_INLINE ~PassRefPtr() { derefIfNotNull(m_ptr); }
                      ^
                      loader/FrameLoader.cpp:852:39: note: in instantiation of member function 'WTF::PassRefPtrWebCore::Archive::~PassRefPtr' requested here
                      RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName(), url);
                      ^
                      loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
                      class Archive;
                      ^
                      In file included from loader/FrameLoader.cpp:36:
                      In file included from loader/FrameLoader.h:38:
                      In file included from dom/IconURL.h:34:
                      In file included from platform/KURL.h:30:
                      In file included from ../WTF/wtf/HashMap.h:24:
                      In file included from ../WTF/wtf/HashTable.h:28:
                      In file included from ../WTF/wtf/HashTraits.h:24:
                      In file included from ../WTF/wtf/HashFunctions.h:24:
                      ../WTF/wtf/RefPtr.h:62:35: error: no matching function for call to 'derefIfNotNull'
                      ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
                      ^~~~~~~~~~~~~~
                      loader/FrameLoader.cpp:852:39: note: in instantiation of member function 'WTF::RefPtrWebCore::Archive::~RefPtr' requested here
                      RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName(), url);
                      ^
                      ../WTF/wtf/PassRefPtr.h:49:48: note: candidate template ignored: substitution failure [with T = WebCore::Archive]
                      template<typename T> REF_DEREF_INLINE void derefIfNotNull(T* ptr)
                      ^
                      ../WTF/wtf/PassRefPtr.h:46:16: error: member access into incomplete type 'WebCore::Archive'
                      ptr->ref();
                      ^
                      ../WTF/wtf/PassRefPtr.h:60:43: note: in instantiation of function template specialization 'WTF::refIfNotNullWebCore::Archive' requested here
                      PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
                      ^
                      loader/FrameLoader.cpp:890:32: note: in instantiation of member function 'WTF::PassRefPtrWebCore::Archive::PassRefPtr' requested here
                      documentLoader->setArchive(archive.get());
                      ^
                      loader/FrameLoader.h:51:7: note: forward declaration of 'WebCore::Archive'
                      class Archive;
                      ^
                      6 errors generated.
                      make[4]: *** [.obj/debug/loader/FrameLoader.o] Error 1
                      make[3]: *** [debug-all] Error 2
                      make[2]: *** [sub-Target-pri-make_first-ordered] Error 2
                      make[1]: *** [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
                      make: *** [module-qtwebkit-make_first] Error 2
                      bash-3.2$@

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        lgraber
                        wrote on last edited by
                        #15

                        Hmmm ... I haven't seen those. What platform are you specifying for qt. I am using macx-clang. What is the version of clang you have on your machine ('clang - v'). I am running 4.2. I didn't have 5.0.2 of XCode but I just updated it and tried kicking off my build again to see if I can hit the errors you are seeing.

                        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