strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.74k stars 192 forks source link

Error when compiling without chromaprint/MusicBrainz support #1492

Closed Vallimar closed 4 months ago

Vallimar commented 4 months ago

Describe the bug Error when compiling without chromaprint/MusicBrainz support.

In file included from /srv/rpmbuild/BUILD/strawberry-1.1.0-build/strawberry-1.1.0/src/core/mainwindow.cpp:117:
/srv/rpmbuild/BUILD/strawberry-1.1.0-build/strawberry-1.1.0/src/dialogs/edittagdialog.h:186:3: error: ‘LyricsFetcher’ does not name a type
  186 |   LyricsFetcher *lyrics_fetcher_;
      |   ^~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/strawberry_lib.dir/build.make:3280: src/CMakeFiles/strawberry_lib.dir/core/mainwindow.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /srv/rpmbuild/BUILD/strawberry-1.1.0-build/strawberry-1.1.0/src/collection/collectionview.cpp:70:
/srv/rpmbuild/BUILD/strawberry-1.1.0-build/strawberry-1.1.0/src/dialogs/edittagdialog.h:186:3: error: ‘LyricsFetcher’ does not name a type
  186 |   LyricsFetcher *lyrics_fetcher_;
      |   ^~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/strawberry_lib.dir/build.make:4358: src/CMakeFiles/strawberry_lib.dir/collection/collectionview.cpp.o] Error 1

To Reproduce Compile without libchromaprint.

Expected behavior Compiles correctly

Screenshots: If applicable, add screenshots to help explain your problem.

System Information:

Additional context I did this as a quick fix:

diff -up ./src/dialogs/edittagdialog.h.foo ./src/dialogs/edittagdialog.h
--- ./src/dialogs/edittagdialog.h.foo   2024-07-16 11:29:27.604923527 -0400
+++ ./src/dialogs/edittagdialog.h   2024-07-16 11:29:38.897938689 -0400
@@ -57,8 +57,8 @@ class Ui_EditTagDialog;
 #ifdef HAVE_MUSICBRAINZ
 class TrackSelectionDialog;
 class TagFetcher;
-class LyricsFetcher;
 #endif
+class LyricsFetcher;

 class EditTagDialog : public QDialog {
   Q_OBJECT