martinrotter / rssguard

Feed reader (and podcast player) which supports RSS/ATOM/JSON and many web-based feed services.
GNU General Public License v3.0
1.44k stars 120 forks source link

[BUG]: 4.6.4/4.6.5 fails to build with media player disabled #1332

Closed mgorny closed 3 months ago

mgorny commented 3 months ago

Brief description of the issue

When building with both media player backends disabled, the build fails.

How to reproduce the bug?

mkdir build
cd build
cmake -G Ninja .. -DNO_LITE=OFF -DENABLE_MEDIAPLAYER_QTMULTIMEDIA=OFF -DENABLE_MEDIAPLAYER_LIBMPV=OFF
ninja -j$(nproc)

What was the expected result?

Successful build ;-).

What actually happened?

FAILED: src/librssguard/CMakeFiles/rssguard.dir/gui/webbrowser.cpp.o 
/usr/bin/c++ -DAPPDATA_NAME="\"RSS Guard Lite\"" -DAPPDATA_SUMMARY="\"Simple, yet powerful news feed reader (no built-in web browser)\"" -DAPP_AUTHOR="\"Martin Rotter\"" -DAPP_DONATE_URL=\"https://github.com/sponsors/martinrotter\" -DAPP_EMAIL=\"rotter.martinos@gmail.com\" -DAPP_LONG_NAME="\"RSS Guard 4.6.5\"" -DAPP_LOW_H_NAME=\".rssguard\" -DAPP_LOW_NAME=\"rssguard\" -DAPP_NAME="\"RSS Guard\"" -DAPP_REVERSE_NAME=\"io.github.martinrotter.rssguardlite\" -DAPP_REVISION=\"-lite\" -DAPP_SYSTEM_NAME=\"Linux\" -DAPP_SYSTEM_VERSION=\"x86_64\" -DAPP_URL=\"https://github.com/martinrotter/rssguard\" -DAPP_URL_DOCUMENTATION=\"https://rssguard.readthedocs.io\" -DAPP_URL_ISSUES_NEW=\"https://github.com/martinrotter/rssguard/issues/new/choose\" -DAPP_USERAGENT="\"RSS Guard/4.6.5\"" -DAPP_VERSION=\"4.6.5\" -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QMLINTEGRATION_LIB -DQT_QML_LIB -DQT_SQL_LIB -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DRSSGUARD_DLLSPEC=Q_DECL_EXPORT -DSYSTEM_SQLITE3 -DUNICODE -D_UNICODE -Drssguard_EXPORTS -I/tmp/rssguard-4.6.5/build/src/librssguard -I/tmp/rssguard-4.6.5/src/librssguard -I/tmp/rssguard-4.6.5/build/src/librssguard/rssguard_autogen/include -I/tmp/rssguard-4.6.5/src/librssguard/gui -I/tmp/rssguard-4.6.5/src/librssguard/gui/dialogs -I/tmp/rssguard-4.6.5/src/librssguard/gui/reusable -I/tmp/rssguard-4.6.5/src/librssguard/services/abstract/gui -I/tmp/rssguard-4.6.5/src/librssguard/dynamic-shortcuts -I/tmp/rssguard-4.6.5/src/librssguard/gui/notifications -I/tmp/rssguard-4.6.5/src/librssguard/gui/toolbars -I/tmp/rssguard-4.6.5/src/librssguard/gui/richtexteditor -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtSql -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtXml -isystem /usr/include/qt6/QtConcurrent -isystem /usr/include/qt6/QtCore5Compat -isystem /usr/include/qt6/QtMultimedia -isystem /usr/include/qt6/QtDBus -O3 -DNDEBUG -std=gnu++17 -fPIC -fPIC -MD -MT src/librssguard/CMakeFiles/rssguard.dir/gui/webbrowser.cpp.o -MF src/librssguard/CMakeFiles/rssguard.dir/gui/webbrowser.cpp.o.d -o src/librssguard/CMakeFiles/rssguard.dir/gui/webbrowser.cpp.o -c /tmp/rssguard-4.6.5/src/librssguard/gui/webbrowser.cpp
/tmp/rssguard-4.6.5/src/librssguard/gui/webbrowser.cpp: In constructor ‘WebBrowser::WebBrowser(WebViewer*, QWidget*)’:
/tmp/rssguard-4.6.5/src/librssguard/gui/webbrowser.cpp:35:5: error: class ‘WebBrowser’ does not have any field named ‘m_actionPlayPageInMediaPlayer’
   35 |     m_actionPlayPageInMediaPlayer(new QAction(qApp->icons()->fromTheme(QSL("player_play"), QSL("media-playback-start")),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Debug log

n/a

Operating system and version

danfe commented 3 months ago

I'm seeing this as well on FreeBSD. The m_actionPlayPageInMediaPlayer is guarded with #if defined(ENABLE_MEDIAPLAYER) in the class definition, but missing in the webbrowser.cpp above. The fix is trivial so I'm not attaching it.

martinrotter commented 3 months ago

Yes, should be fixed.

mgorny commented 3 months ago

Thanks! 4.6.6 seems to build fine for me.