qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.27k stars 3.98k forks source link

[Musl-libc] Include `execinfo.h` cause compilation of qB failed, while `STACKTRACE` is enabled by default. #13916

Closed IceCodeNew closed 3 years ago

IceCodeNew commented 3 years ago

Please provide the following information

qBittorrent version and Operating System

the v4_3_x branch

If on linux, libtorrent-rasterbar and Qt version

libtorrent-rasterbar: 1.2.11 Qt: 5.15.1

What is the problem

While using CMake to compile qBittorrent in an environment which was not shipped with glibc, like Alpine Linux (use musl libc as an alternative), the following line will cause src/app/stacktrace.h trying to find a header file that is not provided by musl libc: https://github.com/qbittorrent/qBittorrent/blob/1728c165808481440bf2a23ad1dc20b8a1da44c7/src/app/stacktrace.h#L9

What is the expected behavior

I'm not familiar with C/C++, maybe we should quote this part with #ifdef? I expect to see this project to pass the compilation painless with CMake while a user decides to escape from glibc and try to compile it against some next-generation libc implement like musl-libc.

Steps to reproduce

https://github.com/IceCodeNew/qbee_static/blob/857689b3b83cbd85413627d8f1fbc38548e87d3b/qbee_alpine_builder.Dockerfile I compiled qBittorrent in a docker container so it is easy to inspect every move I did and reproduce the whole process everywhere.

Extra info(if any)

Dockerfile log:

