Wireshark-dev: Re: [Wireshark-dev] Wireshark build issue on osx related to qt5
From: Jonne Zutt <jonne.zutt.ml@xxxxxxxxx>
Date: Wed, 27 Apr 2016 14:50:13 +0200
The problem was that I had Qt (version 4) libraries that occurred earlier in my include path (in my case, in /usr/local/include).
When I added the right Qt5 include folder to the start of the include list, it all worked fine.

On Thu, Mar 17, 2016 at 3:54 PM, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
Hi all,

I'm trying to build the wireshark gui from a very recent git checkout
(sha 8def5c40ded9e31cda4cdd897dd19537fe8fe5d9).

The build completed successfully when I had not set QT_DIR.
Now, I'm rebuilding after setting QT_DIR to /usr/local/Cellar/qt5/5.5.1_2,
which is the latest according to my brew.
    
Some other versions I'm using are g++-5 from Homebrew (5.3.0), cmake 3.5.0, and osx El Capitan 10.11.3.

The compile error that I get is the below.
Anybody already knows a way to fix that?

Thanks,
JZ.


Scanning dependencies of target qtui
[ 65%] Building CXX object ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QApplication:1:0,
                 from /Users/jz/ThirdParty/wireshark/build/ui/qt/ui_about_dialog.h:14,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:25:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qapplication.h:100:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qapplication.h:136:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qapplication.h:166:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qabstractitemview.h:39:0,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qheaderview.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QHeaderView:1,
                 from /Users/jz/ThirdParty/wireshark/build/ui/qt/ui_about_dialog.h:19,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:25:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Headers/qitemselectionmodel.h:85:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QHeaderView:1:0,
                 from /Users/jz/ThirdParty/wireshark/build/ui/qt/ui_about_dialog.h:19,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:25:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qheaderview.h:111:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qheaderview.h:118:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qheaderview.h:133:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5, 0)
                        ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Headers/QUrl:1:0,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:65:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Headers/qurl.h:277:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5,0)
                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Headers/qurl.h:408:24: error: missing binary operator before token "("
 #if QT_DEPRECATED_SINCE(5,0)
                        ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qwidget.h:45:0,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qdialog.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QDialog:1,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.h:25,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:24:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:44:24: error: variable 'Q_WIDGETS_EXPORT QSizePolicy' has initializer but incomplete type
 class Q_WIDGETS_EXPORT QSizePolicy
                        ^
