Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues (Ubuntu 21.04) #1

Closed
mubes opened this issue Sep 10, 2021 · 7 comments
Closed

Build issues (Ubuntu 21.04) #1

mubes opened this issue Sep 10, 2021 · 7 comments
Assignees

Comments

@mubes
Copy link

mubes commented Sep 10, 2021

Hi, had a few problems building on this platform, with a number of depreciated declarations;

Builds/seer/src/SeerDebugDialog.cpp: In constructor ‘SeerDebugDialog::SeerDebugDialog(QWidget*)’:
Builds/seer/src/SeerDebugDialog.cpp:13:84: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
   13 | amPidLineEdit->setMaximumWidth(fontMetrics().width("888888888888888"));
      |                                                                     ^

In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from /home/dmarples/Builds/seer/src/SeerDebugDialog.h:3,
                 from /home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
Builds/seer/src/SeerDebugDialog.cpp:14:90: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
   14 | tPortLineEdit->setMaximumWidth(fontMetrics().width("XXXXXXXXXXXXXXX"));
      |                                                                     ^

In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from /home/dmarples/Builds/seer/src/SeerDebugDialog.h:3,
                 from /home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~

...etc

I'm afraid this escalates to errors further on;

[ 39%] Building CXX object CMakeFiles/seer.dir/SeerEditorWidgetSourceArea.cpp.o
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp: In member function ‘int SeerEditorWidgetSourceArea::lineNumberAreaWidth()’:
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:120:57: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
  120 |     int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits;
      |                                                         ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidget.h:3,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:110:9: note: declared here
  110 |     int width(QChar) const;
      |         ^~~~~
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp: In member function ‘void SeerEditorWidgetSourceArea::breakPointAreaPaintEvent(QPaintEvent*)’:
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:250:34: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
  250 |                     QPainterPath path;
      |                                  ^~~~
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:264:34: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
  264 |                     QPainterPath path;
      |                                  ^~~~
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp: In member function ‘void SeerEditorWidgetSourceArea::miniMapAreaPaintEvent(QPaintEvent*)’:
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:316:42: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
  316 |                 if (fm.width(block.text()) > pixmapWidth) {
      |                                          ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidget.h:3,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
/home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:317:56: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
  317 |                     pixmapWidth = fm.width(block.text());
      |                                                        ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidget.h:3,
                 from /home/dmarples/Builds/seer/src/SeerEditorWidgetSourceArea.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
  106 |     int width(const QString &, int len = -1) const;
      |         ^~~~~
make[3]: *** [CMakeFiles/seer.dir/build.make:277: CMakeFiles/seer.dir/SeerEditorWidgetSourceArea.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:96: CMakeFiles/seer.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:103: CMakeFiles/seer.dir/rule] Error 2
make: *** [Makefile:137: seer] Error 2

I suspect this is a versioning problem or similar. cmake passed ok.

Regards

DAVE

@epasveer
Copy link
Owner

Hi Dave,

Thanks for trying out Seer.

Can you tell me what version of QT5 you're using?

Thanks.

@epasveer
Copy link
Owner

Hi Dave,

I think I fixed all the problems reported in your list. Grab version v1.0.2.

Let me know how it goes.

@mubes
Copy link
Author

mubes commented Sep 13, 2021 via email

@epasveer
Copy link
Owner

Did you do a :

% make seer

@mubes
Copy link
Author

mubes commented Sep 13, 2021

Nope, I just did a make. make seer is much more effective :-)

Got a few small warnings, but nothing to lose sleep over;

/home/dmarples/Builds/seer/src/SeerDebugDialog.cpp: In constructor
‘SeerDebugDialog::SeerDebugDialog(QWidget*)’:
/home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:35:107: warning:
‘void QButtonGroup::buttonClicked(int)’ is deprecated: Use
QButtonGroup::idClicked(int) instead [-Wdeprecated-declarations]
    35 | ct::connect(_runModeButtonGroup,
QOverload<int>::of(&QButtonGroup::buttonClicked), this,
&SeerDebugDialog::handleRunModeChanged);
| ^

In file included from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QButtonGroup:1,
                  from /home/dmarples/Builds/seer/src/SeerDebugDialog.h:4,
                  from /home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qbuttongroup.h:90:10: note:
declared here
    90 |     void buttonClicked(int);
       |          ^~~~~~~~~~~~~
/home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:35:107: warning:
‘void QButtonGroup::buttonClicked(int)’ is deprecated: Use
QButtonGroup::idClicked(int) instead [-Wdeprecated-declarations]
    35 | ct::connect(_runModeButtonGroup,
QOverload<int>::of(&QButtonGroup::buttonClicked), this,
&SeerDebugDialog::handleRunModeChanged);
| ^

In file included from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QButtonGroup:1,
                  from /home/dmarples/Builds/seer/src/SeerDebugDialog.h:4,
                  from /home/dmarples/Builds/seer/src/SeerDebugDialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qbuttongroup.h:90:10: note:
declared here
    90 |     void buttonClicked(int);
       |          ^~~~~~~~~~~~~




[ 41%] Building CXX object CMakeFiles/seer.dir/SeerGdbWidget.cpp.o
/home/dmarples/Builds/seer/src/SeerGdbWidget.cpp: In member function
‘void SeerGdbWidget::handleGdbDataDeleteExpressions(QString)’:
/home/dmarples/Builds/seer/src/SeerGdbWidget.cpp:899:75: warning:
‘QStringList QString::split(QChar, QString::SplitBehavior,
Qt::CaseSensitivity) const’ is deprecated: Use Qt::SplitBehavior variant
instead [-Wdeprecated-declarations]
   899 |         QStringList ids = expressionids.split(' ',
QString::SkipEmptyParts);
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:47,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:45,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                  from /home/dmarples/Builds/seer/src/SeerConsoleWidget.h:3,
                  from /home/dmarples/Builds/seer/src/SeerGdbWidget.h:3,
                  from /home/dmarples/Builds/seer/src/SeerGdbWidget.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:615:17: note:
