[SOLVED] Building Qt on MAC - error: use of undeclared identifier 'QMachOParser'



  • Anybody ssen this or knows how to fix it?

    ../tst_qpluginloader.cpp:325:39: error: use of undeclared identifier 'QMachOParser'
    QTest::newRow("/dev/null") << int(QMachOParser::NotSuitable);
    ^
    make[5]: Nothing to be done for all'. cd interview/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/examples/widgets/itemviews/interview/interview.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all ../tst_qpluginloader.cpp:326:49: error: use of undeclared identifier 'QMachOParser' QTest::newRow("elftest/debugobj.so") << int(QMachOParser::NotSuitable); ^ ../tst_qpluginloader.cpp:327:51: error: use of undeclared identifier 'QMachOParser' QTest::newRow("tst_qpluginloader.cpp") << int(QMachOParser::NotSuitable); ^ ../tst_qpluginloader.cpp:328:47: error: use of undeclared identifier 'QMachOParser' QTest::newRow("tst_qpluginloader") << int(QMachOParser::NotSuitable); ^ ../tst_qpluginloader.cpp:331:56: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.x86_64.dylib") << int(QMachOParser::QtMetaDataSection); ^ make[7]: Nothing to be done forall'.
    cd qulonglong/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/tests/auto/corelib/thread/qatomicinteger/qulonglong/qulonglong.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all
    ../tst_qpluginloader.cpp:332:54: error: use of undeclared identifier 'QMachOParser'
    QTest::newRow("machtest/good.i386.dylib") << int(QMachOParser::NotSuitable);
    ^
    cd testProcessUniqueness/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all
    make[5]: Nothing to be done for all'. ../tst_qpluginloader.cpp:333:63: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.fat.no-x86_64.dylib") << int(QMachOParser::NotSuitable); ^ cd pixelator/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/examples/widgets/itemviews/pixelator/pixelator.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all ../tst_qpluginloader.cpp:334:61: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.fat.no-i386.dylib") << int(QMachOParser::QtMetaDataSection); ^ ../tst_qpluginloader.cpp:342:55: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.ppc64.dylib") << int(QMachOParser::NotSuitable); ^ ../tst_qpluginloader.cpp:345:57: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.fat.all.dylib") << int(QMachOParser::QtMetaDataSection); ^ ../tst_qpluginloader.cpp:346:65: error: use of undeclared identifier 'QMachOParser' QTest::newRow("machtest/good.fat.stub-x86_64.dylib") << int(QMachOParser::NotSuitable); ^ make[7]: Nothing to be done forall'.
    cd schar/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/tests/auto/corelib/thread/qatomicinteger/schar/schar.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all
    ../tst_qpluginloader.cpp:347:63: error: use of undeclared identifier 'QMachOParser'
    QTest::newRow("machtest/good.fat.stub-i386.dylib") << int(QMachOParser::NotSuitable);
    ^
    ../tst_qpluginloader.cpp:352:61: error: use of undeclared identifier 'QMachOParser'
    QTest::newRow(qPrintable("machtest/" + bad)) << int(QMachOParser::NotSuitable);
    ^
    make[5]: Nothing to be done for all'. ../tst_qpluginloader.cpp:366:13: error: use of undeclared identifier 'QMachOParser' int r = QMachOParser::parse(data.constData(), data.size(), f.fileName(), &errorString, &pos, &len); ^ cd puzzle/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/examples/widgets/itemviews/puzzle/puzzle.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all ../tst_qpluginloader.cpp:371:14: error: use of undeclared identifier 'QMachOParser' if (r == QMachOParser::NotSuitable) ^ ../tst_qpluginloader.cpp:386:13: error: use of undeclared identifier 'QMachOParser' r = QMachOParser::parse(data.constData(), offeredlen, f.fileName(), &errorString, &pos, &len); ^ make[7]: Nothing to be done forall'.
    cd short/ && ( test -e Makefile || /Users/sir/qt5/qtbase/bin/qmake /Users/sir/qt5/qtbase/tests/auto/corelib/thread/qatomicinteger/short/short.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile all
    ../tst_qpluginloader.cpp:387:23: error: use of undeclared identifier 'QMachOParser'
    QVERIFY2(r == QMachOParser::NotSuitable, qPrintable(QString("Failed at size 0x%1").arg(offeredlen, 0, 16)));
    ^
    /Users/sir/qt5/qtbase/lib/QtTest.framework/Headers/qtestcase.h:77:9: note: expanded from macro 'QVERIFY2'
    if (statement) {
    ^
    make[5]: Nothing to be done for `all'.



  • Edited tst_qpluginloader.cpp and removed all code using
    QMachOParser::

    along with the include lines on top

    // #if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)
    //#include "../../../../../lib/QtCore.framework/Versions/5/Headers/5.3.1/QtCore/private/machparser_p.h"
    // #endift

    et voilĂ 

    BUG on current Mac OS with current XCode!


  • Lifetime Qt Champion

    Hi,

    How did you configure your build ?



  • @git clone git://gitorious.org/qt/qt5.git qt5
    cd qt5/
    git checkout stable
    ./init-repository --no-webkit
    ./configure -opensource -nomake examples -nomake tests
    make -j4 all@


  • Lifetime Qt Champion

    You should not use stable but 5.3 (until 5.4 is out)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.