In file included from /usr/local/include/QtGui/qwindowdefs.h:45:0,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qwidget.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qdialog.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QDialog:1,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.h:25,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:24:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:46:5: error: expected primary-_expression_ before 'public'
     Q_GADGET
     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:46:5: error: expected '}' before 'public'
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:46:5: error: expected ',' or ';' before 'public'
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:46:5: error: expected unqualified-id before 'private'
     Q_GADGET
     ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qwidget.h:45:0,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qdialog.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QDialog:1,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.h:25,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:24:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:59:19: error: 'GrowFlag' was not declared in this scope
         Minimum = GrowFlag,
                   ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:60:19: error: 'ShrinkFlag' was not declared in this scope
         Maximum = ShrinkFlag,
                   ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:61:21: error: 'GrowFlag' was not declared in this scope
         Preferred = GrowFlag | ShrinkFlag,
                     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:61:32: error: 'ShrinkFlag' was not declared in this scope
         Preferred = GrowFlag | ShrinkFlag,
                                ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:62:28: error: 'GrowFlag' was not declared in this scope
         MinimumExpanding = GrowFlag | ExpandFlag,
                            ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:62:39: error: 'ExpandFlag' was not declared in this scope
         MinimumExpanding = GrowFlag | ExpandFlag,
                                       ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:63:21: error: 'GrowFlag' was not declared in this scope
         Expanding = GrowFlag | ShrinkFlag | ExpandFlag,
                     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:63:32: error: 'ShrinkFlag' was not declared in this scope
         Expanding = GrowFlag | ShrinkFlag | ExpandFlag,
                                ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:63:45: error: 'ExpandFlag' was not declared in this scope
         Expanding = GrowFlag | ShrinkFlag | ExpandFlag,
                                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:64:19: error: 'ShrinkFlag' was not declared in this scope
         Ignored = ShrinkFlag | GrowFlag | IgnoreFlag
                   ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:64:32: error: 'GrowFlag' was not declared in this scope
         Ignored = ShrinkFlag | GrowFlag | IgnoreFlag
                                ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:64:43: error: 'IgnoreFlag' was not declared in this scope
         Ignored = ShrinkFlag | GrowFlag | IgnoreFlag
                                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:5: error: expected constructor, destructor, or type conversion before 'enum'
     enum ControlType {
     ^
In file included from /usr/local/include/QtCore/qnamespace.h:45:0,
                 from /usr/local/include/QtCore/qobjectdefs.h:45,
                 from /usr/local/include/QtGui/qwindowdefs.h:45,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qwidget.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qdialog.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QDialog:1,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.h:25,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:24:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:85:5: error: 'ControlType' was not declared in this scope
     Q_DECLARE_FLAGS(ControlTypes, ControlType)
     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:85:5: error: template argument 1 is invalid
     Q_DECLARE_FLAGS(ControlTypes, ControlType)
     ^
In file included from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qwidget.h:45:0,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qdialog.h:37,
                 from /usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/QDialog:1,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.h:25,
                 from /Users/jz/ThirdParty/wireshark/ui/qt/about_dialog.cpp:24:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'int QSizePolicy()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:87:21: error: only constructors take member initializers
     QSizePolicy() : data(0) { }
                     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:89:53: error: 'ControlType' has not been declared
     QSizePolicy(Policy horizontal, Policy vertical, ControlType type = DefaultType)
                                                     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:89:72: error: 'DefaultType' was not declared in this scope
     QSizePolicy(Policy horizontal, Policy vertical, ControlType type = DefaultType)
                                                                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'int QSizePolicy(Policy, Policy, int)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:90:11: error: only constructors take member initializers
         : data(0) {
           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:9: error: 'bits' was not declared in this scope
         bits.horPolicy = horizontal;
         ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:93:28: error: 'setControlType' was not declared in this scope
         setControlType(type);
                            ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:95:31: error: non-member function 'Policy horizontalPolicy()' cannot have cv-qualifier
     Policy horizontalPolicy() const { return static_cast<Policy>(bits.horPolicy); }
                               ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'Policy horizontalPolicy()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:95:66: error: 'bits' was not declared in this scope
     Policy horizontalPolicy() const { return static_cast<Policy>(bits.horPolicy); }
                                                                  ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:96:29: error: non-member function 'Policy verticalPolicy()' cannot have cv-qualifier
     Policy verticalPolicy() const { return static_cast<Policy>(bits.verPolicy); }
                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'Policy verticalPolicy()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:96:64: error: 'bits' was not declared in this scope
     Policy verticalPolicy() const { return static_cast<Policy>(bits.verPolicy); }
                                                                ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:97:5: error: 'ControlType' does not name a type
     ControlType controlType() const;
     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setHorizontalPolicy(Policy)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:99:42: error: 'bits' was not declared in this scope
     void setHorizontalPolicy(Policy d) { bits.horPolicy = d; }
                                          ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setVerticalPolicy(Policy)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:100:40: error: 'bits' was not declared in this scope
     void setVerticalPolicy(Policy d) { bits.verPolicy = d; }
                                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:101:25: error: variable or field 'setControlType' declared void
     void setControlType(ControlType type);
                         ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:101:25: error: 'ControlType' was not declared in this scope
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:103:44: error: non-member function 'Qt::Orientations expandingDirections()' cannot have cv-qualifier
     Qt::Orientations expandingDirections() const {
                                            ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'Qt::Orientations expandingDirections()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:104:40: error: 'ExpandFlag' was not declared in this scope
         return ( (verticalPolicy()   & ExpandFlag) ? Qt::Vertical   : Qt::Orientations() )
                                        ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setHeightForWidth(bool)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:108:38: error: 'bits' was not declared in this scope
     void setHeightForWidth(bool b) { bits.hfw = b;  }
                                      ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:109:30: error: non-member function 'bool hasHeightForWidth()' cannot have cv-qualifier
     bool hasHeightForWidth() const { return bits.hfw; }
                              ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'bool hasHeightForWidth()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:109:45: error: 'bits' was not declared in this scope
     bool hasHeightForWidth() const { return bits.hfw; }
                                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setWidthForHeight(bool)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:38: error: 'bits' was not declared in this scope
     void setWidthForHeight(bool b) { bits.wfh = b;  }
                                      ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:30: error: non-member function 'bool hasWidthForHeight()' cannot have cv-qualifier
     bool hasWidthForHeight() const { return bits.wfh; }
                              ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'bool hasWidthForHeight()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:45: error: 'bits' was not declared in this scope
     bool hasWidthForHeight() const { return bits.wfh; }
                                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:113:27: error: 'QSizePolicy' does not name a type
     bool operator==(const QSizePolicy& s) const { return data == s.data; }
                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:113:43: error: non-member function 'bool operator==(const int&)' cannot have cv-qualifier
     bool operator==(const QSizePolicy& s) const { return data == s.data; }
                                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:113:43: error: 'bool operator==(const int&)' must have an argument of class or enumerated type
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:114:27: error: 'QSizePolicy' does not name a type
     bool operator!=(const QSizePolicy& s) const { return data != s.data; }
                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:114:43: error: non-member function 'bool operator!=(const int&)' cannot have cv-qualifier
     bool operator!=(const QSizePolicy& s) const { return data != s.data; }
                                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:114:43: error: 'bool operator!=(const int&)' must have an argument of class or enumerated type
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:115:30: error: expected constructor, destructor, or type conversion before ';' token
     operator QVariant() const;
                              ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:117:29: error: non-member function 'int horizontalStretch()' cannot have cv-qualifier
     int horizontalStretch() const { return static_cast<int>(bits.horStretch); }
                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'int horizontalStretch()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:117:61: error: 'bits' was not declared in this scope
     int horizontalStretch() const { return static_cast<int>(bits.horStretch); }
                                                             ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:118:27: error: non-member function 'int verticalStretch()' cannot have cv-qualifier
     int verticalStretch() const { return static_cast<int>(bits.verStretch); }
                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'int verticalStretch()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:118:59: error: 'bits' was not declared in this scope
     int verticalStretch() const { return static_cast<int>(bits.verStretch); }
                                                           ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setHorizontalStretch(int)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:119:52: error: 'bits' was not declared in this scope
     void setHorizontalStretch(int stretchFactor) { bits.horStretch = static_cast<quint32>(qBound(0, stretchFactor, 255)); }
                                                    ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setVerticalStretch(int)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:120:50: error: 'bits' was not declared in this scope
     void setVerticalStretch(int stretchFactor) { bits.verStretch = static_cast<quint32>(qBound(0, stretchFactor, 255)); }
                                                  ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:122:33: error: non-member function 'bool retainSizeWhenHidden()' cannot have cv-qualifier
     bool retainSizeWhenHidden() const { return bits.retainSizeWhenHidden; }
                                 ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'bool retainSizeWhenHidden()':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:122:48: error: 'bits' was not declared in this scope
     bool retainSizeWhenHidden() const { return bits.retainSizeWhenHidden; }
                                                ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'void setRetainSizeWhenHidden(bool)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:123:53: error: 'bits' was not declared in this scope
     void setRetainSizeWhenHidden(bool retainSize) { bits.retainSizeWhenHidden = retainSize; }
                                                     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:128:1: error: expected unqualified-id before 'private'
 private:
 ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:131:5: error: 'friend' used outside of class
     friend Q_WIDGETS_EXPORT QDataStream &operator>>(QDataStream &, QSizePolicy &);
     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:131:41: error: expected initializer before '&' token
     friend Q_WIDGETS_EXPORT QDataStream &operator>>(QDataStream &, QSizePolicy &);
                                         ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: In function 'int QSizePolicy(int)':
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:133:26: error: only constructors take member initializers
     QSizePolicy(int i) : data(i) { }
                          ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h: At global scope:
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:148:5: error: namespace-scope anonymous aggregates must be static
     };
     ^
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Headers/qsizepolicy.h:149:1: error: expected declaration before '}' token
 };
 ^
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/about_dialog.cpp.o] Error 1
make[1]: *** [ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [all] Error 2