为 ARM 交叉编译 Qt 5.9.8 的问题
Problem with cross-compiling Qt 5.9.8 for ARM
Qt: 5.9.8
主机: ubuntu 19.04
编译器: arm-linux-gnueabi-gcc (Ubuntu/Linaro 8.3.0-6ubuntu1) 8.3.0
构建命令:
./configure -static -release -platform linux-g++-64 -xplatform linux-arm-gnueabi-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -no-opengl -prefix "..\arm-qt" -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-paint_debug -no-feature-freetype -no-feature-translation -no-feature-codecs -no-feature-big_codecs -no-feature-iconv -no-feature-ftp -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-statemachine -no-feature-gestures -no-feature-dbus
错误:
arm-linux-gnueabi-g++ -c -include .pch/Qt5Widgets -pipe -O2 -fPIC -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -DQT_NO_USING_NAMESPACE -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_WIDGETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -Idialogs -I../../include -I../../include/QtWidgets -I../../include/QtWidgets/5.9.8 -I../../include/QtWidgets/5.9.8/QtWidgets -I../../include/QtGui/5.9.8 -I../../include/QtGui/5.9.8/QtGui -I../../include/QtCore/5.9.8 -I../../include/QtCore/5.9.8/QtCore -I../../include/QtGui -I../../include/QtCore -I.moc -I../../mkspecs/linux-arm-gnueabi-g++ -o .obj/qcombobox.o widgets/qcombobox.cpp
In file included from ../../include/QtCore/qglobal.h:1,
from ../../include/QtGui/../../src/gui/kernel/qtguiglobal.h:43,
from ../../include/QtGui/qtguiglobal.h:1,
from ../../include/QtWidgets/../../src/widgets/kernel/qtwidgetsglobal.h:43,
from ../../include/QtWidgets/qtwidgetsglobal.h:1,
from kernel/qt_widgets_pch.h:50:
../../include/QtCore/../../src/corelib/global/qglobal.h:738:61: error: static assertion failed: Required feature completer for file ../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter.h not available.
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:85:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
^~~~~~~~~~~~~~~~~
../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter.h:50:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
QT_REQUIRE_CONFIG(completer);
^~~~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:738:61: error: static assertion failed: Required feature completer for file ../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter_p.h not available.
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:85:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
^~~~~~~~~~~~~~~~~
../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter_p.h:65:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
QT_REQUIRE_CONFIG(completer);
^~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:48178: .obj/qcombobox.o] Error 1
make[3]: Leaving directory '/home/joker/Work/qt5/qtbase/src/widgets'
make[2]: *** [Makefile:528: sub-widgets-make_first] Error 2
make[2]: Leaving directory '/home/joker/Work/qt5/qtbase/src'
make[1]: *** [Makefile:49: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/joker/Work/qt5/qtbase'
make: *** [Makefile:56: module-qtbase-make_first] Error 2
在 ubuntu 16.04 上使用较旧的编译器,我遇到了同样的错误。
您已设置选项 -no-feature-completer
,尝试在没有它的情况下重新配置构建。
Qt: 5.9.8
主机: ubuntu 19.04
编译器: arm-linux-gnueabi-gcc (Ubuntu/Linaro 8.3.0-6ubuntu1) 8.3.0
构建命令:
./configure -static -release -platform linux-g++-64 -xplatform linux-arm-gnueabi-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -no-opengl -prefix "..\arm-qt" -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-paint_debug -no-feature-freetype -no-feature-translation -no-feature-codecs -no-feature-big_codecs -no-feature-iconv -no-feature-ftp -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-statemachine -no-feature-gestures -no-feature-dbus
错误:
arm-linux-gnueabi-g++ -c -include .pch/Qt5Widgets -pipe -O2 -fPIC -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -DQT_NO_USING_NAMESPACE -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_WIDGETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -Idialogs -I../../include -I../../include/QtWidgets -I../../include/QtWidgets/5.9.8 -I../../include/QtWidgets/5.9.8/QtWidgets -I../../include/QtGui/5.9.8 -I../../include/QtGui/5.9.8/QtGui -I../../include/QtCore/5.9.8 -I../../include/QtCore/5.9.8/QtCore -I../../include/QtGui -I../../include/QtCore -I.moc -I../../mkspecs/linux-arm-gnueabi-g++ -o .obj/qcombobox.o widgets/qcombobox.cpp
In file included from ../../include/QtCore/qglobal.h:1,
from ../../include/QtGui/../../src/gui/kernel/qtguiglobal.h:43,
from ../../include/QtGui/qtguiglobal.h:1,
from ../../include/QtWidgets/../../src/widgets/kernel/qtwidgetsglobal.h:43,
from ../../include/QtWidgets/qtwidgetsglobal.h:1,
from kernel/qt_widgets_pch.h:50:
../../include/QtCore/../../src/corelib/global/qglobal.h:738:61: error: static assertion failed: Required feature completer for file ../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter.h not available.
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:85:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
^~~~~~~~~~~~~~~~~
../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter.h:50:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
QT_REQUIRE_CONFIG(completer);
^~~~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:738:61: error: static assertion failed: Required feature completer for file ../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter_p.h not available.
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:85:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
#define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
^~~~~~~~~~~~~~~~~
../../include/QtWidgets/5.9.8/QtWidgets/private/../../../../../src/widgets/util/qcompleter_p.h:65:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
QT_REQUIRE_CONFIG(completer);
^~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:48178: .obj/qcombobox.o] Error 1
make[3]: Leaving directory '/home/joker/Work/qt5/qtbase/src/widgets'
make[2]: *** [Makefile:528: sub-widgets-make_first] Error 2
make[2]: Leaving directory '/home/joker/Work/qt5/qtbase/src'
make[1]: *** [Makefile:49: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/joker/Work/qt5/qtbase'
make: *** [Makefile:56: module-qtbase-make_first] Error 2
在 ubuntu 16.04 上使用较旧的编译器,我遇到了同样的错误。
您已设置选项 -no-feature-completer
,尝试在没有它的情况下重新配置构建。