declared here
   615 |     QStringList split(QChar sep, SplitBehavior behavior,
       |                 ^~~~~




[ 51%] Building CXX object
CMakeFiles/seer.dir/SeerMemoryVisualizerWidget.cpp.o
/home/dmarples/Builds/seer/src/SeerMemoryVisualizerWidget.cpp: In member
function ‘void SeerMemoryVisualizerWidget::handleText(const QString&)’:
/home/dmarples/Builds/seer/src/SeerMemoryVisualizerWidget.cpp:127:137:
warning: ‘QStringList QString::split(QChar, QString::SplitBehavior,
Qt::CaseSensitivity) const’ is deprecated: Use Qt::SplitBehavior variant
instead [-Wdeprecated-declarations]
   127 | = Seer::filterEscapes(Seer::parseFirst(text, "value=", '"',
'"', false)).split(' ',QString::SkipEmptyParts);
| ^

In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:47,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:45,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                  from
/home/dmarples/Builds/seer/src/SeerMemoryVisualizerWidget.h:3,
                  from
/home/dmarples/Builds/seer/src/SeerMemoryVisualizerWidget.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:615:17: note:
declared here
   615 |     QStringList split(QChar sep, SplitBehavior behavior,
       |                 ^~~~~```


```[ 67%] Building CXX object
CMakeFiles/seer.dir/SeerStackFramesBrowserWidget.cpp.o
/home/dmarples/Builds/seer/src/SeerStackFramesBrowserWidget.cpp: In
member function ‘void SeerStackFramesBrowserWidget::handleText(const
QString&)’:
/home/dmarples/Builds/seer/src/SeerStackFramesBrowserWidget.cpp:102:80:
warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum =
Qt::MatchFlag; QFlags<T>::Zero = int QFlags<Qt::MatchFlag>::Private::*]’
is deprecated: Use default constructor instead [-Wdeprecated-declarations]
   102 |             QList<QTreeWidgetItem*> matches =
stackTreeWidget->findItems("0", 0);
| ^
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1304,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                  from
/home/dmarples/Builds/seer/src/SeerStackFramesBrowserWidget.h:3,
                  from
/home/dmarples/Builds/seer/src/SeerStackFramesBrowserWidget.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:123:80: note: declared
here
   123 |     QT_DEPRECATED_X("Use default constructor instead")
Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
       |





[ 74%] Building CXX object
CMakeFiles/seer.dir/SeerThreadFramesBrowserWidget.cpp.o
/home/dmarples/Builds/seer/src/SeerThreadFramesBrowserWidget.cpp: In
member function ‘void SeerThreadFramesBrowserWidget::handleText(const
QString&)’:
/home/dmarples/Builds/seer/src/SeerThreadFramesBrowserWidget.cpp:144:98:
warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum =
Qt::MatchFlag; QFlags<T>::Zero = int QFlags<Qt::MatchFlag>::Private::*]’
is deprecated: Use default constructor instead [-Wdeprecated-declarations]
   144 |             QList<QTreeWidgetItem*> matches =
threadTreeWidget->findItems(currentthreadid_text, 0);
| ^
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1304,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                  from
/home/dmarples/Builds/seer/src/SeerThreadFramesBrowserWidget.h:3,
                  from
/home/dmarples/Builds/seer/src/SeerThreadFramesBrowserWidget.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:123:80: note: declared
here
   123 |     QT_DEPRECATED_X("Use default constructor instead")
Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
| ^~~~~~
[ 76%] Building CXX object
CMakeFiles/seer.dir/SeerThreadIdsBrowserWidget.cpp.o
/home/dmarples/Builds/seer/src/SeerThreadIdsBrowserWidget.cpp: In member
function ‘void SeerThreadIdsBrowserWidget::handleText(const QString&)’:
/home/dmarples/Builds/seer/src/SeerThreadIdsBrowserWidget.cpp:67:91:
warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum =
Qt::MatchFlag; QFlags<T>::Zero = int QFlags<Qt::MatchFlag>::Private::*]’
is deprecated: Use default constructor instead [-Wdeprecated-declarations]
    67 |         QList<QTreeWidgetItem*> matches =
idsTreeWidget->findItems(currentthreadid_text, 0);
| ^
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1304,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:43,
                  from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                  from
/home/dmarples/Builds/seer/src/SeerThreadIdsBrowserWidget.h:3,
                  from
/home/dmarples/Builds/seer/src/SeerThreadIdsBrowserWidget.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:123:80: note: declared
here
   123 |     QT_DEPRECATED_X("Use default constructor instead")
Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
       |           

App seems to start OK but it'll have to wait until later before I get
chance to play with it. You might want to think on the name...the Ubuntu
repositories already have a 'seer' app;
http://manpages.ubuntu.com/manpages/bionic/man1/seer.1.html

Regards

DAVE

@epasveer
Copy link
Owner

I realize my OpenSuse machine is using QT5.12. You must be using a much newer version. The warnings about the deprecated use of :

QButtonGroup::buttonClicked()
QString::split(QString::SplitBehavior)

Will have to stay for a little while longer. :^(
They are warnings. So a seer binary will still be generated.

@epasveer epasveer self-assigned this Sep 19, 2021
@epasveer epasveer closed this as completed Jan 9, 2022
@epasveer
Copy link
Owner

epasveer commented Jan 9, 2022

When I switch to QT6, I'll fix the remaining compile issues.

Closing the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants