【问题标题】:compile qt-webkit with mingw32-make for bisecting使用 mingw32-make 编译 qt-webkit 以进行二分
【发布时间】:2012-03-10 07:42:51
【问题描述】:

我启动了一个 bisect qtwebkit,当我尝试在第一阶段编译它时,它给了我以下异常。我尝试使用较旧的 qmake,但仍然给出相同的异常。这到底是什么意思,我该如何解决。

g++ -c -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DBUILDING_QT__=1 -DWTF_USE_ACCELERATED_COMPOSITING -DUSE_SYSTEM_MALLOC -DNDEBUG -D_HAS_TR1=0 -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include" -I"." -I"..\..\webkit" -I"assembler" -I"bytecode" -I"bytecompiler" -I"debugger" -I"interpreter" -I"jit" -I"parser" -I"pcre" -I"profiler" -I"runtime" -I"wtf" -I"wtf\symbian" -I"wtf\unicode" -I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"\include\QtWebKit" -I"pcre" -I"\JavaScriptCore\tmp" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"c:\QtSDK1.2\mingw\include" -I"c:\QtSDK1.2\mingw\include" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\MainThreadQt.o wtf\qt\MainThreadQt.cpp In file included from wtf\qt\MainThreadQt.cpp:72:
tmp\moc\debug_shared/MainThreadQt.moc:13:2: error: #error "This file was generated using the moc from 4.8.0. It"
tmp\moc\debug_shared/MainThreadQt.moc:14:2: error: #error "cannot be used with the include files from this version of Qt."
tmp\moc\debug_shared/MainThreadQt.moc:15:2: error: #error "(The moc has changed too much.)"
In file included from wtf\qt\MainThreadQt.cpp:72:
tmp\moc\debug_shared/MainThreadQt.moc:42: error: no 'void WTF::MainThreadInvoker::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' member function declared in class 'WTF::MainThreadInvoker'
tmp\moc\debug_shared/MainThreadQt.moc:55: error: 'const QMetaObjectExtraData WTF::MainThreadInvoker::staticMetaObjectExtraData' is not a static member of 'class WTF::MainThreadInvoker'
tmp\moc\debug_shared/MainThreadQt.moc:56: error: 'qt_static_metacall' was not declared in this scope
tmp\moc\debug_shared/MainThreadQt.moc:57: error: too many initializers for 'const QMetaObjectExtraData'
tmp\moc\debug_shared/MainThreadQt.moc:61: error: 'staticMetaObjectExtraData' was not declared in this scope
tmp\moc\debug_shared/MainThreadQt.moc:62: error: too many initializers for 'QMetaObject::<anonymous struct>'
tmp\moc\debug_shared/MainThreadQt.moc: In member function 'virtual int WTF::MainThreadInvoker::qt_metacall(QMetaObject::Call, int, void**)':
tmp\moc\debug_shared/MainThreadQt.moc:88: error: 'qt_static_metacall' was not declared in this scope
mingw32-make[2]: *** [tmp/obj/debug_shared/MainThreadQt.o] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/qtGITSource/qt/src/3rdparty/webkit/JavaScriptCore'
mingw32-make[1]: *** [debug-all] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/qtGITSource/qt/src/3rdparty/webkit/JavaScriptCore'
mingw32-make: *** [sub-JavaScriptCore-make_default-ordered] Error 2

【问题讨论】:

    标签: qt qtwebkit git-bisect


    【解决方案1】:

    恕我直言。 2,3很重要:

    错误“此文件是使用 4.8.0 的 moc 生成的。它”

    错误“不能与此版本 Qt 中的包含文件一起使用。”

    您的版本低于 qt 4.8,并且您所有的 moc 文件都是在 moc v4.8 的先前版本中生成的。您必须清理构建目录并重新启动构建命令(确保使用正确版本的 qmake、moc 等)。

    【讨论】:

    • 非常感谢您的回复。我确实运行了 mingw32-make confclean 来清理项目,但它似乎对我没有帮助。在错误中它提到了 tmp\moc\debug_shared/MainThreadQt.moc 文件,但它不存在。我也尝试使用 4.7.4 的 qmake。但它最终给了我同样的错误。我真的很感谢你的回答。
    • 你使用哪个 git commit 的 qt? (哪个提交导致了这个问题?)你是在 Windows 上编译还是要交叉编译?
    • 我正在使用 qt4.8 并尝试向后构建。我想我在那里做错了。我必须从一开始就构建它,而不仅仅是构建一个组件,那就是 qtwebkit。
    猜你喜欢
    • 2012-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-05
    • 2015-10-18
    • 1970-01-01
    相关资源
    最近更新 更多