Yocto кросс-компиляция Qt5 cstddef: нет такого файла или каталога - PullRequest
0 голосов
/ 06 апреля 2020

Я слежу за этим сайтом https://www.ics.com/blog/configuring-qt-creator-yocto-evelopment, чтобы создать непристойный йо-образ для эмулятора ARM с Qt5 в Ubuntu 18.04. Я пытаюсь построить пример проекта электронной таблицы, как объяснено на веб-сайте с помощью сгенерированной цепочки инструментов, но я получаю эти ошибки (также пробовал с командной строкой, тот же результат)

/opt/poky/2.2.4/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/david/Qt/Examples/Qt-5.14.2/widgets/itemviews/spreadsheet/spreadsheet.pro -spec linux-oe-g++ CONFIG+=debug CONFIG+=qml_debug

/home/david/Qt/Examples/Qt-5.14.2/widgets/itemviews/spreadsheet/spreadsheet.pro:2: 'qtConfig' is not a recognized test function.

Вот список пакетов Я включил в изображение, созданное в режиме bitbake:

# add the Qt packages so that they get included in the built image and we don't have to install them separately
IMAGE_INSTALL_append = " gcc g++ binutils libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev eglibc-staticdev autoconf automake ccache chkconfig glib-networking packagegroup-core-buildessential pkgconfig boost cmake zlib glib-2.0 qt3d qt5-plugin-generic-vboxtouch qtbase qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver"

У вас есть идея, как решить проблему?


РЕДАКТИРОВАТЬ

Комментируя «require (qtConfig (treeview)))» в файле spreadsheet.pro, ошибка исчезла, однако у меня возникает следующая ошибка при компиляции:

In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1,
                 from ../spreadsheet.h:54,
                 from ../main.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qframe.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractscrollarea.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractitemview.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qtableview.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QTableView:1,
                 from ../printview.h:54,
                 from ../printview.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qnamespace.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qobject.h:46,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractitemdelegate.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qitemdelegate.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QItemDelegate:1,
                 from ../spreadsheetdelegate.h:54,
                 from ../spreadsheetdelegate.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
compilation terminated.
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1,
                 from ../spreadsheet.h:54,
                 from ../spreadsheet.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
Makefile:2092: recipe for target 'spreadsheetdelegate.o' failed
Makefile:1063: recipe for target 'main.o' failed
Makefile:1649: recipe for target 'spreadsheet.o' failed
Makefile:1187: recipe for target 'printview.o' failed
make: *** [spreadsheetdelegate.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [main.o] Error 1
make: *** [spreadsheet.o] Error 1
make: *** [printview.o] Error 1

Я довольно новичок в Qt, я Не знаете, как это исправить, надеюсь, у кого-то есть идея?

Ура,

...