In file included from declarativemaps/qdeclarativepolylinemapitem.cpp:38:
declarativemaps/qdeclarativepolylinemapitem_p_p.h:381:17: error: ‘const char* MapPolylineShaderLineStrip::vertexShader() const’ marked ‘override’, but does not override
381 | const char *vertexShader() const override {
| ^~~~~~~~~~~~
declarativemaps/qdeclarativepolylinemapitem_p_p.h:397:17: error: ‘const char* MapPolylineShaderLineStrip::fragmentShader() const’ marked ‘override’, but does not override
397 | const char *fragmentShader() const override {
| ^~~~~~~~~~~~~~
declarativemaps/qdeclarativepolylinemapitem_p_p.h: In member function ‘virtual void MapPolylineShaderLineStrip::initialize()’:
declarativemaps/qdeclarativepolylinemapitem_p_p.h:411:23: error: ‘program’ was not declared in this scope
411 | m_matrix_id = program()->uniformLocation("qt_Matrix");
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem_p_p.h: At global scope:
declarativemaps/qdeclarativepolylinemapitem_p_p.h:435:17: error: ‘const char* MapPolylineShaderExtruded::vertexShader() const’ marked ‘override’, but does not override
435 | const char *vertexShader() const override
| ^~~~~~~~~~~~
declarativemaps/qdeclarativepolylinemapitem_p_p.h:440:17: error: ‘const char* MapPolylineShaderExtruded::fragmentShader() const’ marked ‘override’, but does not override
440 | const char *fragmentShader() const override
| ^~~~~~~~~~~~~~
declarativemaps/qdeclarativepolylinemapitem_p_p.h: In member function ‘virtual void MapPolylineShaderExtruded::initialize()’:
declarativemaps/qdeclarativepolylinemapitem_p_p.h:455:23: error: ‘program’ was not declared in this scope
455 | m_matrix_id = program()->uniformLocation("qt_Matrix");
| ^~~~~~~
In file included from ../../include/QtLocation/5.15.1/QtLocation/private/qdeclarativepolygonmapitem_p_p.h:1,
from declarativemaps/qdeclarativerectanglemapitem_p_p.h:53,
from declarativemaps/qdeclarativepolylinemapitem.cpp:39:
../../include/QtLocation/5.15.1/QtLocation/private/../../../../../src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: At global scope:
../../include/QtLocation/5.15.1/QtLocation/private/../../../../../src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:152:17: error: ‘const char* MapPolygonShader::vertexShader() const’ marked ‘override’, but does not override
152 | const char *vertexShader() const override {
| ^~~~~~~~~~~~
../../include/QtLocation/5.15.1/QtLocation/private/../../../../../src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:168:17: error: ‘const char* MapPolygonShader::fragmentShader() const’ marked ‘override’, but does not override
168 | const char *fragmentShader() const override {
| ^~~~~~~~~~~~~~
../../include/QtLocation/5.15.1/QtLocation/private/../../../../../src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: In member function ‘virtual void MapPolygonShader::initialize()’:
../../include/QtLocation/5.15.1/QtLocation/private/../../../../../src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:186:23: error: ‘program’ was not declared in this scope
186 | m_matrix_id = program()->uniformLocation("qt_Matrix");
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp: In member function ‘virtual void MapPolylineShaderLineStrip::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)’:
declarativemaps/qdeclarativepolylinemapitem.cpp:1552:9: error: ‘program’ was not declared in this scope
1552 | program()->setUniformValue(m_color_id, v);
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp:1557:9: error: ‘program’ was not declared in this scope
1557 | program()->setUniformValue(m_matrix_id, state.projectionMatrix());
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp:1560:5: error: ‘program’ was not declared in this scope
1560 | program()->setUniformValue(m_mapProjection_id, geoProjection);
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp: In member function ‘virtual void MapPolylineShaderExtruded::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)’:
declarativemaps/qdeclarativepolylinemapitem.cpp:1768:9: error: ‘program’ was not declared in this scope
1768 | program()->setUniformValue(m_color_id, v);
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp:1773:9: error: ‘program’ was not declared in this scope
1773 | program()->setUniformValue(m_matrix_id, state.projectionMatrix());
| ^~~~~~~
declarativemaps/qdeclarativepolylinemapitem.cpp:1777:5: error: ‘program’ was not declared in this scope
1777 | program()->setUniformValue(m_mapProjection_id, geoProjection);
| ^~~~~~~
make[3]: *** [Makefile:38770:.obj/qdeclarativepolylinemapitem.o] 错误 1
make[3]: 离开目录“/usr/bin/qt-everywhere-src-5.15.1/qtlocation/src/location”
make[2]: *** [Makefile:181:sub-location-make_first] 错误 2
make[2]: 离开目录“/usr/bin/qt-everywhere-src-5.15.1/qtlocation/src”
make[1]: *** [Makefile:49:sub-src-make_first] 错误 2
make[1]: 离开目录“/usr/bin/qt-everywhere-src-5.15.1/qtlocation”
make: *** [Makefile:816:module-qtlocation-make_first] 错误 2
尝试过在官网下载单独的模块,但是make时也报错,比如安装qtcharts模块
kwbinr@ubuntu:/usr/bin/qtcharts-everywhere-src-5.15.1$ make
cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /usr/bin/qtcharts-everywhere-src-5.15.1/src/src.pro ) && make -f Makefile
make[1]: 进入目录“/usr/bin/qtcharts-everywhere-src-5.15.1/src”
cd charts/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /usr/bin/qtcharts-everywhere-src-5.15.1/src/charts/charts.pro ) && make -f Makefile
make[2]: 进入目录“/usr/bin/qtcharts-everywhere-src-5.15.1/src/charts”
g++ -c -include .pch/Qt5Charts -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -D_REENTRANT -fPIC -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CHARTS_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_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ianimations -Iareachart -Iaxis -Iaxis/valueaxis -Iaxis/barcategoryaxis -Iaxis/categoryaxis -Iaxis/logvalueaxis -Iaxis/datetimeaxis -Idomain -Ibarchart -Ibarchart/vertical/bar -Ibarchart/vertical/stacked -Ibarchart/vertical/percent -Ibarchart/horizontal/bar -Ibarchart/horizontal/stacked -Ibarchart/horizontal/percent -Ilegend -Ilinechart -Ipiechart -Iscatterchart -Isplinechart -Ithemes -Ixychart -Ilayout -Iboxplotchart -Icandlestickchart -I../../include -I../../include/QtCharts -I../../include/QtCharts/5.15.1 -I../../include/QtCharts/5.15.1/QtCharts -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qxymodelmapper.o xychart/qxymodelmapper.cpp
xychart/qxymodelmapper.cpp: In member function ‘qreal QtCharts::QXYModelMapperPrivate::valueFromModel(QModelIndex)’:
xychart/qxymodelmapper.cpp:270:31: error: ‘class QDate’ has no member named ‘startOfDay’
270 | return value.toDate().startOfDay().toMSecsSinceEpoch();
| ^~~~~~~~~~
make[2]: *** [Makefile:10766:.obj/qxymodelmapper.o] 错误 1
make[2]: 离开目录“/usr/bin/qtcharts-everywhere-src-5.15.1/src/charts”
make[1]: *** [Makefile:47:sub-charts-make_first-ordered] 错误 2
make[1]: 离开目录“/usr/bin/qtcharts-everywhere-src-5.15.1/src”
make: *** [Makefile:49:sub-src-make_first] 错误 2