RUN source '/root/.bashrc' && export PATH=/build_root/qbittorrent-build/bin:$PATH && export CXXFLAGS=" -O2 -pipe -fexceptions -fstack-clash-protection -fstack-protector-strong -g -grecord-gcc-switches --static -static -I/build_root/qbittorrent-build/include -std=c++14" && export CFLAGS=" -O2 -pipe -fexceptions -fstack-clash-protection -fstack-protector-strong -g -grecord-gcc-switches --static -static -I/build_root/qbittorrent-build/include" && export LDFLAGS=" -Wl,-z,noexecstack,-z,relro,-z,now,-z,defs --static -static -Wl,--no-as-needed -L/build_root/qbittorrent-build/lib -lpthread -pthread" && mkdir qbee && curl -sS "https://github.com/IceCodeNew/qBittorrent-Enhanced-Edition/archive/v4_3_x.tar.gz" | bsdtar -xf- -C qbee --strip-components 1 && pushd qbee || exit 1 && cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/build_root/qbittorrent-build -DGUI=OFF -DVERBOSE_CONFIGURE=ON -DWEBUI=ON -DLibtorrentRasterbar_DIR=/build_root/qbittorrent-build/lib64/cmake/LibtorrentRasterbar -DBoost_DIR=/build_root/qbittorrent-build/lib/cmake/Boost-1.74.0 && cmake --build build && popd || exit 1 && rm -rf -- "/build_root/qbee" && dirs -c ---> Running in 091ab1f59737 /build_root/qbee /build_root -- The CXX compiler identification is GNU 10.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test Iconv_IS_BUILT_IN -- Performing Test Iconv_IS_BUILT_IN - Success -- Found OpenSSL: /usr/lib/libcrypto.so (found suitable version "1.1.1h", minimum required is "1.1.1") -- Found ZLIB: /lib/libz.so (found suitable version "1.2.11", minimum required is "1.2.11") -- Found Threads: TRUE -- The following features have been enabled: * STACKTRACE, Enable stacktraces (default: ON) * WEBUI, Enables built-in HTTP server for headless use (default: ON) * VERBOSE_CONFIGURE, Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts) (default: OFF) -- The following REQUIRED packages have been found: * LibtorrentRasterbar (required version >= 1.2.11) * boost_headers (required version == 1.74.0) * Boost (required version >= 1.65) * OpenSSL (required version >= 1.1.1) * ZLIB (required version >= 1.2.11) * Qt5Core * Qt5Network * Qt5Xml * Qt5LinguistTools * Threads * Qt5Sql * Qt5 (required version >= 5.9.5) -- The following features have been disabled: * GUI, Build GUI application (default: ON) * DBUS, Enables support for notifications and power-management features on Linux via D-Bus (default: ON; depends on condition: GUI) * SYSTEMD, Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR (default: OFF; depends on condition: NOT GUI) -- Configuring done -- Generating done -- Build files have been written to: /build_root/qbee/build [1/219] Automatic MOC and UIC for target qbt_base [2/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/build_root/qbittorrent-build/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin_Import.cpp.o [3/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/build_root/qbittorrent-build/lib/cmake/Qt5Network/Qt5Network_QGenericEnginePlugin_Import.cpp.o [4/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/string.cpp.o [5/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/random.cpp.o [6/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/password.cpp.o [7/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/net.cpp.o [8/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/misc.cpp.o [9/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/io.cpp.o [10/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/gzip.cpp.o ../src/base/utils/misc.cpp: In function 'QString Utils::Misc::opensslVersionString()': ../src/base/utils/misc.cpp:484:57: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 484 | return version.splitRef(' ', QString::SkipEmptyParts)[1].toString(); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/QString:1, from ../src/base/utils/misc.h:39, from ../src/base/utils/misc.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ [11/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/fs.cpp.o [12/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/foreignapps.cpp.o [13/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/utils/bytearray.cpp.o [14/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/tristatebool.cpp.o [15/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/torrentfilter.cpp.o [16/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/torrentfileguard.cpp.o [17/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/settingsstorage.cpp.o [18/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/search/searchpluginmanager.cpp.o [19/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/search/searchhandler.cpp.o [20/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/search/searchdownloadhandler.cpp.o [21/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/scanfoldersmodel.cpp.o [22/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_session.cpp.o [23/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_parser.cpp.o [24/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_item.cpp.o [25/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_folder.cpp.o [26/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_feed.cpp.o [27/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_autodownloadrule.cpp.o [28/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_autodownloader.cpp.o ../src/base/rss/rss_autodownloadrule.cpp: In member function 'bool RSS::AutoDownloadRule::matchesExpression(const QString&, const QString&) const': ../src/base/rss/rss_autodownloadrule.cpp:235:101: warning: 'QStringList QString::split(const QRegularExpression&, QString::SplitBehavior) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 235 | const QStringList wildcards {expression.split(whitespace, QString::SplitBehavior::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/qshareddata.h:46, from /build_root/qbittorrent-build/include/QtCore/QSharedDataPointer:1, from ../src/base/rss/rss_autodownloadrule.h:32, from ../src/base/rss/rss_autodownloadrule.cpp:30: /build_root/qbittorrent-build/include/QtCore/qstring.h:623:17: note: declared here 623 | QStringList split(const QRegularExpression &sep, SplitBehavior behavior) const; | ^~~~~ [29/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/rss/rss_article.cpp.o [30/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/profile_p.cpp.o [31/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/profile.cpp.o [32/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/preferences.cpp.o [33/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/smtp.cpp.o [34/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/reverseresolution.cpp.o [35/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/proxyconfigurationmanager.cpp.o ../src/base/net/smtp.cpp: In member function 'void Net::Smtp::authenticate()': ../src/base/net/smtp.cpp:453:95: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 453 | const QStringList auth = m_extensions["AUTH"].toUpper().split(' ', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qobject.h:47, from /build_root/qbittorrent-build/include/QtCore/qiodevice.h:45, from /build_root/qbittorrent-build/include/QtNetwork/qabstractsocket.h:44, from /build_root/qbittorrent-build/include/QtNetwork/QAbstractSocket:1, from ../src/base/net/smtp.h:36, from ../src/base/net/smtp.cpp:33: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ [36/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/portforwarder.cpp.o [37/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/geoipmanager.cpp.o [38/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/geoipdatabase.cpp.o [39/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/downloadmanager.cpp.o [40/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/downloadhandlerimpl.cpp.o [41/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/net/dnsupdater.cpp.o [42/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/logger.cpp.o [43/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/iconprovider.cpp.o [44/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/server.cpp.o [45/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/responsegenerator.cpp.o [46/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/responsebuilder.cpp.o [47/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/requestparser.cpp.o [48/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/httperror.cpp.o [49/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/http/connection.cpp.o [50/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/filesystemwatcher.cpp.o ../src/base/http/requestparser.cpp: In member function 'bool Http::RequestParser::parseStartLines(const QString&)': ../src/base/http/requestparser.cpp:151:82: warning: 'QVector QString::splitRef(const QString&, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 151 | const QVector lines = data.splitRef(CRLF, QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtNetwork/qhostaddress.h:46, from /build_root/qbittorrent-build/include/QtNetwork/QHostAddress:1, from ../src/base/http/types.h:33, from ../src/base/http/requestparser.h:34, from ../src/base/http/requestparser.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:607:25: note: declared here 607 | QVector splitRef(const QString &sep, SplitBehavior behavior, | ^~~~~~~~ ../src/base/http/requestparser.cpp: In member function 'bool Http::RequestParser::parseFormData(const QByteArray&)': ../src/base/http/requestparser.cpp:314:91: warning: 'QVector QString::splitRef(const QString&, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 314 | const QVector headerLines = headers.splitRef(CRLF, QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtNetwork/qhostaddress.h:46, from /build_root/qbittorrent-build/include/QtNetwork/QHostAddress:1, from ../src/base/http/types.h:33, from ../src/base/http/requestparser.h:34, from ../src/base/http/requestparser.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:607:25: note: declared here 607 | QVector splitRef(const QString &sep, SplitBehavior behavior, | ^~~~~~~~ ../src/base/http/requestparser.cpp:320:91: warning: 'QVector QStringRef::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 320 | const QVector directives = line.split(';', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtNetwork/qhostaddress.h:46, from /build_root/qbittorrent-build/include/QtNetwork/QHostAddress:1, from ../src/base/http/types.h:33, from ../src/base/http/requestparser.h:34, from ../src/base/http/requestparser.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:1665:25: note: declared here 1665 | QVector split(QChar sep, QString::SplitBehavior behavior, | ^~~~~ [51/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/exceptions.cpp.o [52/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/trackerentry.cpp.o ../src/base/http/connection.cpp: In static member function 'static bool Http::Connection::acceptsGzipEncoding(QString)': ../src/base/http/connection.cpp:164:108: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 164 | const QVector list = codings.remove(' ').remove('\t').splitRef(',', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qobject.h:47, from /build_root/qbittorrent-build/include/QtCore/QObject:1, from ../src/base/http/connection.h:35, from ../src/base/http/connection.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ [53/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/tracker.cpp.o [54/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/torrentinfo.cpp.o [55/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/torrenthandleimpl.cpp.o [56/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/torrenthandle.cpp.o [57/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/torrentcreatorthread.cpp.o [58/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/statistics.cpp.o ../src/base/bittorrent/torrenthandleimpl.cpp: In member function 'void BitTorrent::TorrentHandleImpl::handleFileRenamedAlert(const libtorrent::file_renamed_alert*)': ../src/base/bittorrent/torrenthandleimpl.cpp:1568:89: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1568 | QVector oldPathParts = oldFilePath.splitRef('/', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/base/bittorrent/torrenthandleimpl.h:39, from ../src/base/bittorrent/torrenthandleimpl.cpp:30: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ ../src/base/bittorrent/torrenthandleimpl.cpp:1570:89: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1570 | QVector newPathParts = newFilePath.splitRef('/', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/base/bittorrent/torrenthandleimpl.h:39, from ../src/base/bittorrent/torrenthandleimpl.cpp:30: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ [59/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/speedmonitor.cpp.o [60/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/session.cpp.o [61/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/resumedatasavingmanager.cpp.o [62/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/portforwarderimpl.cpp.o [63/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/peerinfo.cpp.o [64/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/peeraddress.cpp.o [65/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/nativetorrentextension.cpp.o [66/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/nativesessionextension.cpp.o [67/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/magneturi.cpp.o [68/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/infohash.cpp.o [69/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/filterparserthread.cpp.o [70/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/filesearcher.cpp.o [71/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/downloadpriority.cpp.o [72/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/customstorage.cpp.o [73/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/bittorrent/bandwidthscheduler.cpp.o [74/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/asyncfilestorage.cpp.o ../src/base/bittorrent/session.cpp: In constructor 'BitTorrent::Session::Session(QObject*)': ../src/base/bittorrent/session.cpp:461:29: warning: 'QNetworkConfigurationManager' is deprecated [-Wdeprecated-declarations] 461 | , m_networkManager {new QNetworkConfigurationManager {this}} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /build_root/qbittorrent-build/include/QtNetwork/QNetworkConfigurationManager:1, from ../src/base/bittorrent/session.cpp:64: /build_root/qbittorrent-build/include/QtNetwork/qnetworkconfigmanager.h:59:56: note: declared here 59 | class QT_DEPRECATED_BEARER_MANAGEMENT Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/base/bittorrent/session.cpp:504:62: warning: 'QNetworkConfigurationManager' is deprecated [-Wdeprecated-declarations] 504 | connect(m_networkManager, &QNetworkConfigurationManager::onlineStateChanged, this, &Session::networkOnlineStateChanged); | ^~~~~~~~~~~~~~~~~~ In file included from /build_root/qbittorrent-build/include/QtNetwork/QNetworkConfigurationManager:1, from ../src/base/bittorrent/session.cpp:64: /build_root/qbittorrent-build/include/QtNetwork/qnetworkconfigmanager.h:59:56: note: declared here 59 | class QT_DEPRECATED_BEARER_MANAGEMENT Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/base/bittorrent/session.cpp:505:62: warning: 'QNetworkConfigurationManager' is deprecated [-Wdeprecated-declarations] 505 | connect(m_networkManager, &QNetworkConfigurationManager::configurationAdded, this, &Session::networkConfigurationChange); | ^~~~~~~~~~~~~~~~~~ In file included from /build_root/qbittorrent-build/include/QtNetwork/QNetworkConfigurationManager:1, from ../src/base/bittorrent/session.cpp:64: /build_root/qbittorrent-build/include/QtNetwork/qnetworkconfigmanager.h:59:56: note: declared here 59 | class QT_DEPRECATED_BEARER_MANAGEMENT Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/base/bittorrent/session.cpp:506:62: warning: 'QNetworkConfigurationManager' is deprecated [-Wdeprecated-declarations] 506 | connect(m_networkManager, &QNetworkConfigurationManager::configurationRemoved, this, &Session::networkConfigurationChange); | ^~~~~~~~~~~~~~~~~~~~ In file included from /build_root/qbittorrent-build/include/QtNetwork/QNetworkConfigurationManager:1, from ../src/base/bittorrent/session.cpp:64: /build_root/qbittorrent-build/include/QtNetwork/qnetworkconfigmanager.h:59:56: note: declared here 59 | class QT_DEPRECATED_BEARER_MANAGEMENT Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/base/bittorrent/session.cpp:507:62: warning: 'QNetworkConfigurationManager' is deprecated [-Wdeprecated-declarations] 507 | connect(m_networkManager, &QNetworkConfigurationManager::configurationChanged, this, &Session::networkConfigurationChange); | ^~~~~~~~~~~~~~~~~~~~ In file included from /build_root/qbittorrent-build/include/QtNetwork/QNetworkConfigurationManager:1, from ../src/base/bittorrent/session.cpp:64: /build_root/qbittorrent-build/include/QtNetwork/qnetworkconfigmanager.h:59:56: note: declared here 59 | class QT_DEPRECATED_BEARER_MANAGEMENT Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ [75/219] Building CXX object src/base/CMakeFiles/qbt_base.dir/qbt_base_autogen/mocs_compilation.cpp.o [76/219] Linking CXX static library src/base/libqbt_base.a [77/219] Automatic MOC and UIC for target qbt_webui [78/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/build_root/qbittorrent-build/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin_Import.cpp.o [79/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/build_root/qbittorrent-build/lib/cmake/Qt5Network/Qt5Network_QGenericEnginePlugin_Import.cpp.o [80/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/webui.cpp.o [81/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/webapplication.cpp.o [82/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/serialize/serialize_torrent.cpp.o [83/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/transfercontroller.cpp.o ../src/webui/webapplication.cpp: In function 'QStringMap {anonymous}::parseCookie(const QString&)': ../src/webui/webapplication.cpp:78:92: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 78 | const QVector cookies = cookieStr.splitRef(';', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/webui/webapplication.h:31, from ../src/webui/webapplication.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ ../src/webui/webapplication.cpp: In member function 'void WebApplication::sendWebUIFile()': ../src/webui/webapplication.cpp:145:83: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 145 | const QStringList pathItems {request().path.split('/', QString::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/webui/webapplication.h:31, from ../src/webui/webapplication.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/webapplication.cpp: In member function 'void WebApplication::configure()': ../src/webui/webapplication.cpp:358:79: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 358 | m_domainList = pref->getServerDomains().split(';', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/webui/webapplication.h:31, from ../src/webui/webapplication.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/webapplication.cpp:389:107: warning: 'QVector QString::splitRef(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 389 | const QVector customHeaderLines = customHeaders.splitRef('\n', QString::SkipEmptyParts); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qdatetime.h:44, from /build_root/qbittorrent-build/include/QtCore/QDateTime:1, from ../src/webui/webapplication.h:31, from ../src/webui/webapplication.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:613:25: note: declared here 613 | QVector splitRef(QChar sep, SplitBehavior behavior, | ^~~~~~~~ [84/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/torrentscontroller.cpp.o [85/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/synccontroller.cpp.o [86/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/searchcontroller.cpp.o [87/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/rsscontroller.cpp.o [88/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/logcontroller.cpp.o [89/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/freediskspacechecker.cpp.o ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::infoAction()': ../src/webui/api/torrentscontroller.cpp:259:96: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 259 | const QStringSet hashSet {List::toSet(params()["hashes"].split('|', QString::SkipEmptyParts))}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/torrentscontroller.cpp: In lambda function: ../src/webui/api/torrentscontroller.cpp:273:94: warning: 'bool QVariant::operator>(const QVariant&) const' is deprecated [-Wdeprecated-declarations] 273 | ? (torrent1.toMap().value(sortedColumn) > torrent2.toMap().value(sortedColumn)) | ^ In file included from /build_root/qbittorrent-build/include/QtCore/QVariant:1, from ../src/webui/api/apicontroller.h:33, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qvariant.h:471:31: note: declared here 471 | QT_DEPRECATED inline bool operator>(const QVariant &v) const | ^~~~~~~~ ../src/webui/api/torrentscontroller.cpp:274:94: warning: 'bool QVariant::operator<(const QVariant&) const' is deprecated [-Wdeprecated-declarations] 274 | : (torrent1.toMap().value(sortedColumn) < torrent2.toMap().value(sortedColumn)); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/QVariant:1, from ../src/webui/api/apicontroller.h:33, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qvariant.h:467:31: note: declared here 467 | QT_DEPRECATED inline bool operator<(const QVariant &v) const | ^~~~~~~~ ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::addAction()': ../src/webui/api/torrentscontroller.cpp:570:95: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 570 | const QSet tags = List::toSet(params()["tags"].split(',', QString::SkipEmptyParts)); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::addTagsAction()': ../src/webui/api/torrentscontroller.cpp:1142:80: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1142 | const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::removeTagsAction()': ../src/webui/api/torrentscontroller.cpp:1159:80: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1159 | const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::createTagsAction()': ../src/webui/api/torrentscontroller.cpp:1183:80: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1183 | const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/torrentscontroller.cpp: In member function 'void TorrentsController::deleteTagsAction()': ../src/webui/api/torrentscontroller.cpp:1193:80: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 1193 | const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)}; | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/torrentscontroller.h:31, from ../src/webui/api/torrentscontroller.cpp:29: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ [90/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/authcontroller.cpp.o [91/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/appcontroller.cpp.o [92/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/apierror.cpp.o [93/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/api/apicontroller.cpp.o [94/219] Building CXX object src/webui/CMakeFiles/qbt_webui.dir/qbt_webui_autogen/mocs_compilation.cpp.o ../src/webui/api/appcontroller.cpp: In member function 'void AppController::setPreferencesAction()': ../src/webui/api/appcontroller.cpp:513:88: warning: 'QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 513 | session->setBannedIPs(it.value().toString().split('\n', QString::SkipEmptyParts)); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/appcontroller.h:33, from ../src/webui/api/appcontroller.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:610:17: note: declared here 610 | QStringList split(QChar sep, SplitBehavior behavior, | ^~~~~ ../src/webui/api/appcontroller.cpp:651:122: warning: 'QStringList QString::split(const QRegularExpression&, QString::SplitBehavior) const' is deprecated: Use Qt::SplitBehavior variant instead [-Wdeprecated-declarations] 651 | pref->setWebUiAuthSubnetWhitelist(it.value().toString().split(QRegularExpression("\n|,"), QString::SkipEmptyParts)); | ^ In file included from /build_root/qbittorrent-build/include/QtCore/qhashfunctions.h:44, from /build_root/qbittorrent-build/include/QtCore/qlist.h:47, from /build_root/qbittorrent-build/include/QtCore/qhash.h:46, from /build_root/qbittorrent-build/include/QtCore/QHash:1, from ../src/webui/api/apicontroller.h:31, from ../src/webui/api/appcontroller.h:33, from ../src/webui/api/appcontroller.cpp:31: /build_root/qbittorrent-build/include/QtCore/qstring.h:623:17: note: declared here 623 | QStringList split(const QRegularExpression &sep, SplitBehavior behavior) const; | ^~~~~ [95/219] Linking CXX static library src/webui/libqbt_webui.a [96/219] Automatic MOC and UIC for target qbt_app [97/219] Automatic RCC for ../webui/www/webui.qrc [98/219] Automatic RCC for ../searchengine/searchengine.qrc [99/219] Automatic RCC for ../icons/icons.qrc [100/219] Generating ../webui/www/translations/webui_zh_TW.qm [101/219] Generating ../webui/www/translations/webui_zh_HK.qm [102/219] Generating ../webui/www/translations/webui_zh.qm [103/219] Generating ../webui/www/translations/webui_vi.qm [104/219] Generating ../webui/www/translations/webui_uz@Latn.qm [105/219] Generating ../webui/www/translations/webui_uk.qm [106/219] Generating ../webui/www/translations/webui_tr.qm [107/219] Generating ../webui/www/translations/webui_sv.qm [108/219] Generating ../webui/www/translations/webui_sr.qm [109/219] Generating ../webui/www/translations/webui_sl.qm [110/219] Generating ../webui/www/translations/webui_sk.qm [111/219] Generating ../webui/www/translations/webui_ru.qm [112/219] Generating ../webui/www/translations/webui_ro.qm [113/219] Generating ../webui/www/translations/webui_pt_PT.qm [114/219] Generating ../webui/www/translations/webui_pt_BR.qm [115/219] Generating ../webui/www/translations/webui_pl.qm [116/219] Generating ../webui/www/translations/webui_oc.qm [117/219] Generating ../webui/www/translations/webui_nl.qm [118/219] Generating ../webui/www/translations/webui_nb.qm [119/219] Generating ../webui/www/translations/webui_ms_MY.qm [120/219] Generating ../webui/www/translations/webui_lv_LV.qm [121/219] Generating ../webui/www/translations/webui_ltg.qm [122/219] Generating ../webui/www/translations/webui_lt.qm [123/219] Generating ../webui/www/translations/webui_ko.qm [124/219] Generating ../webui/www/translations/webui_ka.qm [125/219] Generating ../webui/www/translations/webui_ja.qm [126/219] Generating ../webui/www/translations/webui_it.qm [127/219] Generating ../webui/www/translations/webui_is.qm [128/219] Generating ../webui/www/translations/webui_id.qm [129/219] Generating ../webui/www/translations/webui_hy.qm [130/219] Generating ../webui/www/translations/webui_hu.qm [131/219] Generating ../webui/www/translations/webui_hr.qm [132/219] Generating ../webui/www/translations/webui_hi_IN.qm [133/219] Generating ../webui/www/translations/webui_he.qm [134/219] Generating ../webui/www/translations/webui_gl.qm [135/219] Generating ../webui/www/translations/webui_fr.qm [136/219] Generating ../webui/www/translations/webui_fi.qm [137/219] Generating ../webui/www/translations/webui_eu.qm [138/219] Generating ../webui/www/translations/webui_es.qm [139/219] Generating ../webui/www/translations/webui_eo.qm [140/219] Generating ../webui/www/translations/webui_en_GB.qm [141/219] Generating ../webui/www/translations/webui_en_AU.qm [142/219] Generating ../webui/www/translations/webui_en.qm [143/219] Generating ../webui/www/translations/webui_el.qm [144/219] Generating ../webui/www/translations/webui_de.qm [145/219] Generating ../webui/www/translations/webui_da.qm [146/219] Generating ../webui/www/translations/webui_cs.qm [147/219] Generating ../webui/www/translations/webui_ca.qm [148/219] Generating ../webui/www/translations/webui_bg.qm [149/219] Generating ../webui/www/translations/webui_be.qm [150/219] Generating ../webui/www/translations/webui_ar.qm [151/219] Generating ../lang/qbittorrent_zh_TW.qm [152/219] Automatic RCC for ../webui/www/translations/webui_translations.qrc [153/219] Generating ../lang/qbittorrent_zh_HK.qm [154/219] Generating ../lang/qbittorrent_zh.qm [155/219] Generating ../lang/qbittorrent_vi.qm [156/219] Generating ../lang/qbittorrent_uz@Latn.qm [157/219] Generating ../lang/qbittorrent_uk.qm [158/219] Generating ../lang/qbittorrent_tr.qm [159/219] Generating ../lang/qbittorrent_sv.qm [160/219] Generating ../lang/qbittorrent_sr.qm [161/219] Generating ../lang/qbittorrent_sl.qm [162/219] Generating ../lang/qbittorrent_sk.qm [163/219] Generating ../lang/qbittorrent_ru.qm [164/219] Generating ../lang/qbittorrent_ro.qm [165/219] Generating ../lang/qbittorrent_pt_PT.qm [166/219] Generating ../lang/qbittorrent_pt_BR.qm [167/219] Generating ../lang/qbittorrent_pl.qm [168/219] Generating ../lang/qbittorrent_oc.qm [169/219] Generating ../lang/qbittorrent_nl.qm [170/219] Generating ../lang/qbittorrent_nb.qm [171/219] Generating ../lang/qbittorrent_ms_MY.qm [172/219] Generating ../lang/qbittorrent_lv_LV.qm [173/219] Generating ../lang/qbittorrent_ltg.qm [174/219] Generating ../lang/qbittorrent_lt.qm [175/219] Generating ../lang/qbittorrent_ko.qm [176/219] Generating ../lang/qbittorrent_ka.qm [177/219] Generating ../lang/qbittorrent_ja.qm [178/219] Generating ../lang/qbittorrent_it.qm [179/219] Generating ../lang/qbittorrent_is.qm [180/219] Generating ../lang/qbittorrent_id.qm [181/219] Generating ../lang/qbittorrent_hy.qm [182/219] Generating ../lang/qbittorrent_hu.qm [183/219] Generating ../lang/qbittorrent_hr.qm [184/219] Generating ../lang/qbittorrent_hi_IN.qm [185/219] Generating ../lang/qbittorrent_he.qm [186/219] Generating ../lang/qbittorrent_gl.qm [187/219] Generating ../lang/qbittorrent_fr.qm [188/219] Generating ../lang/qbittorrent_fi.qm [189/219] Generating ../lang/qbittorrent_eu.qm [190/219] Generating ../lang/qbittorrent_es.qm [191/219] Generating ../lang/qbittorrent_eo.qm [192/219] Generating ../lang/qbittorrent_en_GB.qm [193/219] Generating ../lang/qbittorrent_en_AU.qm [194/219] Generating ../lang/qbittorrent_en.qm [195/219] Generating ../lang/qbittorrent_el.qm [196/219] Generating ../lang/qbittorrent_de.qm [197/219] Generating ../lang/qbittorrent_da.qm [198/219] Generating ../lang/qbittorrent_cs.qm [199/219] Generating ../lang/qbittorrent_ca.qm [200/219] Generating ../lang/qbittorrent_bg.qm [201/219] Generating ../lang/qbittorrent_be.qm [202/219] Generating ../lang/qbittorrent_ar.qm [203/219] Automatic RCC for ../lang/lang.qrc [204/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qbt_app_autogen/4MDHO3J3ZV/qrc_lang.cpp.o [205/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/build_root/qbittorrent-build/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin_Import.cpp.o [206/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/build_root/qbittorrent-build/lib/cmake/Qt5Network/Qt5Network_QGenericEnginePlugin_Import.cpp.o [207/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qbt_app_autogen/TEN4WZ4RQ3/qrc_webui.cpp.o [208/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qbt_app_autogen/LTK7X4IA7Q/qrc_webui_translations.cpp.o [209/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qbt_app_autogen/G6NVOLQRLL/qrc_searchengine.cpp.o [210/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qbt_app_autogen/NPXYM6ZNPF/qrc_icons.cpp.o [211/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/upgrade.cpp.o [212/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/qtlocalpeer/qtlocalpeer.cpp.o [213/219] Building CXX object src/app/CMakeFiles/qbt_app.dir/main.cpp.o ninja: job failed: /usr/bin/c++ -DBOOST_ASIO_ENABLE_CANCELIO -DDISABLE_GUI -DQBT_VERSION=\"v4.1.9.1\" -DQBT_VERSION_2=\"4.1.9.1\" -DQBT_VERSION_BUGFIX=9 -DQBT_VERSION_BUILD=1 -DQBT_VERSION_MAJOR=4 -DQBT_VERSION_MINOR=1 -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_SQL_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_XML_LIB -DSTACKTRACE -DTORRENT_USE_ICONV -DTORRENT_USE_LIBCRYPTO -DTORRENT_USE_OPENSSL -Isrc/app/qbt_app_autogen/include -I../src -isystem /build_root/qbittorrent-build/include/QtCore -isystem /build_root/qbittorrent-build/./mkspecs/linux-g++ -isystem /build_root/qbittorrent-build/include/QtNetwork -isystem /build_root/qbittorrent-build/include/QtXml -isystem /build_root/qbittorrent-build/include/QtSql -O2 -pipe -fexceptions -fstack-clash-protection -fstack-protector-strong -g -grecord-gcc-switches --static -static -I/build_root/qbittorrent-build/include -std=c++14 -O3 -DNDEBUG -fexceptions -fPIC -MD -MT src/app/CMakeFiles/qbt_app.dir/main.cpp.o -MF src/app/CMakeFiles/qbt_app.dir/main.cpp.o.d -o src/app/CMakeFiles/qbt_app.dir/main.cpp.o -c ../src/app/main.cpp2020/12/5 下午8:42:07 In file included from ../src/app/main.cpp:70: ../src/app/stacktrace.h:9:10: fatal error: execinfo.h: No such file or directory 9 | #include | ^~~~~~~~~~~~ compilation terminated. ninja: subcommand failed Removing intermediate container 091ab1f59737

IceCodeNew commented 3 years ago

Related PR/commit which solves this problem: https://github.com/PowerDNS/pdns/pull/1958 https://github.com/netdata/netdata/commit/8209164b891b1ac27f0588d56377fb7e82748614

FranciscoPombal commented 3 years ago

Looks like the functionality we need from <execinfo.h> is not really optional or unused (as is the case in https://github.com/netdata/netdata/commit/8209164b891b1ac27f0588d56377fb7e82748614, for example).

IMO, we should probably consider replacing the existing implementation with a newer and more streamlined off-the-shelf solution. We may fix suspected bugs as https://github.com/qbittorrent/qBittorrent/issues/13752#issuecomment-735930589. As an added benefit, it is possible that compilation with musl will also stop being an issue, if the new solution is more portable.

Do you know of any alternatives that are easy to use and fulfill the requirement of working well with musl?


/offtopic

user decides to escape from glibc and try to compile it against some next-generation libc implement like musl-libc.

lol. Imagine thinking moving from a GPL-licensed piece of Free Software to an imitation under and inferior license is "escaping" anything. Escaping Freedom, perhaps, to be forever subjugated under the thumb of some megacorp daddy (if not now, surely at some point in the future). Also "next generation", > implying :). But hey, I do realize we're all on GitHub, and there are better places to have these political/philosophical debates about licenses and Freedom.

Chocobo1 commented 3 years ago

I'm not familiar with C/C++, maybe we should quote this part with #ifdef?

I think the better way is the build systems (both qmake & cmake) disable STACKTRACE when musl libc is in use. Patch welcome!

IceCodeNew commented 3 years ago

Imagine thinking moving from a GPL-licensed piece of Free Software to an imitation under and inferior license is "escaping" anything. Escaping Freedom, perhaps, to be forever subjugated under the thumb of some megacorp daddy (if not now, surely at some point in the future).

You've got the point, but the license does not obscure the quirks and foibles in glibc. I'm not going to debate here as I'm not that professional to speak eloquently about this. I do have a strong movement to escape from glibc. I have had a tough time trying to statically link qBittorrent against crt (C runtime) while following your strongly recommended compilation method. Switch to a built environment that does completely replace glibc with musl-libc is much simple. And it is also size-efficient when static-linked.

P.S. I'm curious why you take escaping from a GPL-licensed project to an MIT-licensed project as a movement escaping freedom. Because it makes commercial use painless? P.S.S. After all, competition makes things develop faster. And to make an alternative implementation of glibc get on a match with glibc itself, projects that are friendly to other libc implementation and users who are willing to give it a shot is fundamental.

FranciscoPombal commented 3 years ago

@IceCodeNew

Please try out https://github.com/qbittorrent/qBittorrent/pull/13923.

I have had a tough time trying to statically link qBittorrent against crt (C runtime) while following your strongly recommended compilation method.

I've actually never built qBittorrent in any other way other than with dynamic linking all around on Linux, so I have no idea how easy/difficult it is, and thus have no idea about what could be improved and how, on the qBittorrent side. I know others have had more experience with this though: https://github.com/userdocs/qbittorrent-nox-static.

I've only recommended this strategy on Windows, where it is quite easy with vcpkg and the x64-windows-static triplet. Plus, dynamic linking on Windows might lead to "interesting" issues. For example, on recent Windows 10, a dynamic build of qBittorrent will work if you have all dlls in the build folder except for the OpenSSL ones. Why? Because C:\Windows\System32 is in the dll search path by default, and recent Windows 10 releases will pick up the bundled OpenSSL binaries (libcrypto/libssl) from there (they're there in the first place for Windows 10's native OpenSSH binaries among possibly other things). If you're not careful, you'll be building against a certain OpenSSL version/binaries and running against another. Big yikes.


Switch to a built environment that does completely replace glibc with musl-libc is much simple. And it is also size-efficient when static-linked.

I'm aware of its uses in Alpine and such setups.

P.S. I'm curious why you take escaping from a GPL-licensed project to an MIT-licensed project as a movement escaping freedom. Because it makes commercial use painless?

This implies using GPL-licensed software commercially is somehow painful, and the existence of an MIT-licensed substitute is required to alleviate such pains. Well, it is painful to use GPL-licensed software commercially in the current late-stage surveillance capitalism paradigm, but it doesn't have to be, in general. There are many successful examples in the wild, at any scale. Don't believe the anti-GPL megacorp FUD that denies this. Those with such anti-GPL agendas invariably have the intention of locking users (in this context, developers are also users) into their walled garden, in some short or long-term future. If not, why would they be against the viral clauses of the GPL? It is it's single most important aspect, and the one that guarantees that the 4 Freedoms (Freedom, in general) will be respected anywhere, anytime, now, and in the future.

P.S.S. After all, competition makes things develop faster. And to make an alternative implementation of glibc get on a match with glibc itself, projects that are friendly to other libc implementation and users who are willing to give it a shot is fundamental.

I appreciate the competitive aspect that musl brings to the table, from a purely technical standpoint. It's just that too often the waters are muddied by the license issue. And also people don't seem to realize that in many ways, musl is just simply not designed to compete directly against glibc in many aspects and vice-versa, leading to pointless arguments about the overall superiority of each. One will better in some things, the other in others. Everyone still wins due to implementation diversity. Both are not perfect and have their issues that need to be addressed, even outside of comparing them against each other.

userdocs commented 3 years ago

@FranciscoPombal i don't have this particular issue as i use qmake to build qbittorrent from my locally built qtbase/qttools. What i will chime in on the musl vs glibc, is that Alpine static building behaves in the same way you'd expect a glibc dynamic build process to go. Reasonably simple with little need for weird and complex compiler flags. There are various combinations of static and dynamic that could be considered due to being able to statically link boost_libs/libtorrent quite easily with b2, which is what i do. I think a mixture is the best option, which is how i can create 4.3.1/1.2.11 build on Debian 9 using openssl 1.1.0/qt 5.12.10

IceCodeNew commented 3 years ago

I've actually never built qBittorrent in any other way other than with dynamic linking all around on Linux I've only recommended this strategy on Windows

In some aspects, you're right. I have to static-link qBittorrent for Linux because I prefer to use the latest developing system; thus, I cannot make the release binary file running on a relatively older operating system. It is dynamic-linked to a libc.so which version is higher than the older OS's existing one.


I used to be using the project https://github.com/userdocs/qbittorrent-nox-static. When I found its recent commits consume too much time to cherry-pick into my fork, I decided to start my project. As I'm starting from scratch, I'm wondering if the CMake build system had been the newly featured way, I should switch to it too. But obviously, it is not that fit to the static linking usage scenario. It has a quirk: https://github.com/android/ndk/issues/379#issuecomment-299085023.

I managed to make it work, but the solution is ugly. https://github.com/IceCodeNew/qbee_static/blob/c9f91c9ecf09ef1e3b348ea316c833dca368fda3/qbee_alpine_builder.Dockerfile#L120

FranciscoPombal commented 3 years ago

@IceCodeNew (cc @userdocs, in case you're looking into CMake builds)

I used to be using the project https://github.com/userdocs/qbittorrent-nox-static. When I found its recent commits consume too much time to cherry-pick into my fork, I decided to start my project. As I'm starting from scratch, I'm wondering if the CMake build system had been the newly featured way, I should switch to it too. But obviously, it is not that fit to the static linking usage scenario. It has a quirk: android/ndk#379 (comment).

I managed to make it work, but the solution is ugly. https://github.com/IceCodeNew/qbee_static/blob/c9f91c9ecf09ef1e3b348ea316c833dca368fda3/qbee_alpine_builder.Dockerfile#L120

That link seems to contain outdated information. For example, CMAKE_CXX_STANDARD_LIBRARIES_INIT no longer exists (and I'm not sure it ever existed in standard CMake, maybe it is some Android-specific thing?). I would be surprised if you couldn't get a static build to work with a properly written CMake toolchain file, and without having to resort to fixing up the generated Ninja build file (though you may be running into a legitimate Ninja generator bug, have you tried to reproduce with Makefiles?).

I'd say one issue might be relying too much on environment variables. For example, you're setting CC="gcc -static"/CXX="g++ -static", but -static is a linker option; I wouldn't be surprised if CMake gets tripped up by that (e.g. CMake may not know what to do with it). Instead, I would put such a flag inside CMAKE_EXE_LINKER_FLAGS_INIT and CMAKE_STATIC_LINKER_FLAGS_INIT in a toolchain file. In general, I would advise clearing out environment variables relating to compilation (CC, LDFLAGS, ...) before compilation with CMake and a toolchain file, unless you're sure that the environment variable in question will correctly initialize the corresponding CMake variable(s) (see https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html). This is ultimately an exercise of trial-and-error examining the generated CMakeCache.txt after a clean run.

When I have the time, I may look into this and try to come up with useful CMake toolchain files for such cases. Separately from that, if anything is lacking in qBittorrent's base CMake config that would facilitate this use case, patches are welcome to fix that.

IceCodeNew commented 3 years ago

though you may be running into a legitimate Ninja generator bug, have you tried to reproduce with Makefiles?

Nop, I didn't come up with that way. After dive into the verbose output of the building process, I found that CMake had append -ldl libssl.so libcrypto.so libc.so to the linking command at its own discretion. Googling this question had led to several commits trying to solve this problem but none of them works. I have no other option but to direct patch the generated Ninja build file.


I'd say one issue might be relying too much on environment variables. For example, you're setting CC="gcc -static"/CXX="g++ -static", but -static is a linker option; I wouldn't be surprised if CMake gets tripped up by that (e.g. CMake may not know what to do with it). Instead, I would put such a flag inside CMAKE_EXE_LINKER_FLAGS_INIT and CMAKE_STATIC_LINKER_FLAGS_INIT in a toolchain file. In general, I would advise clearing out environment variables relating to compilation (CC, LDFLAGS, ...) before compilation with CMake and a toolchain file, unless you're sure that the environment variable in question will correctly initialize the corresponding CMake variable(s) (see cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html). This is ultimately an exercise of trial-and-error examining the generated CMakeCache.txt after a clean run.

Your advice is appreciated. I definitely need to rework the current stuff of crap.


When I have the time, I may look into this and try to come up with useful CMake toolchain files for such cases.

That so nice of you. I'm looking forward to your wiki ;-)

FranciscoPombal commented 3 years ago

Nop, I didn't come up with that way. After dive into the verbose output of the building process, I found that CMake had append -ldl libssl.so libcrypto.so libc.so to the linking command at its own discretion. Googling this question had led to several commits trying to solve this problem but none of them works. I have no other option but to direct patch the generated Ninja build file.

I see. Well, I still think this can be fixed with a suitable toolchain file, but at this time, I'm by no means an expert on the subject. You can probably get the answers you need from the CMake issue tracker; worst case scenario, this is actually a bug.

userdocs commented 3 years ago

@IceCodeNew i understand what you mean about the recent changes to my script, but very little changed in regards to the actually build process used to generate a static musl build. That is almost identical to previous versions, but many things around that were changed / added.

@FranciscoPombal is there any benefit to using cmake over qmake? Also i think in an ideal world, using b2 (boost) would be great (if possible) as that is already the main, documented way to build two of the major dependencies. I am unsure of the feasibility of such a thing but in theory, the more i can build with b2 the better.

FranciscoPombal commented 3 years ago

@userdocs

@FranciscoPombal is there any benefit to using cmake over qmake? Also i think in an ideal world, using b2 (boost) would be great (if possible) as that is already the main, documented way to build two of the major dependencies. I am unsure of the feasibility of such a thing but in theory, the more i can build with b2 the better.

CMake makes it easier to reason about the build and set it up correctly IMO, plus it is almost ubiquitous in the C++ world (more eyes are on top of it and more effort is being put into it), and qmake has been deprecated (or it will be soon, as Qt is moving away from it in favor of CMake: https://bugreports.qt.io/browse/QTBUG-88741). CMake's reputation is still not the best because of issues in now obsolete versions, and lots of bad/outdated advice online that still lingers from those days. If you want to get into it, I recommend the 2 "More Modern CMake" and the "How to CMake good" series on youtube. If you're willing to invest some money, I'd suggest the Professional CMake book, written by one of the CMake maintainers.

libtorrent can be built with CMake (I've been doing that for a long time now, on multiple platforms). It's still not at feature-parity with b2 I think, but nearly there. As for boost, it's the odd one out. I wish they would move away from b2. They should just contribute whatever features they need into CMake and migrate. boost is always the odd one out for me, makes me deal with an additional build system. At least as of recently, it has very nice CMake integration.