qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.66k stars 3.02k forks source link

compilation error with qt6 and grass #47848

Closed t0b3 closed 2 years ago

t0b3 commented 2 years ago

What is the bug or the crash?

compilation fails with

[3141/4138] Building CXX object src/providers/grass/7/CMakeFiles/qgisgrass7.dir/__/qgsgrassprovider.cpp.o
FAILED: src/providers/grass/7/CMakeFiles/qgisgrass7.dir/__/qgsgrassprovider.cpp.o 
/usr/lib64/ccache/clang++ -DQGIS_DISABLE_DEPRECATED -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050800 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -Dqgisgrass7_EXPORTS -I/usr/src/qgis/build/src/providers/grass/7/qgisgrass7_autogen/include -I/usr/src/qgis/build -I/usr/src/qgis/build/src/providers/grass -I/usr/src/qgis/build/src/providers/grass/7 -I/usr/src/qgis/src/core -I/usr/src/qgis/build/src/core -I/usr/src/qgis/src/core/3d -I/usr/src/qgis/src/core/annotations -I/usr/src/qgis/src/core/auth -I/usr/src/qgis/src/core/browser -I/usr/src/qgis/src/core/callouts -I/usr/src/qgis/src/core/classification -I/usr/src/qgis/src/core/diagram -I/usr/src/qgis/src/core/dxf -I/usr/src/qgis/src/core/editform -I/usr/src/qgis/src/core/effects -I/usr/src/qgis/src/core/expression -I/usr/src/qgis/src/core/externalstorage -I/usr/src/qgis/src/core/fieldformatter -I/usr/src/qgis/src/core/geometry -I/usr/src/qgis/src/core/geocms -I/usr/src/qgis/src/core/geocms/geonode -I/usr/src/qgis/src/core/geocoding -I/usr/src/qgis/src/core/gps -I/usr/src/qgis/src/core/labeling -I/usr/src/qgis/src/core/layertree -I/usr/src/qgis/src/core/layout -I/usr/src/qgis/src/core/locator -I/usr/src/qgis/src/core/maprenderer -I/usr/src/qgis/src/core/mesh -I/usr/src/qgis/src/core/metadata -I/usr/src/qgis/src/core/network -I/usr/src/qgis/src/core/numericformats -I/usr/src/qgis/src/core/pal -I/usr/src/qgis/src/core/pointcloud -I/usr/src/qgis/src/core/pointcloud/expression -I/usr/src/qgis/src/core/processing -I/usr/src/qgis/src/core/processing/models -I/usr/src/qgis/src/core/proj -I/usr/src/qgis/src/core/project -I/usr/src/qgis/src/core/providers -I/usr/src/qgis/src/core/providers/arcgis -I/usr/src/qgis/src/core/providers/memory -I/usr/src/qgis/src/core/providers/gdal -I/usr/src/qgis/src/core/providers/ogr -I/usr/src/qgis/src/core/providers/meshmemory -I/usr/src/qgis/src/core/raster -I/usr/src/qgis/src/core/renderer -I/usr/src/qgis/src/core/scalebar -I/usr/src/qgis/src/core/settings -I/usr/src/qgis/src/core/symbology -I/usr/src/qgis/src/core/textrenderer -I/usr/src/qgis/src/core/validity -I/usr/src/qgis/src/core/vector -I/usr/src/qgis/src/core/vectortile -I/usr/src/qgis/external -I/usr/src/qgis/external/nlohmann -I/usr/src/qgis/external/kdbush/include -I/usr/src/qgis/external/nmea -I/usr/src/qgis/external/rtree/include -I/usr/src/qgis/external/meshOptimizer -I/usr/src/qgis/src/core/providers/ept -isystem /usr/include/gdal -isystem /usr/lib64/grass78/include -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtDBus -isystem /usr/include/qt6/QtXml -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtSvg -isystem /usr/include/qt6/QtPrintSupport -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtSql -isystem /usr/include/qt6/QtConcurrent -isystem /usr/local/include/Qca-qt6/QtCrypto -isystem /usr/local/include/qt6keychain -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtCore5Compat -Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing -Wnon-virtual-dtor -Wno-redundant-move -Wreturn-type-c-linkage -Woverloaded-virtual -Wimplicit-fallthrough -Wrange-loop-construct -Qunused-arguments -Xclang -plugin-arg-clazy -Xclang connect-3arg-lambda,lambda-unique-connection,empty-qstringliteral,fully-qualified-moc-types,lambda-in-connect,lowercase-qml-type-name,qcolor-from-literal,qfileinfo-exists,qmap-with-pointer-key,unused-non-trivial-variable,overridden-signal,qdeleteall,qstring-left,skipped-base-method,missing-qobject-macro,isempty-vs-count -fPIC -fvisibility=hidden -DGRASS_BASE=\"/usr/lib64/grass78\" "-DGRASS_OFF_T_SIZE=8" -std=gnu++17 -MD -MT src/providers/grass/7/CMakeFiles/qgisgrass7.dir/__/qgsgrassprovider.cpp.o -MF src/providers/grass/7/CMakeFiles/qgisgrass7.dir/__/qgsgrassprovider.cpp.o.d -o src/providers/grass/7/CMakeFiles/qgisgrass7.dir/__/qgsgrassprovider.cpp.o -c /usr/src/qgis/src/providers/grass/qgsgrassprovider.cpp
/usr/src/qgis/src/providers/grass/qgsgrassprovider.cpp:508:15: error: no member named 'leftRef' in 'QString'
  return name.leftRef( pos ).toInt();
         ~~~~ ^
1 error generated.

Steps to reproduce the issue

compile on fedora 35 with grass7 according to the manual

Versions

master

Supported QGIS version

New profile

Additional context

No response

nyalldawson commented 2 years ago

Qt 6 isn't supported

t0b3 commented 2 years ago

true, I'll suggest a PR to make it work :smile: