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.59k stars 3.01k forks source link

Compile error `WITH_SERIALPORT=false` #53571

Closed t0b3 closed 1 year ago

t0b3 commented 1 year ago

What is the bug or the crash?

Compile error WITH_SERIALPORT=false

FAILED: python/CMakeFiles/python_module_qgis__core.dir/core/build/_core/sip_corepart0.cpp.o 
/usr/lib/llvm/16/bin/x86_64-pc-linux-gnu-clang++ -DQT_CONCURRENT_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_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DSIP_VERSION=0x060709 -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -Dprotected=public -Dpython_module_qgis__core_EXPORTS -I"/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/)" -I"/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/(" -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/endif -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/analysis/processing/pdal -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/PDAL_2_5_OR_HIGHER -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/NOT -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/AND -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/WITH_PDAL -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/if -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/interpolation -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/network -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/raster -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/mesh -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/vector -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/georeferencing -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis/processing -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/plugins -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/ui -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/analysis -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/python/../src/server -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/server -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/src/core -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/3d -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/actions -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/annotations -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/auth -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/browser -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/callouts -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/classification -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/diagram -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/dxf -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/editform -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/effects -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/elevation -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/expression -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/externalstorage -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/fieldformatter -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/geometry -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/geocoding -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/gps -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/labeling -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/layertree -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/layout -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/locator -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/maprenderer -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/mesh -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/metadata -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/network -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/numericformats -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/pal -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/plot -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/pointcloud -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/pointcloud/expression -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/processing -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/processing/models -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/proj -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/project -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/arcgis -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/memory -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/gdal -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/ogr -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/meshmemory -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/raster -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/renderer -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/scalebar -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/settings -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/sensor -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/symbology -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/textrenderer -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/validity -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/vector -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/vectortile -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external/nlohmann -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external/kdbush/include -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external/nmea -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external/rtree/include -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/external/meshOptimizer -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/ept -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/copc -I/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/providers/vpc -isystem /usr/include/python3.11 -isystem /usr/include/gdal -isystem /usr/include/qwt6 -isystem /usr/include/Qca-qt5/QtCrypto -isystem /usr/include/qt5keychain -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtPositioning  -Wunused-but-set-variable -Qunused-arguments -fPIC -fvisibility=default -fPIC -MD -MT python/CMakeFiles/python_module_qgis__core.dir/core/build/_core/sip_corepart0.cpp.o -MF python/CMakeFiles/python_module_qgis__core.dir/core/build/_core/sip_corepart0.cpp.o.d -o python/CMakeFiles/python_module_qgis__core.dir/core/build/_core/sip_corepart0.cpp.o -c /var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build/_core/sip_corepart0.cpp
In file included from /var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build/_core/sip_corepart0.cpp:7:
In file included from /var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build/_core/sipAPI_core.h:10:
/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build/sip.h:76:9: warning: 'SIP_VERSION' macro redefined [-Wmacro-redefined]
#define SIP_VERSION                 0x60709
        ^
<command line>:16:9: note: previous definition is here
#define SIP_VERSION 0x060709
        ^
conversions.sip:3150:24: warning: comparison of different enumeration types ('Type' and 'QMetaType::Type') [-Wenum-compare]
       && varp->type() != QMetaType::VoidStar
          ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
conversions.sip:3151:24: warning: comparison of different enumeration types ('Type' and 'QMetaType::Type') [-Wenum-compare]
       && varp->type() != QMetaType::Nullptr
          ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
conversions.sip:3152:24: warning: comparison of different enumeration types ('Type' and 'QMetaType::Type') [-Wenum-compare]
       && varp->type() != QMetaType::QObjectStar )
          ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0_build/python/core/build/_core/sip_corepart0.cpp:30437:22: warning: 'qHash' is deprecated [-Wdeprecated-declarations]
            sipRes = qHash(*a0);
                     ^
/var/tmp/portage/sci-geosciences/qgis-3.32.0/work/qgis-3.32.0/src/core/symbology/qgssymbollayerreference.h:211:1: note: 'qHash' has been explicitly marked deprecated here
Q_DECL_DEPRECATED inline uint qHash( const QgsSymbolLayerId &id )
^
/usr/include/qt5/QtCore/qcompilerdetection.h:236:45: note: expanded from macro 'Q_DECL_DEPRECATED'
#  define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
                                            ^
auto_generated/symbology/qgsstyle.sip:1251:14: warning: enumeration values 'LegendPatchShapeEntity' and 'Symbol3DEntity' not handled in switch [-Wswitch]
    switch ( sipCpp->type() )
             ^~~~~~~~~~~~~~
auto_generated/sensor/qgsabstractsensor.sip:35:80: error: unknown type name 'QgsSerialPortSensor'
      else if ( item->type() == QLatin1String( "serial_port" ) && dynamic_cast<QgsSerialPortSensor *>( item ) != NULL )
                                                                               ^

Steps to reproduce the issue

compile 3.32.0 using option WITH_SERIALPORT=false

Versions

Supported QGIS version

New profile

Additional context

cc @nirvn IIUC this issue might be related to your commits. any idea how to get WITH_SERIALPORT=false compiling? or would you vote to drop support for this option and make qtserial a requirement?

cjmayo commented 1 year ago

Patch that fixes this for me in #53573.

stefantalpalaru commented 8 months ago

Problem reintroduced in 3.36.0: https://github.com/qgis/QGIS/blob/09951dc0acf6f7ab5b5de7fb0c590dbaef28e9f9/python/core/core.sip.in#L101