KikoPlayProject / KikoPlay

KikoPlay - NOT ONLY A Full-Featured Danmu Player 不仅仅是全功能弹幕播放器
https://kikoplay.fun
GNU General Public License v3.0
1.57k stars 96 forks source link

Kikoplay 编译失败 #171

Closed szdytom closed 2 weeks ago

szdytom commented 3 weeks ago

使用 qmake 编译最新提交(701e99cd08806520a85b597a946cbfdfce882bae)失败,相关日志:

g++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -DQT_MESSAGELOGCONTEXT -DQT_DEPRECATED_WARNINGS -DZLIB_WINAPI -DCONFIG_UNIX_DATA -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I../KikoPlay -I. -I../KikoPlay/Play/Video -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtSql -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtConcurrent -I/usr/include/qt/QtXml -I/usr/include/qt/QtDBus -I/usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/upnpdevice.o ../KikoPlay/LANServer/dlna/upnpdevice.cpp
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp: In member function ‘QNetworkReply* QWebdav::propfind(const QString&, const PropNames&, int)’:
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:358:40: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  358 |                 query += "<D:" + key + "/>";
      |                                        ^~~~
In file included from /usr/include/qt/QtCore/qobject.h:47,
                 from /usr/include/qt/QtCore/qabstractanimation.h:43,
                 from /usr/include/qt/QtCore/QtCore:6:
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:360:57: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  360 |                 query += "<" + key + " xmlns=\"" + ns + "\"/>";
      |                                                         ^~~~~~
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp: In member function ‘QNetworkReply* QWebdav::proppatch(const QString&, const PropValues&)’:
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:392:44: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  392 |                 query += "<D:" + i.key() + ">";
      |                                            ^~~
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:393:45: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  393 |                 query += i.value().toString();
      |                                             ^
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:394:45: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  394 |                 query += "</D:" + i.key() + ">" ;
      |                                             ^~~
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:396:61: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  396 |                 query += "<" + i.key() + " xmlns=\"" + ns + "\">";
      |                                                             ^~~~~
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:397:45: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  397 |                 query += i.value().toString();
      |                                             ^
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
../KikoPlay/Play/Playlist/webdav/qwebdav.cpp:398:62: warning: ‘QByteArray& QByteArray::operator+=(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations]
  398 |                 query += "</" + i.key() + " xmlns=\"" + ns + "\"/>";
      |                                                              ^~~~~~
/usr/include/qt/QtCore/qstring.h:1518:20: note: declared here
 1518 | inline QByteArray &QByteArray::operator+=(const QString &s)
      |                    ^~~~~~~~~~
g++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -DQT_MESSAGELOGCONTEXT -DQT_DEPRECATED_WARNINGS -DZLIB_WINAPI -DCONFIG_UNIX_DATA -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I../KikoPlay -I. -I../KikoPlay/Play/Video -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtSql -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtConcurrent -I/usr/include/qt/QtXml -I/usr/include/qt/QtDBus -I/usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/upnpservice.o ../KikoPlay/LANServer/dlna/upnpservice.cpp
cc1plus: some warnings being treated as errors

环境:Manjaro Linux,qt5-base 5.15.13,QMake version 3.1,gcc version 14.1.1 20240522 (GCC)

Protostars commented 3 weeks ago

看起来是把warning也按错误处理了,是不是gcc版本太高了 -Werror=format-security

madoka773 commented 3 weeks ago

我这边flatpak没问题