Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error on ubuntu 24.04 #1295

Open
bakaiadam opened this issue Oct 23, 2024 · 4 comments
Open

build error on ubuntu 24.04 #1295

bakaiadam opened this issue Oct 23, 2024 · 4 comments
Labels
next release fixed in develop branch and will be part of the next release

Comments

@bakaiadam
Copy link

Describe the bug
cmake runs fine, make runs into error:

/home/adam/snapcast/common/resampler.cpp: In constructor ‘Resampler::Resampler(const SampleFormat&, const SampleFormat&)’: /home/adam/snapcast/common/resampler.cpp:64:15: error: ‘SnapException’ was not declared in this scope 64 | throw SnapException("Resampling requested, but not supported"); | ^~~~~~~~~~~~~ make[2]: *** [common/CMakeFiles/common.dir/build.make:76: common/CMakeFiles/common.dir/resampler.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:161: common/CMakeFiles/common.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

The command is:
cd /home/adam/snapcast/common && /usr/bin/c++ -DBOOST_ASIO_NO_TS_EXECUTORS -DBOOST_ERROR_CODE_HEADER_ONLY -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -DHAS_EXPAT -DHAS_FLAC -DHAS_JACK -DHAS_OGG -DHAS_OPUS -DHAS_PULSE -DVERSION=\"0.29.0\" -I/home/adam/snapcast -I/home/adam/snapcast/include -std=gnu++17 -Wall -Wextra -pedantic -Wno-unused-function -MD -MT common/CMakeFiles/common.dir/resampler.cpp.o -MF CMakeFiles/common.dir/resampler.cpp.o.d -o CMakeFiles/common.dir/resampler.cpp.o -c /home/adam/snapcast/common/resampler.cpp

c++ version is:

c++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc.

@j12i
Copy link

j12i commented Oct 29, 2024

I got the same error tring to compile on Slackware64 15.0.

@Will9982890
Copy link

Created a patch to fix the build. Not familiar enough with github for a pull request and it seems that the file attach doesn't like the patch file, so here's a code block for the patch itself:

https://www.linuxquestions.org/questions/slackware-14/building-snapcast-fails-4175743846-print/
Fix due to error in compile
FAILED: common/CMakeFiles/common.dir/resampler.cpp.o
   64 |         throw SnapException("Resampling requested, but not supported");
      |               ^~~~~~~~~~~~~
--- a/common/resampler.cpp	2024-08-23 04:06:51.000000000 -0400
+++ b/common/resampler.cpp	2024-12-08 16:03:27.479309965 -0500
@@ -21,6 +21,7 @@
 
 // local headers
 #include "common/aixlog.hpp"
+#include "common/snap_exception.hpp"
 
 // standard headers
 #include <cmath>

It works for me.

badaix added a commit that referenced this issue Dec 11, 2024
@badaix
Copy link
Owner

badaix commented Dec 11, 2024

Thanks @Will9982890
Should be solved now in develop branch: f6ce4f3

@badaix badaix added the next release fixed in develop branch and will be part of the next release label Dec 21, 2024
@j12i
Copy link

j12i commented Dec 22, 2024

Could you make a 0.29.1 release with this patch please? Seeing that 0.29.0 is broken. I'd rather keep relying on releases for my packaging than switch to commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release fixed in develop branch and will be part of the next release
Projects
None yet
Development

No branches or pull requests

4 participants