kactus2 / kactus2dev

Kactus2 is a graphical EDA tool based on the IP-XACT standard.
https://research.tuni.fi/system-on-chip/tools/
GNU General Public License v2.0
191 stars 34 forks source link

Build failed with QT 6.6.0 with incomplete type ‘QSharedPointer<Design> #85

Closed vowstar closed 10 months ago

vowstar commented 10 months ago

Build OK with QT 6.5.3 Build FAIL with QT 6.6.0

g++ -c -pipe -I/usr/include/python3.11 -fPIE -O2 -Wall -Wextra -fPIC -D_REENTRANT -D_WINDOWS -DQT_DLL -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_HELP_LIB -DQT_WIDGETS_LIB -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I. -IGeneratedFiles -IKactusAPI/include -I/../qttools/include -I/../qttools/include/QtHelp -I/../qtxmlpatterns/include/QtXmlPatterns -I/../qtxmlpatterns/include -I/usr/include/qt6 -I/usr/include/qt6/QtPrintSupport -I/usr/include/qt6/QtHelp -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtSvg -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtXml -I/usr/include/qt6/QtSql -I/usr/include/qt6/QtCore -IGeneratedFiles -I/usr/lib64/qt6/mkspecs/linux-g++ -o release/HWComponentAddCommand.o editors/HWDesign/undoCommands/HWComponentAddCommand.cpp
In file included from editors/HWDesign/undoCommands/HWComponentAddCommand.cpp:12:
editors/HWDesign/undoCommands/HWComponentAddCommand.h:79:28: error: field ‘containingDesign_’ has incomplete type ‘QSharedPointer<Design>’
   79 |     QSharedPointer<Design> containingDesign_;
      |                            ^~~~~~~~~~~~~~~~~
In file included from /usr/include/qt6/QtCore/qobject.h:18,
                 from /usr/include/qt6/QtGui/qundostack.h:8,
                 from /usr/include/qt6/QtGui/QUndoCommand:1,
                 from editors/HWDesign/undoCommands/HWComponentAddCommand.h:15:
/usr/include/qt6/QtCore/qmetatype.h:222:7: note: declaration of ‘class QSharedPointer<Design>’
  222 |     F(QSharedPointer) \
      |       ^~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qmetatype.h:849:30: note: in definition of macro ‘QT_FORWARD_DECLARE_SHARED_POINTER_TYPES_ITER’
  849 |     template <class T> class Name; \
      |                              ^~~~
/usr/include/qt6/QtCore/qmetatype.h:851:1: note: in expansion of macro ‘QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER’
  851 | QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(QT_FORWARD_DECLARE_SHARED_POINTER_TYPES_ITER)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile.Kactus2:32343: release/HWComponentAddCommand.o] Error 1
make[1]: Leaving directory '/home/vowstar/Projects/2022/kactus2/kactus2dev'
make: *** [Makefile:118: sub-Kactus2-pro-make_first] Error 2

It looks like missing QSharedPointer include with QT 6.6.0 update.

vowstar commented 10 months ago

These files need change:

    modified:   editors/HWDesign/undoCommands/HWComponentAddCommand.h
    modified:   editors/SystemDesign/UndoCommands/ApiConnectionDeleteCommand.h
    modified:   editors/SystemDesign/UndoCommands/ComConnectionDeleteCommand.h
    modified:   editors/SystemDesign/UndoCommands/SWInterfaceDeleteCommand.h
    modified:   editors/SystemDesign/UndoCommands/SystemComponentDeleteCommand.h
    modified:   editors/SystemDesign/UndoCommands/SystemDeleteCommands.h

After local testing is completed, I will pull request to fix this problem.