Errors during CROSS COMPILATION Qt5 for arm on x86 64 bit
-
I am facing following errors :
1334:../../include/QtCore/../../src/corelib/io/qtextstream.h:46:2: error: #error qtextstream.h must be included before any header file that defines Status
1335: #error qtextstream.h must be included before any header file that defines Status
1358:../../include/QtCore/../../src/corelib/io/qdatastream.h:42:2: error: #error qdatastream.h must be included before any header file that defines Status
1359: #error qdatastream.h must be included before any header file that defines Status
1365:../../include/QtCore/../../src/corelib/kernel/qvariant.h:127:9: error: expected identifier before ‘int’
1368:../../include/QtCore/../../src/corelib/kernel/qvariant.h:127:9: error: expected ‘}’ before ‘int’
1378:../../include/QtCore/../../src/corelib/kernel/qvariant.h:127:14: error: expected unqualified-id before ‘=’ token
1381:../../include/QtCore/../../src/corelib/kernel/qvariant.h:193:14: error: expected unqualified-id before ‘)’ token
1384:../../include/QtCore/../../src/corelib/kernel/qvariant.h:194:16: error: expected constructor, destructor, or type conversion before ‘;’ token
1387:../../include/QtCore/../../src/corelib/kernel/qvariant.h:195:19: error: expected ‘)’ before ‘type’
1390:../../include/QtCore/../../src/corelib/kernel/qvariant.h:196:14: error: expected unqualified-id before ‘int’
1393:../../include/QtCore/../../src/corelib/kernel/qvariant.h:196:14: error: expected ‘)’ before ‘int’
1394:../../include/QtCore/../../src/corelib/kernel/qvariant.h:197:14: error: expected unqualified-id before ‘int’
1397:../../include/QtCore/../../src/corelib/kernel/qvariant.h:197:14: error: expected ‘)’ before ‘int’
1398:../../include/QtCore/../../src/corelib/kernel/qvariant.h:198:14: error: expected unqualified-id before ‘const’
1401:../../include/QtCore/../../src/corelib/kernel/qvariant.h:198:14: error: expected ‘)’ before ‘const’
1402:../../include/QtCore/../../src/corelib/kernel/qvariant.h:201:26: error: expected ‘)’ before ‘&’ token
1405:../../include/QtCore/../../src/corelib/kernel/qvariant.h:204:14: error: expected unqualified-id before ‘int’
1408:../../include/QtCore/../../src/corelib/kernel/qvariant.h:204:14: error: expected ‘)’ before ‘int’
1409:../../include/QtCore/../../src/corelib/kernel/qvariant.h:205:19: error: expected ‘)’ before ‘ui’
1412:../../include/QtCore/../../src/corelib/kernel/qvariant.h:206:24: error: expected ‘)’ before ‘ll’
1415:../../include/QtCore/../../src/corelib/kernel/qvariant.h:207:25: error: expected ‘)’ before ‘ull’
1418:../../include/QtCore/../../src/corelib/kernel/qvariant.h:208:14: error: expected unqualified-id before ‘bool’
1421:../../include/QtCore/../../src/corelib/kernel/qvariant.h:208:14: error: expected ‘)’ before ‘bool’
1422:../../include/QtCore/../../src/corelib/kernel/qvariant.h:209:14: error: expected unqualified-id before ‘double’
1425:../../include/QtCore/../../src/corelib/kernel/qvariant.h:209:14: error: expected ‘)’ before ‘double’
1426:../../include/QtCore/../../src/corelib/kernel/qvariant.h:210:14: error: expected unqualified-id before ‘float’
1429:../../include/QtCore/../../src/corelib/kernel/qvariant.h:210:14: error: expected ‘)’ before ‘float’
1430:../../include/QtCore/../../src/corelib/kernel/qvariant.h:215:14: error: expected unqualified-id before ‘const’
1433:../../include/QtCore/../../src/corelib/kernel/qvariant.h:215:14: error: expected ‘)’ before ‘const’
1434:../../include/QtCore/../../src/corelib/kernel/qvariant.h:216:14: error: expected unqualified-id before ‘const’
1437:../../include/QtCore/../../src/corelib/kernel/qvariant.h:216:14: error: expected ‘)’ before ‘const’
1438:../../include/QtCore/../../src/corelib/kernel/qvariant.h:217:14: error: expected unqualified-id before ‘const’
1441:../../include/QtCore/../../src/corelib/kernel/qvariant.h:217:14: error: expected ‘)’ before ‘const’
1442:../../include/QtCore/../../src/corelib/kernel/qvariant.h:218:28: error: expected ‘)’ before ‘string’
1445:../../include/QtCore/../../src/corelib/kernel/qvariant.h:219:14: error: expected unqualified-id before ‘const’
1448:../../include/QtCore/../../src/corelib/kernel/qvariant.h:219:14: error: expected ‘)’ before ‘const’
1449:../../include/QtCore/../../src/corelib/kernel/qvariant.h:220:20: error: expected ‘)’ before ‘qchar’
1452:../../include/QtCore/../../src/corelib/kernel/qvariant.h:221:14: error: expected unqualified-id before ‘const’
1455:../../include/QtCore/../../src/corelib/kernel/qvariant.h:221:14: error: expected ‘)’ before ‘const’
1456:../../include/QtCore/../../src/corelib/kernel/qvariant.h:222:14: error: expected unqualified-id before ‘const’
1459:../../include/QtCore/../../src/corelib/kernel/qvariant.h:222:14: error: expected ‘)’ before ‘const’
1460:../../include/QtCore/../../src/corelib/kernel/qvariant.h:223:14: error: expected unqualified-id before ‘const’
1463:../../include/QtCore/../../src/corelib/kernel/qvariant.h:223:14: error: expected ‘)’ before ‘const’
1464:../../include/QtCore/../../src/corelib/kernel/qvariant.h:224:14: error: expected unqualified-id before ‘const’
1467:../../include/QtCore/../../src/corelib/kernel/qvariant.h:224:14: error: expected ‘)’ before ‘const’
1468:../../include/QtCore/../../src/corelib/kernel/qvariant.h:225:14: error: expected unqualified-id before ‘const’
1471:../../include/QtCore/../../src/corelib/kernel/qvariant.h:225:14: error: expected ‘)’ before ‘const’
1472:../../include/QtCore/../../src/corelib/kernel/qvariant.h:226:14: error: expected unqualified-id before ‘const’
1475:../../include/QtCore/../../src/corelib/kernel/qvariant.h:226:14: error: expected ‘)’ before ‘const’
1476:../../include/QtCore/../../src/corelib/kernel/qvariant.h:228:14: error: expected unqualified-id before ‘const’
1479:../../include/QtCore/../../src/corelib/kernel/qvariant.h:228:14: error: expected ‘)’ before ‘const’
1480:../../include/QtCore/../../src/corelib/kernel/qvariant.h:229:14: error: expected unqualified-id before ‘const’
1483:../../include/QtCore/../../src/corelib/kernel/qvariant.h:229:14: error: expected ‘)’ before ‘const’
1484:../../include/QtCore/../../src/corelib/kernel/qvariant.h:230:14: error: expected unqualified-id before ‘const’
1487:../../include/QtCore/../../src/corelib/kernel/qvariant.h:230:14: error: expected ‘)’ before ‘const’
1488:../../include/QtCore/../../src/corelib/kernel/qvariant.h:231:14: error: expected unqualified-id before ‘const’
1491:../../include/QtCore/../../src/corelib/kernel/qvariant.h:231:14: error: expected ‘)’ before ‘const’
1492:../../include/QtCore/../../src/corelib/kernel/qvariant.h:232:14: error: expected unqualified-id before ‘const’
1495:../../include/QtCore/../../src/corelib/kernel/qvariant.h:232:14: error: expected ‘)’ before ‘const’
1496:../../include/QtCore/../../src/corelib/kernel/qvariant.h:233:14: error: expected unqualified-id before ‘const’
1499:../../include/QtCore/../../src/corelib/kernel/qvariant.h:233:14: error: expected ‘)’ before ‘const’
1500:../../include/QtCore/../../src/corelib/kernel/qvariant.h:234:14: error: expected unqualified-id before ‘const’
1503:../../include/QtCore/../../src/corelib/kernel/qvariant.h:234:14: error: expected ‘)’ before ‘const’
1504:../../include/QtCore/../../src/corelib/kernel/qvariant.h:235:14: error: expected unqualified-id before ‘const’
1507:../../include/QtCore/../../src/corelib/kernel/qvariant.h:235:14: error: expected ‘)’ before ‘const’
1508:../../include/QtCore/../../src/corelib/kernel/qvariant.h:237:14: error: expected unqualified-id before ‘const’
1511:../../include/QtCore/../../src/corelib/kernel/qvariant.h:237:14: error: expected ‘)’ before ‘const’
1512:../../include/QtCore/../../src/corelib/kernel/qvariant.h:239:14: error: expected unqualified-id before ‘const’
1515:../../include/QtCore/../../src/corelib/kernel/qvariant.h:239:14: error: expected ‘)’ before ‘const’
1516:../../include/QtCore/../../src/corelib/kernel/qvariant.h:243:14: error: expected unqualified-id before ‘const’
1519:../../include/QtCore/../../src/corelib/kernel/qvariant.h:243:14: error: expected ‘)’ before ‘const’
1520:../../include/QtCore/../../src/corelib/kernel/qvariant.h:245:14: error: expected unqualified-id before ‘const’
1523:../../include/QtCore/../../src/corelib/kernel/qvariant.h:245:14: error: expected ‘)’ before ‘const’
1524:../../include/QtCore/../../src/corelib/kernel/qvariant.h:246:14: error: expected unqualified-id before ‘const’
1527:../../include/QtCore/../../src/corelib/kernel/qvariant.h:246:14: error: expected ‘)’ before ‘const’
1528:../../include/QtCore/../../src/corelib/kernel/qvariant.h:247:14: error: expected unqualified-id before ‘const’
1531:../../include/QtCore/../../src/corelib/kernel/qvariant.h:247:14: error: expected ‘)’ before ‘const’
1532:../../include/QtCore/../../src/corelib/kernel/qvariant.h:248:14: error: expected unqualified-id before ‘const’
1535:../../include/QtCore/../../src/corelib/kernel/qvariant.h:248:14: error: expected ‘)’ before ‘const’
1536:../../include/QtCore/../../src/corelib/kernel/qvariant.h:249:14: error: expected unqualified-id before ‘const’
1539:../../include/QtCore/../../src/corelib/kernel/qvariant.h:249:14: error: expected ‘)’ before ‘const’
1540:../../include/QtCore/../../src/corelib/kernel/qvariant.h:250:14: error: expected unqualified-id before ‘const’
1543:../../include/QtCore/../../src/corelib/kernel/qvariant.h:250:14: error: expected ‘)’ before ‘const’
1544:../../include/QtCore/../../src/corelib/kernel/qvariant.h:251:14: error: expected unqualified-id before ‘const’
1547:../../include/QtCore/../../src/corelib/kernel/qvariant.h:251:14: error: expected ‘)’ before ‘const’
1548:../../include/QtCore/../../src/corelib/kernel/qvariant.h:252:14: error: expected unqualified-id before ‘const’
1551:../../include/QtCore/../../src/corelib/kernel/qvariant.h:252:14: error: expected ‘)’ before ‘const’
1552:../../include/QtCore/../../src/corelib/kernel/qvariant.h:253:14: error: expected unqualified-id before ‘const’
1555:../../include/QtCore/../../src/corelib/kernel/qvariant.h:253:14: error: expected ‘)’ before ‘const’
1556:../../include/QtCore/../../src/corelib/kernel/qvariant.h:256:46: error: ‘QVariant& operator=(const QVariant&)’ must be a nonstatic member function
1560:../../include/QtCore/../../src/corelib/kernel/qvariant.h:264:62: error: ‘d’ was not declared in this scope
1563:../../include/QtCore/../../src/corelib/kernel/qvariant.h:264:71: error: ‘class QVariant’ has no member named ‘d’
1567:../../include/QtCore/../../src/corelib/kernel/qvariant.h:266:5: error: ‘Type’ does not name a type
1570:../../include/QtCore/../../src/corelib/kernel/qvariant.h:267:20: error: non-member function ‘int userType()’ cannot have cv-qualifier
1573:../../include/QtCore/../../src/corelib/kernel/qvariant.h:268:28: error: non-member function ‘const char* typeName()’ cannot have cv-qualifier
1576:../../include/QtCore/../../src/corelib/kernel/qvariant.h:270:39: error: non-member function ‘bool canConvert(int)’ cannot have cv-qualifier
1579:../../include/QtCore/../../src/corelib/kernel/qvariant.h:273:27: error: non-member function ‘bool isValid()’ cannot have cv-qualifier
1582:../../include/QtCore/../../src/corelib/kernel/qvariant.h:274:19: error: non-member function ‘bool isNull()’ cannot have cv-qualifier
1585:../../include/QtCore/../../src/corelib/kernel/qvariant.h:279:30: error: non-member function ‘bool isDetached()’ cannot have cv-qualifier
1588:../../include/QtCore/../../src/corelib/kernel/qvariant.h:281:37: error: non-member function ‘int toInt(bool*)’ cannot have cv-qualifier
1591:../../include/QtCore/../../src/corelib/kernel/qvariant.h:282:39: error: non-member function ‘uint toUInt(bool*)’ cannot have cv-qualifier
1594:../../include/QtCore/../../src/corelib/kernel/qvariant.h:283:48: error: non-member function ‘qlonglong toLongLong(bool*)’ cannot have cv-qualifier
1597:../../include/QtCore/../../src/corelib/kernel/qvariant.h:284:50: error: non-member function ‘qulonglong toULongLong(bool*)’ cannot have cv-qualifier
1600:../../include/QtCore/../../src/corelib/kernel/qvariant.h:285:19: error: non-member function ‘bool toBool()’ cannot have cv-qualifier
1603:../../include/QtCore/../../src/corelib/kernel/qvariant.h:286:43: error: non-member function ‘double toDouble(bool*)’ cannot have cv-qualifier
1606:../../include/QtCore/../../src/corelib/kernel/qvariant.h:287:41: error: non-member function ‘float toFloat(bool*)’ cannot have cv-qualifier
1609:../../include/QtCore/../../src/corelib/kernel/qvariant.h:288:40: error: non-member function ‘qreal toReal(bool*)’ cannot have cv-qualifier
1612:../../include/QtCore/../../src/corelib/kernel/qvariant.h:289:30: error: non-member function ‘QByteArray toByteArray()’ cannot have cv-qualifier
1615:../../include/QtCore/../../src/corelib/kernel/qvariant.h:290:28: error: non-member function ‘QBitArray toBitArray()’ cannot have cv-qualifier
1618:../../include/QtCore/../../src/corelib/kernel/qvariant.h:291:24: error: non-member function ‘QString toString()’ cannot have cv-qualifier
1621:../../include/QtCore/../../src/corelib/kernel/qvariant.h:292:32: error: non-member function ‘QStringList toStringList()’ cannot have cv-qualifier
1624:../../include/QtCore/../../src/corelib/kernel/qvariant.h:293:20: error: non-member function ‘QChar toChar()’ cannot have cv-qualifier
1627:../../include/QtCore/../../src/corelib/kernel/qvariant.h:294:20: error: non-member function ‘QDate toDate()’ cannot have cv-qualifier
1630:../../include/QtCore/../../src/corelib/kernel/qvariant.h:295:20: error: non-member function ‘QTime toTime()’ cannot have cv-qualifier
1633:../../include/QtCore/../../src/corelib/kernel/qvariant.h:296:28: error: non-member function ‘QDateTime toDateTime()’ cannot have cv-qualifier
1636:../../include/QtCore/../../src/corelib/kernel/qvariant.h:297:30: error: non-member function ‘QList<QVariant> toList()’ cannot have cv-qualifier
1639:../../include/QtCore/../../src/corelib/kernel/qvariant.h:298:37: error: non-member function ‘QMap<QString, QVariant> toMap()’ cannot have cv-qualifier
1642:../../include/QtCore/../../src/corelib/kernel/qvariant.h:299:39: error: non-member function ‘QHash<QString, QVariant> toHash()’ cannot have cv-qualifier
1645:../../include/QtCore/../../src/corelib/kernel/qvariant.h:302:22: error: non-member function ‘QPoint toPoint()’ cannot have cv-qualifier
1648:../../include/QtCore/../../src/corelib/kernel/qvariant.h:303:24: error: non-member function ‘QPointF toPointF()’ cannot have cv-qualifier
1651:../../include/QtCore/../../src/corelib/kernel/qvariant.h:304:20: error: non-member function ‘QRect toRect()’ cannot have cv-qualifier
1654:../../include/QtCore/../../src/corelib/kernel/qvariant.h:305:20: error: non-member function ‘QSize toSize()’ cannot have cv-qualifier
1657:../../include/QtCore/../../src/corelib/kernel/qvariant.h:306:22: error: non-member function ‘QSizeF toSizeF()’ cannot have cv-qualifier
1660:../../include/QtCore/../../src/corelib/kernel/qvariant.h:307:20: error: non-member function ‘QLine toLine()’ cannot have cv-qualifier
1663:../../include/QtCore/../../src/corelib/kernel/qvariant.h:308:22: error: non-member function ‘QLineF toLineF()’ cannot have cv-qualifier
1666:../../include/QtCore/../../src/corelib/kernel/qvariant.h:309:22: error: non-member function ‘QRectF toRectF()’ cannot have cv-qualifier
1669:../../include/QtCore/../../src/corelib/kernel/qvariant.h:311:24: error: non-member function ‘QLocale toLocale()’ cannot have cv-qualifier
1672:../../include/QtCore/../../src/corelib/kernel/qvariant.h:313:24: error: non-member function ‘QRegExp toRegExp()’ cannot have cv-qualifier
1675:../../include/QtCore/../../src/corelib/kernel/qvariant.h:317:46: error: non-member function ‘QRegularExpression toRegularExpression()’ cannot have cv-qualifier
1678:../../include/QtCore/../../src/corelib/kernel/qvariant.h:319:18: error: non-member function ‘QUrl toUrl()’ cannot have cv-qualifier
1681:../../include/QtCore/../../src/corelib/kernel/qvariant.h:320:34: error: non-member function ‘QEasingCurve toEasingCurve()’ cannot have cv-qualifier
1684:../../include/QtCore/../../src/corelib/kernel/qvariant.h:321:20: error: non-member function ‘QUuid toUuid()’ cannot have cv-qualifier
1687:../../include/QtCore/../../src/corelib/kernel/qvariant.h:322:32: error: non-member function ‘QModelIndex toModelIndex()’ cannot have cv-qualifier
1690:../../include/QtCore/../../src/corelib/kernel/qvariant.h:323:52: error: non-member function ‘QPersistentModelIndex toPersistentModelIndex()’ cannot have cv-qualifier
1693:../../include/QtCore/../../src/corelib/kernel/qvariant.h:324:30: error: non-member function ‘QJsonValue toJsonValue()’ cannot have cv-qualifier
1696:../../include/QtCore/../../src/corelib/kernel/qvariant.h:325:32: error: non-member function ‘QJsonObject toJsonObject()’ cannot have cv-qualifier
1699:../../include/QtCore/../../src/corelib/kernel/qvariant.h:326:30: error: non-member function ‘QJsonArray toJsonArray()’ cannot have cv-qualifier
1702:../../include/QtCore/../../src/corelib/kernel/qvariant.h:327:36: error: non-member function ‘QJsonDocument toJsonDocument()’ cannot have cv-qualifier
1705:../../include/QtCore/../../src/corelib/kernel/qvariant.h:332:32: error: non-member function ‘void save(QDataStream&)’ cannot have cv-qualifier
1708:../../include/QtCore/../../src/corelib/kernel/qvariant.h:335:12: error: ‘Type’ does not name a type
1711:../../include/QtCore/../../src/corelib/kernel/qvariant.h:338:29: error: non-member function ‘const void* constData()’ cannot have cv-qualifier
1714:../../include/QtCore/../../src/corelib/kernel/qvariant.h:339:31: error: non-member function ‘const void* data()’ cannot have cv-qualifier
1718:../../include/QtCore/../../src/corelib/kernel/qvariant.h:339:31: error: new declaration ‘const void* data()’
1719:../../include/QtCore/../../src/corelib/kernel/qvariant.h:337:11: error: ambiguates old declaration ‘void* data()’
1723:../../include/QtCore/../../src/corelib/kernel/qvariant.h:345:22: error: non-member function ‘T value()’ cannot have cv-qualifier
1727:../../include/QtCore/../../src/corelib/kernel/qvariant.h:346:32: error: invalid use of ‘this’ in non-member function
1731:../../include/QtCore/../../src/corelib/kernel/qvariant.h:353:23: error: non-member function ‘bool canConvert()’ cannot have cv-qualifier
1734:../../include/QtCore/../../src/corelib/kernel/qvariant.h:356:2: error: expected unqualified-id before ‘public’Please suggest some solution:
-
Hi,
You have to give more information:
- What compiler are you using ?
- What device are you targeting ?
- What OS are you on for the cross-compiliation ?
- What version of Qt are you trying to cross-compile ?
-
I followed the tutorial:
http://wiki.qt.io/RaspberryPi2EGLFSWhen I first did it on my virtual Debian 8 machine, I had a lot of errors similar to yours that seemed related to some other version of Qt (or its dependents) that was previously installed or so.
To setup my Qt cross-compilation environment, I therefore created a clean Debian 8x64 virtual machine, only installing the bare minimum ("the first CD" only, if you like). On this base system, I only needed to extra install build-essential and git (and maybe sudo).When I retried all the steps of the above tutorial, everything worked flawlessly!
I suggest you try the same. It should also work on Ubuntu.