繁体   English   中英

Qt 5.6与EGLFS的Raspberry Pi交叉编译

[英]Qt 5.6 Cross Compile for Raspberry Pi with EGLFS

我在这里关注教程https://wiki.qt.io/RaspberryPi2EGLFS

我在Ubuntu 15.04上。 在make步骤中,我遇到了许多未定义的参考错误,主要是指QT方法。

.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function operator<<(QDebug, QAccessibleInterface const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qaccessible.o:qaccessible.cpp:function operator<<(QDebug, QAccessibleInterface const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qgenericpluginfactory.o:qgenericpluginfactory.cpp:function QGenericPluginFactory::create(QString const&, QString const&): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qwindowsysteminterface.o:qwindowsysteminterface.cpp:function qt_handleShortcutEvent(QObject*, unsigned long, int, QFlags<Qt::KeyboardModifier>, QString const&, bool, unsigned short): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qplatforminputcontextfactory.o:qplatforminputcontextfactory.cpp:function QPlatformInputContextFactory::create(QString const&): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>::qt_metatype_id(): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QMetaTypeId<QList<int> >::qt_metatype_id(): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformthemefactory.o:qplatformthemefactory.cpp:function QPlatformThemeFactory::create(QString const&, QString const&): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qplatformwindow.o:qplatformwindow.cpp:function QPlatformWindow::requestUpdate(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qsurfaceformat.o:qsurfaceformat.cpp:function operator<<(QDebug, QSurfaceFormat const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent*): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::createPlatformIntegration(): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qguiapplication.o:qguiapplication.cpp:function updateBlockedStatusRecursion(QWindow*, bool): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::showModalWindow(QWindow*): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qwindow.o:qwindow.cpp:function QWindowPrivate::create(bool): error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qclipboard.o:qclipboard.cpp:function QClipboard::text(QString&, QClipboard::Mode) const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qcursor.o:qcursor.cpp:function operator<<(QDebug, QCursor const&): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qdnd.o:qdnd.cpp:function imageReadMimeFormats(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qdnd.o:qdnd.cpp:function imageWriteMimeFormats(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qdnd.o:qdnd.cpp:function QInternalMimeData::renderDataHelper(QString const&, QMimeData const*): error: undefined reference to 'QByteArray::toUpper_helper(QByteArray&)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qkeysequence.o:qkeysequence.cpp:function QKeySequencePrivate::decodeString(QString const&, QKeySequence::SequenceFormat): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qkeysequence.o:qkeysequence.cpp:function QKeySequencePrivate::decodeString(QString const&, QKeySequence::SequenceFormat): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qscreen.o:qscreen.cpp:function operator<<(QDebug, QScreen const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qhighdpiscaling.o:qhighdpiscaling.cpp:function QHighDpiScaling::initHighDpiScaling(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qhighdpiscaling.o:qhighdpiscaling.cpp:function QHighDpiScaling::initHighDpiScaling(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qimage.o:qimage.cpp:function operator<<(QDebug, QImage const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qimage.o:qimage.cpp:function QImage::text(QString const&) const: error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagereader.o:qimagereader.cpp:function createReadHandlerHelper(QIODevice*, QByteArray const&, bool, bool): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::getText() [clone .part.30]: error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::getText() [clone .part.30]: error: undefined reference to 'QString::simplified_helper(QString&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::initHandler(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qimagewriter.o:qimagewriter.cpp:function QImageWriter::setText(QString const&, QString const&): error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagewriter.o:qimagewriter.cpp:function QImageWriter::setText(QString const&, QString const&): error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qpixmap.o:qpixmap.cpp:function operator<<(QDebug, QPixmap const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qicon.o:qicon.cpp:function operator<<(QDebug, QIcon const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qiconloader.o:qiconloader.cpp:function QIconLoader::findIconHelper(QString const&, QString const&, QStringList&) const: error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qppmhandler.o:qppmhandler.cpp:function QPpmHandler::setOption(QImageIOHandler::ImageOption, QVariant const&): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qxbmhandler.o:qxbmhandler.cpp:function read_xbm_header(QIODevice*, int&, int&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxbmhandler.o:qxbmhandler.cpp:function read_xbm_header(QIODevice*, int&, int&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::simplified_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function QXpmHandler::write(QImage const&): error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function QXpmHandler::write(QImage const&): error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qpnghandler.o:qpnghandler.cpp:function QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int): error: undefined reference to 'QString::simplified_helper(QString&)'
.obj/qfont.o:qfont.cpp:function QFont::substitute(QString const&): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontdatabase.o:qfontdatabase.cpp:function QFontDatabase::load(QFontPrivate const*, int): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtextdocument.o:qtextdocument.cpp:function findInBlock(QTextBlock const&, QRegularExpression const&, int, QFlags<QTextDocument::FindFlag>, QTextCursor*): error: undefined reference to 'QString::lastIndexOf(QRegularExpression const&, int, QRegularExpressionMatch*) const'
.obj/qtextdocument.o:qtextdocument.cpp:function findInBlock(QTextBlock const&, QRegularExpression const&, int, QFlags<QTextDocument::FindFlag>, QTextCursor*): error: undefined reference to 'QString::indexOf(QRegularExpression const&, int, QRegularExpressionMatch*) const'
.obj/qtexthtmlparser.o:qtexthtmlparser.cpp:function setWidthAttribute(QTextLength*, QString): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtexthtmlparser.o:qtexthtmlparser.cpp:function QTextHtmlParser::parseCloseTag(): error: undefined reference to 'QString::trimmed_helper(QString&)'
.obj/qcssparser.o:qcssparser.cpp:function parseColorValue(QCss::Value): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtextodfwriter.o:qtextodfwriter.cpp:function QTextOdfWriter::writeBlockFormat(QXmlStreamWriter&, QTextBlockFormat, int) const: error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qcolor.o:qcolor.cpp:function QColor::name(QColor::NameFormat) const: error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qcolor.o:qcolor.cpp:function QColor::name(QColor::NameFormat) const: error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qvalidator.o:qvalidator.cpp:function QDoubleValidator::validate(QString&, int&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QIntValidator::validate(QString&, int&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QIntValidator::fixup(QString&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QDoubleValidatorPrivate::validateWithLocale(QString&, QLocaleData::NumberMode, QLocale const&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::fromJson(QJsonValue const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
.obj/qopengl.o:qopengl.cpp:function operator<<(QDebug, QOpenGLConfig::Gpu const&): error: undefined reference to 'operator<<(QDebug, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QJsonDocument const&): error: undefined reference to 'QSysInfo::kernelVersion()'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QJsonDocument const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QString const&): error: undefined reference to 'QSysInfo::kernelVersion()'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QString const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
collect2: error: ld returned 1 exit status
Makefile:1205: recipe for target '../../lib/libQt5Gui.so.5.6.0' failed
make[2]: *** [../../lib/libQt5Gui.so.5.6.0] Error 1
make[2]: Leaving directory '/home/james/raspi/qtbase/src/gui'
Makefile:497: recipe for target 'sub-gui-make_first' failed
make[1]: *** [sub-gui-make_first] Error 2
make[1]: Leaving directory '/home/james/raspi/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

我尝试在./configure期间添加-no-warnings-are-errors标志,以及从5.5(发行版)QT分支进行交叉编译。 5.5分支在配置步骤中中断。

有什么地方可以链接/指定源/添加标题吗?

似乎我的raspbian映像上的qt5-default软件包引起了问题。 来自干净的平板或执行sudo apt-get remove qt5-default解决了该问题。

似乎我的raspbian映像上的qt5-default软件包引起了问题。

万一它对其他人有所帮助,仅在PI上删除qt5-default并重新运行rsync命令是不够的。 我必须删除sysroot目录,然后重新运行rsync命令才能编译Qt。

我不知道是否有必要,但我也从Pi中清除了所有qt5软件包。

仅删除qt5-default是不够的。

我必须删除对预装qt 5库的所有引用才能使构建成功。

从以前的交叉编译尝试开始,按照别人的食谱,我安装了libqt5core5 ,它依赖于一堆附加的qt5库。

删除libqt5core5后,链接过程成功。 当然,由于Pi上的库已更改,因此还需要重新创建sysroot文件夹。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM