{"action":"opened","issue":{"url":"https://api.github.com/repos/PySide/pyside2/issues/79","repository_url":"https://api.github.com/repos/PySide/pyside2","labels_url":"https://api.github.com/repos/PySide/pyside2/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/PySide/pyside2/issues/79/comments","events_url":"https://api.github.com/repos/PySide/pyside2/issues/79/events","html_url":"https://github.com/PySide/pyside2/issues/79","id":142270883,"number":79,"title":"Build errors when compiling PySide2 against Qt5.6 ","user":{"login":"zhihaoadsk","id":15998754,"avatar_url":"https://avatars.githubusercontent.com/u/15998754?v=3","gravatar_id":"","url":"https://api.github.com/users/zhihaoadsk","html_url":"https://github.com/zhihaoadsk","followers_url":"https://api.github.com/users/zhihaoadsk/followers","following_url":"https://api.github.com/users/zhihaoadsk/following{/other_user}","gists_url":"https://api.github.com/users/zhihaoadsk/gists{/gist_id}","starred_url":"https://api.github.com/users/zhihaoadsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhihaoadsk/subscriptions","organizations_url":"https://api.github.com/users/zhihaoadsk/orgs","repos_url":"https://api.github.com/users/zhihaoadsk/repos","events_url":"https://api.github.com/users/zhihaoadsk/events{/privacy}","received_events_url":"https://api.github.com/users/zhihaoadsk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-21T06:51:50Z","updated_at":"2016-03-21T06:51:50Z","closed_at":null,"body":"[ 10%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/q\r\njsonarray_wrapper.cpp.obj\r\nqjsonarray_wrapper.cpp\r\n[ 10%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/q\r\njsondocument_wrapper.cpp.obj\r\nqjsondocument_wrapper.cpp\r\nD:\\PySide2NewGit\\pyside_build\\py2.7-qt5.6.0-64bit-release\\pyside2\\PySide2\\QtCore\r\n\\PySide2\\QtCore\\qjsondocument_wrapper.cpp(346) : error C2589: 'constant' : illegal token on right side of '::'\r\nD:\\PySide2NewGit\\pyside_build\\py2.7-qt5.6.0-64bit-release\\pyside2\\PySide2\\QtCore\r\n\\PySide2\\QtCore\\qjsondocument_wrapper.cpp(346) : error C2059: syntax error : '::'\r\n\r\n--------\r\nIt’s caused by prefixing the qualified class name to NULL constant in qjsondocument_wrapper.cpp\r\n        ::QJsonParseError* cppArg1 = QJsonParseError::NULL;\r\n\r\nIn shibokengenerator.cpp, guessScopeForDefaultValue() think that NULL is a member of QJsonParseError and prefix it with QJsonParseError::“NULL” should not be prefixed.. \r\n\r\n    static QRegExp enumValueRegEx(\"^([A-Za-z_]\\\\w*)?$\");\r\n…\r\n    } else if (arg->type()->typeEntry()->isValue()) {\r\n        const AbstractMetaClass* metaClass = classes().findClass(arg->type()->typeEntry());\r\n        if (enumValueRegEx.exactMatch(value) && value != \"NULL\")\r\n            prefix = resolveScopePrefix(metaClass, value);\r\n\r\nNot related to this issue, enum-type of QJsonParseError is not correct. It should be ParseError..\r\n  <value-type name=\"QJsonParseError\">\r\n    <enum-type name=\"ParseError\"/>\r\n  </value-type>\r\n\r\n---------------------------------------------------------\r\nScanning dependencies of target QtTest\r\n[ 82%] Building CXX object PySide2/QtTest/CMakeFiles/QtTest.dir/PySide2/QtTest/qtest_pysideqtoucheventsequence_wrapper.cpp.o\r\n[ 82%] Building CXX object PySide2/QtTest/CMakeFiles/QtTest.dir/PySide2/QtTest/qtest_wrapper.cpp.o\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:3836:40: error: expected ';' after top\r\n      level declarator\r\nstatic PyObject* Sbk_QTestFunc_toString<signed char>(PyObject* self, PyObject* pyArg)\r\n                                       ^\r\n                                       ;\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:4120:7: error: unexpected namespace name\r\n      'QTest': expected expression\r\n    ::QTest* cppSelf = 0;\r\n      ^\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:4120:14: error: use of undeclared\r\n      identifier 'cppSelf'\r\n    ::QTest* cppSelf = 0;\r\n             ^\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:4121:16: error: use of undeclared\r\n      identifier 'cppSelf'\r\n    SBK_UNUSED(cppSelf)\r\n               ^\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_install/py2.7-qt5.6.0-64bit-release/include/shiboken2/helper.h:31:31: note: expanded from macro 'SBK_UNUSED'\r\n#define SBK_UNUSED(x)   (void)x;\r\n                              ^\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:4124:5: error: use of undeclared\r\n      identifier 'cppSelf'\r\n    cppSelf = ;\r\n    ^\r\n/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtTest/PySide2/QtTest/qtest_wrapper.cpp:4124:15: error: expected expression\r\n    cppSelf = ;\r\n              ^\r\n-------\r\nThe toString<signed char> and toString<unsigned char> errors are caused by changes in QtTest/qtestcase.h\r\n\r\n#define QTEST_COMPARE_DECL(KLASS)\\\r\ntemplate<> Q_TESTLIB_EXPORT char *toString<KLASS >(const KLASS &);\r\n\r\nQt 5.6 has the following new lines in qtestcase.h:\r\nQTEST_COMPARE_DECL(signed char)\r\n    QTEST_COMPARE_DECL(unsigned char)\r\n\r\nshiboken picked up the new functions in Qt 5.6\r\n\r\nThese 2 new functions could be suppressed by editing PySide2/QtTest/typesystem_test.xml\r\n  <rejection class=\"QTest\" function-name=\"toString&lt;char>\"/>\r\n+  <rejection class=\"QTest\" function-name=\"toString&lt;signed char>\"/>\r\n+  <rejection class=\"QTest\" function-name=\"toString&lt;unsigned char>\"/>\r\n\r\n::QTest* cppSelf errors are caused by two new global variables in QtTest/qtestmouse.h\r\n\r\nQt5.6 has the following new lines in qtestmouse.h\r\n                extern Q_TESTLIB_EXPORT Qt::MouseButton lastMouseButton;\r\n                extern Q_TESTLIB_EXPORT int lastMouseTimestamp;\r\n\r\nThey could be suppressed by adding the following lines to PySide2/QtTest/typesystem_test.xml\r\n\r\n<rejection class=\"QTest\" field-name=\"lastMouseButton\"/>\r\n<rejection class=\"QTest\" field-name=\"lastMouseTimestamp\"/>\r\n\r\n\r\n\r\n--------------------------------------------------\r\nDetecting inconsistencies in class model...  [OK]\r\n[OK]\r\n\ttype 'QWebEngineDownloadItem' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\tenum 'QWebEnginePage::NavigationType' is specified in typesystem, but not declared\r\n\ttype 'QWebEnginePage' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\tenum 'QWebEnginePage::FileSelectionMode' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineProfile::HttpCacheType' is specified in typesystem, but not declared\r\n\tenum 'QWebEnginePage::JavaScriptConsoleMessageLevel' is specified in typesystem, but not declared\r\n\tenum 'QJsonParseError::Type' is specified in typesystem, but not declared\r\n\tenum 'QWebEnginePage::PermissionPolicy' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineScript::InjectionPoint' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineProfile::PersistentCookiesPolicy' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineDownloadItem::DownloadState' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineScript::ScriptWorldId' is specified in typesystem, but not declared\r\n\ttype 'QWebEngineScript' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\ttype 'QWebEngineHistoryItem' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\tenum 'QWebEnginePage::Feature' is specified in typesystem, but not declared\r\n\tenum 'QWebEnginePage::WebAction' is specified in typesystem, but not declared\r\n\tenum 'QWebEnginePage::FindFlag' is specified in typesystem, but not declared\r\n\tenum 'QWebEngineCertificateError::Error' is specified in typesystem, but not declared\r\n\tenum 'QWebEnginePage::WebWindowType' is specified in typesystem, but not declared\r\n\ttype 'QWebEngineView' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\ttype 'QWebEngineProfile' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\ttype 'QWebEngineCertificateError' is specified in typesystem, but not defined. This could potentially lead to compilation errors.\r\n\t\r\n\r\n\r\n\tsignature 'parent()const' for function modification in 'QSortFilterProxyModel' not found. Possible candidates: parent(QModelIndex)const in QSortFilterProxyModel\r\n\t\r\n\r\nDone, 29 warnings (1124 known issues)\r\n[ 97%] Building CXX object PySide2/QtWebEngineWidgets/CMakeFiles/QtWebEngineWidgets.dir/PySide2/QtWebEngineWidgets/qwebenginecertificateerror_wrapper.cpp.o\r\nclang: error: no such file or directory: '/Volumes/data2/mayadev/pyside/2.0qt56/pyside2-setup/pyside_build/py2.7-qt5.6.0-64bit-release/pyside2/PySide2/QtWebEngineWidgets/PySide2/QtWebEngineWidgets/qwebenginecertificateerror_wrapper.cpp'\r\nclang: error: no input files\r\nmake[2]: *** [PySide2/QtWebEngineWidgets/CMakeFiles/QtWebEngineWidgets.dir/PySide2/QtWebEngineWidgets/qwebenginecertificateerror_wrapper.cpp.o] Error 1\r\nmake[1]: *** [PySide2/QtWebEngineWidgets/CMakeFiles/QtWebEngineWidgets.dir/all] Error 2\r\nmake: *** [all] Error 2\r\nerror: Error compiling pyside2\r\n------------------\r\nThe missing source file error is caused by a bug in PySide2/global.h.in\r\n\r\n#if @Qt5WebEngine_FOUND@\r\n#  include <QtWebEngineWidgets/QtWebEngineWidgets>\r\n#endif\r\n\r\n@Qt5WebEngine_FOUND@ should be @Qt5WebEngineWidgets_FOUND@\r\n\r\nCMake should substitute @Qt5WebEngineWidgets_FOUND@ to 1 if it can find QtWebEngineWidgets package..\r\n\r\nYou could check the generated PySide2/pyside2_global.h in build folder.. The generated code should be\r\n#if 1\r\n#  include <QtWebEngineWidgets/QtWebEngineWidgets>\r\n#endif\r\n\r\n"}}