Q_WEBENGINECORE_EXPORT QWebEngineFindTextResult has initializer but incomplete type

Author:

In addition to one of the cstdlib fix here – Gentoo building qtgui error – g++-v8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory we were unable to to build “dev-qt/qtwebengine-5.14.1“.

It appeared the problem was a wrong order of header includes just like the cstdlib and if you have used the fix with QMAKE_CFLAGS_ISYSTEM in /usr/lib64/qt5/mkspecs/common/gcc-base.conf you would encounter this error. Revert back the original value in /usr/lib64/qt5/mkspecs/common/gcc-base.conf (and probably it is a good idea to rebuild the entire system with “emerge -e”):

QMAKE_CFLAGS_ISYSTEM = -isystem

and continue the build from the point you’ve stopped with something like:

ebuild /usr/portage/dev-qt/qtwebengine/qtwebengine-5.14.1.ebuild compile
ebuild /usr/portage/dev-qt/qtwebengine/qtwebengine-5.14.1.ebuild install
ebuild /usr/portage/dev-qt/qtwebengine/qtwebengine-5.14.1.ebuild qmerge
rm -Rf /var/tmp/portage/dev-qt/qtwebengine-5.14.1/


And here is the whole error after several hours of compilation:

x86_64-pc-linux-gnu-g++ -c -march=haswell -O2 -fomit-frame-pointer -pipe -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WEBENGINE_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_QMLMODELS_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I. -I /usr/include/qt5 -I /usr/include/qt5/QtQuick -I /usr/include/qt5/QtGui -I /usr/include/qt5/QtQmlModels -I /usr/include/qt5/QtQml -I /usr/include/qt5/QtNetwork -I /usr/include/qt5/QtCore -I../../../include/QtWebEngineCore/5.14.1 -I../../../include/QtWebEngineCore/5.14.1/QtWebEngineCore -I../../../include/QtWebEngine/5.14.1 -I../../../include/QtWebEngine/5.14.1/QtWebEngine -I../../../include -I../../../include/QtWebEngine -I../../../include/QtWebEngineCore -I /usr/include/qt5/QtQuick/5.14.1 -I /usr/include/qt5/QtQuick/5.14.1/QtQuick -I /usr/include/qt5/QtQmlModels/5.14.1 -I /usr/include/qt5/QtQmlModels/5.14.1/QtQmlModels -I /usr/include/qt5/QtQml/5.14.1 -I /usr/include/qt5/QtQml/5.14.1/QtQml -I /usr/include/qt5/QtGui/5.14.1 -I /usr/include/qt5/QtGui/5.14.1/QtGui -I /usr/include/qt5/QtCore/5.14.1 -I /usr/include/qt5/QtCore/5.14.1/QtCore -I /usr/include/qt5/QtWebChannel -I /usr/include/qt5/QtPositioning -I.moc -I /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/plugin.o plugin.cpp
In file included from /usr/include/qt5/QtNetwork/qtnetworkglobal.h:44,
                 from /usr/include/qt5/QtQml/qtqmlglobal.h:51,
                 from /usr/include/qt5/QtQml/qqmlextensioninterface.h:43,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:45,
                 from plugin.cpp:40:
/usr/include/qt5/QtNetwork/qtnetwork-config.h:6: warning: "QT_LINKED_OPENSSL" redefined
 #define QT_LINKED_OPENSSL true
 
In file included from /usr/include/qt5/QtCore/qconfig.h:1,
                 from /usr/include/qt5/QtCore/qglobal.h:66,
                 from /usr/include/qt5/QtCore/qnamespace.h:43,
                 from /usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/qplugin.h:44,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:43,
                 from plugin.cpp:40:
/usr/include/qt5/Gentoo/gentoo-qconfig.h:8: note: this is the location of the previous definition
 #define QT_LINKED_OPENSSL
 
distcc[3430] ERROR: compile plugin.cpp on 192.168.0.101/16 failed
distcc[3430] (dcc_build_somewhere) Warning: remote compilation of 'plugin.cpp' failed, retrying locally
distcc[3430] Warning: failed to distribute plugin.cpp to 192.168.0.101/16, running locally instead
In file included from /usr/include/qt5/QtNetwork/qtnetworkglobal.h:44,
                 from /usr/include/qt5/QtQml/qtqmlglobal.h:51,
                 from /usr/include/qt5/QtQml/qqmlextensioninterface.h:43,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:45,
                 from plugin.cpp:40:
/usr/include/qt5/QtNetwork/qtnetwork-config.h:6: warning: "QT_LINKED_OPENSSL" redefined
 #define QT_LINKED_OPENSSL true
 
In file included from /usr/include/qt5/QtCore/qconfig.h:1,
                 from /usr/include/qt5/QtCore/qglobal.h:66,
                 from /usr/include/qt5/QtCore/qnamespace.h:43,
                 from /usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/qplugin.h:44,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:43,
                 from plugin.cpp:40:
/usr/include/qt5/Gentoo/gentoo-qconfig.h:8: note: this is the location of the previous definition
 #define QT_LINKED_OPENSSL
 
In file included from ../../../include/QtWebEngineCore/qwebenginefindtextresult.h:1,
                 from plugin.cpp:58:
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:55:30: error: variable 'Q_WEBENGINECORE_EXPORT QWebEngineFindTextResult' has initializer but incomplete type
 class Q_WEBENGINECORE_EXPORT QWebEngineFindTextResult {
                              ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/qplugin.h:44,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:43,
                 from plugin.cpp:40:
/usr/include/qt5/QtCore/qobjectdefs.h:192:1: error: expected primary-expression before 'public'
 public: \
 ^~~~~~
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:56:5: note: in expansion of macro 'Q_GADGET'
     Q_GADGET
     ^~~~~~~~
/usr/include/qt5/QtCore/qobjectdefs.h:192:1: error: expected '}' before 'public'
 public: \
 ^~~~~~
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:56:5: note: in expansion of macro 'Q_GADGET'
     Q_GADGET
     ^~~~~~~~
In file included from ../../../include/QtWebEngineCore/qwebenginefindtextresult.h:1,
                 from plugin.cpp:58:
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:55:55: note: to match this '{'
 class Q_WEBENGINECORE_EXPORT QWebEngineFindTextResult {
                                                       ^
In file included from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/qplugin.h:44,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:43,
                 from plugin.cpp:40:
/usr/include/qt5/QtCore/qobjectdefs.h:192:1: error: expected ',' or ';' before 'public'
 public: \
 ^~~~~~
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:56:5: note: in expansion of macro 'Q_GADGET'
     Q_GADGET
     ^~~~~~~~
/usr/include/qt5/QtCore/qobjectdefs.h:196:1: error: expected unqualified-id before 'private'
 private: \
 ^~~~~~~
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:56:5: note: in expansion of macro 'Q_GADGET'
     Q_GADGET
     ^~~~~~~~
In file included from /usr/include/qt5/QtCore/qglobal.h:105,
                 from /usr/include/qt5/QtCore/qnamespace.h:43,
                 from /usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/include/qt5/QtCore/qobject.h:46,
                 from /usr/include/qt5/QtCore/qplugin.h:44,
                 from /usr/include/qt5/QtQml/qqmlextensionplugin.h:43,
                 from plugin.cpp:40:
/usr/include/qt5/QtCore/qcompilerdetection.h:1254:49: error: expected declaration before end of line
 #define QT_DO_PRAGMA(text)                      _Pragma(#text)
                                                 ^~~~~~~
/usr/include/qt5/QtCore/qcompilerdetection.h:1292:49: note: in expansion of macro 'QT_DO_PRAGMA'
 #  define QT_WARNING_PUSH                       QT_DO_PRAGMA(GCC diagnostic push)
                                                 ^~~~~~~~~~~~
/usr/include/qt5/QtCore/qobjectdefs.h:197:5: note: in expansion of macro 'QT_WARNING_PUSH'
     QT_WARNING_PUSH \
     ^~~~~~~~~~~~~~~
../../../include/QtWebEngineCore/../../src/core/api/qwebenginefindtextresult.h:56:5: note: in expansion of macro 'Q_GADGET'
     Q_GADGET
     ^~~~~~~~
distcc[3430] ERROR: compile plugin.cpp on localhost failed
make[3]: *** [Makefile:902: .obj/plugin.o] Error 1
make[3]: Leaving directory '/var/tmp/portage/dev-qt/qtwebengine-5.14.1/work/qtwebengine-everywhere-src-5.14.1/src/webengine/plugin'
make[2]: *** [Makefile:67: sub-plugin-plugin-pro-make_first] Error 2
make[2]: Leaving directory '/var/tmp/portage/dev-qt/qtwebengine-5.14.1/work/qtwebengine-everywhere-src-5.14.1/src/webengine'
make[1]: *** [Makefile:153: sub-webengine-make_first] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-qt/qtwebengine-5.14.1/work/qtwebengine-everywhere-src-5.14.1/src'

Leave a Reply

Your email address will not be published. Required fields are marked *