[Debian-med-packaging] Bug#964646: oscar: FTBFS: ../../oscar/SleepLib/machine.h:162:61: error: ‘QString& QString::sprintf(const char*, ...) ’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]

Lucas Nussbaum lucas at debian.org
Thu Jul 9 11:48:21 BST 2020


Source: oscar
Version: 1.1.0-testing-3-3
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200709 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> g++ -c -pipe -Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -frtti -Wall -Wextra -D_REENTRANT -fPIC -Dhelpless -DQT_DEPRECATED_WARNINGS -DNO_UPDATER -DLOCK_RESMED_SESSIONS -D_TTY_POSIX_ -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SERIALPORT_LIB -DQT_CORE_LIB -I../../oscar -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -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/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtSerialPort -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o mainwindow.o ../../oscar/mainwindow.cpp
> In file included from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/exportcsv.cpp:14:
> ../../oscar/SleepLib/machine.h: In member function ‘QString Machine::hexid()’:
> ../../oscar/SleepLib/machine.h:162:61: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>   162 |     QString hexid() { return QString().sprintf("%08lx", m_id); }
>       |                                                             ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdir.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qfiledialog.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QFileDialog:1,
>                  from ../../oscar/exportcsv.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> In file included from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/daily.cpp:26:
> ../../oscar/SleepLib/machine.h: In member function ‘QString Machine::hexid()’:
> ../../oscar/SleepLib/machine.h:162:61: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>   162 |     QString hexid() { return QString().sprintf("%08lx", m_id); }
>       |                                                             ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringlist.h:41,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qcolor.h:46,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/QTextCharFormat:1,
>                  from ../../oscar/daily.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> ../../oscar/exportcsv.cpp: In member function ‘void ExportCSV::on_exportButton_clicked()’:
> ../../oscar/exportcsv.cpp:259:74: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>   259 |                 data += sep + QString().sprintf("%02i:%02i:%02i", h, m, s);
>       |                                                                          ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdir.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qfiledialog.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QFileDialog:1,
>                  from ../../oscar/exportcsv.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> ../../oscar/exportcsv.cpp:301:78: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>   301 |                     data += sep + QString().sprintf("%02i:%02i:%02i", h, m, s);
>       |                                                                              ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdir.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qfiledialog.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QFileDialog:1,
>                  from ../../oscar/exportcsv.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> In file included 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/qfiledialog.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QFileDialog:1,
>                  from ../../oscar/exportcsv.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h: In instantiation of ‘T qExchange(T&, U&&) [with T = QDebug::Stream*; U = long int]’:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdebug.h:118:77:   required from here
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1050:7: error: invalid conversion from ‘long int’ to ‘QDebug::Stream*’ [-fpermissive]
>  1050 |     t = std::forward<U>(newValue);
>       |     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |       |
>       |       long int
> In file included from ../../oscar/main.cpp:25:
> ../../oscar/logger.h: In constructor ‘LogThread::LogThread()’:
> ../../oscar/logger.h:19:73: error: ‘void QTime::start()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
>    19 |     explicit LogThread() : QRunnable() { running = false; logtime.start(); }
>       |                                                                         ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
>                  from ../../oscar/logger.h:8,
>                  from ../../oscar/main.cpp:25:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:228:55: note: declared here
>   228 |     QT_DEPRECATED_X("Use QElapsedTimer instead") void start();
>       |                                                       ^~~~~
> ../../oscar/daily.cpp: In member function ‘void Daily::on_ReloadDay()’:
> ../../oscar/daily.cpp:814:16: error: ‘void QTime::start()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
>   814 |     time.start();
>       |                ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QDateTime:1,
>                  from ../../oscar/SleepLib/machine.h:16,
>                  from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/daily.cpp:26:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:228:55: note: declared here
>   228 |     QT_DEPRECATED_X("Use QElapsedTimer instead") void start();
>       |                                                       ^~~~~
> ../../oscar/daily.cpp:821:30: error: ‘int QTime::restart()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
>   821 |     unload_time=time.restart();
>       |                              ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QDateTime:1,
>                  from ../../oscar/SleepLib/machine.h:16,
>                  from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/daily.cpp:26:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:229:54: note: declared here
>   229 |     QT_DEPRECATED_X("Use QElapsedTimer instead") int restart();
>       |                                                      ^~~~~~~
> ../../oscar/daily.cpp:825:28: error: ‘int QTime::restart()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
>   825 |     load_time=time.restart();
>       |                            ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QDateTime:1,
>                  from ../../oscar/SleepLib/machine.h:16,
>                  from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/daily.cpp:26:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:229:54: note: declared here
>   229 |     QT_DEPRECATED_X("Use QElapsedTimer instead") int restart();
>       |                                                      ^~~~~~~
> ../../oscar/daily.cpp:843:29: error: ‘int QTime::restart()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]
>   843 |     other_time=time.restart();
>       |                             ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QDateTime:1,
>                  from ../../oscar/SleepLib/machine.h:16,
>                  from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/daily.cpp:26:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:229:54: note: declared here
>   229 |     QT_DEPRECATED_X("Use QElapsedTimer instead") int restart();
>       |                                                      ^~~~~~~
> ../../oscar/daily.cpp: In member function ‘QString Daily::getStatisticsInfo(Day*)’:
> ../../oscar/daily.cpp:1263:131: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>  1263 |                        QString("</b></td><td colspan=2 bgcolor='white'>%1</td></tr>").arg(QString().sprintf("%02i:%02i:%02i",h,m,s));
>       |                                                                                                                                   ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringlist.h:41,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qcolor.h:46,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/QTextCharFormat:1,
>                  from ../../oscar/daily.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> ../../oscar/daily.cpp: In member function ‘QString Daily::getSleepTime(Day*)’:
> ../../oscar/daily.cpp:1335:58: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>  1335 |             .arg(QString().sprintf("%02i:%02i:%02i",h,m,s));
>       |                                                          ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringlist.h:41,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qcolor.h:46,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/QTextCharFormat:1,
>                  from ../../oscar/daily.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> In file included from ../../oscar/SleepLib/profiles.h:19,
>                  from ../../oscar/daily.h:25,
>                  from ../../oscar/mainwindow.h:19,
>                  from ../../oscar/main.cpp:26:
> ../../oscar/SleepLib/machine.h: In member function ‘QString Machine::hexid()’:
> ../../oscar/SleepLib/machine.h:162:61: error: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Werror=deprecated-declarations]
>   162 |     QString hexid() { return QString().sprintf("%08lx", m_id); }
>       |                                                             ^
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:44,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1,
>                  from ../../oscar/main.cpp:13:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:382:14: note: declared here
>   382 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>       |              ^~~~~~~
> In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextformat.h:43,
>                  from /usr/include/x86_64-linux-gnu/qt5/QtGui/QTextCharFormat:1,
>                  from ../../oscar/daily.cpp:9:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h: In instantiation of ‘T qExchange(T&, U&&) [with T = QDebug::Stream*; U = long int]’:
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qdebug.h:118:77:   required from here
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1050:7: error: invalid conversion from ‘long int’ to ‘QDebug::Stream*’ [-fpermissive]
>  1050 |     t = std::forward<U>(newValue);
>       |     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |       |
>       |       long int
> cc1plus: all warnings being treated as errors
> make[2]: *** [Makefile:1365: exportcsv.o] Error 1

The full build log is available from:
   http://qa-logs.debian.net/2020/07/09/oscar_1.1.0-testing-3-3_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.



More information about the Debian-med-packaging mailing list