xabolcs
February 16, 2025, 10:54am
1
Hi!
As Snapcast is going to be included in the official package feed, I'd like to provide details about Snapcast versions for older devices which stucked on earlier OpenWrt releases.
A simple table will do it:
for OpenWrt 19.07.10 the latest buildable Snapcast is ...
for OpenWrt 21.02.7 the latest buildable Snapcast is ...
...
For OpenWrt SNAPSHOT (we are after 24.10.0 now) Snapcast v0.28.0 builds nicely with a few boost 1.87 compat patch.
But ...
xabolcs
February 16, 2025, 10:54am
2
But for OpenWrt 21.02.7 + Snapcast v.0.28.0 dies not on compiling but on linking:
ld: process_stream.cpp:(.text+0x9c4): undefined reference to `std::filesystem::status(std::filesystem::path const&)
details here
[ 69%] Building CXX object server/CMakeFiles/snapserver.dir/encoder/opus_encoder.cpp.o
cd /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server && /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-g++ -DBOOST_ASIO_NO_TS_EXECUTORS -DBOOST_ERROR_CODE_HEADER_ONLY -DHAS_ALSA -DHAS_DAEMON -DHAS_EXPAT -DHAS_FLAC -DHAS_OGG -DHAS_OPUS -DHAS_SOXR -DHAS_TREMOR -DHAS_VORBIS -DHAS_VORBIS_ENC -DVERSION=\"0.28.0\" -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0 -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/include -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/target-mipsel_24kc_musl/usr/include/opus -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0=snapcast-0.28.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-function -std=gnu++17 -o CMakeFiles/snapserver.dir/encoder/opus_encoder.cpp.o -c /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server/encoder/opus_encoder.cpp
[ 71%] Building CXX object server/CMakeFiles/snapserver.dir/streamreader/alsa_stream.cpp.o
cd /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server && /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-g++ -DBOOST_ASIO_NO_TS_EXECUTORS -DBOOST_ERROR_CODE_HEADER_ONLY -DHAS_ALSA -DHAS_DAEMON -DHAS_EXPAT -DHAS_FLAC -DHAS_OGG -DHAS_OPUS -DHAS_SOXR -DHAS_TREMOR -DHAS_VORBIS -DHAS_VORBIS_ENC -DVERSION=\"0.28.0\" -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0 -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/include -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server -I/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/target-mipsel_24kc_musl/usr/include/opus -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0=snapcast-0.28.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-function -std=gnu++17 -o CMakeFiles/snapserver.dir/streamreader/alsa_stream.cpp.o -c /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server/streamreader/alsa_stream.cpp
[ 73%] Linking CXX executable ../bin/snapserver
cd /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/server && /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/host/bin/cmake -E cmake_link_script CMakeFiles/snapserver.dir/link.txt --verbose=1
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/mipsel-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0=snapcast-0.28.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -L/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro CMakeFiles/snapserver.dir/config.cpp.o CMakeFiles/snapserver.dir/control_server.cpp.o CMakeFiles/snapserver.dir/control_session_tcp.cpp.o CMakeFiles/snapserver.dir/control_session_http.cpp.o CMakeFiles/snapserver.dir/control_session_ws.cpp.o CMakeFiles/snapserver.dir/snapserver.cpp.o CMakeFiles/snapserver.dir/server.cpp.o CMakeFiles/snapserver.dir/stream_server.cpp.o CMakeFiles/snapserver.dir/stream_session.cpp.o CMakeFiles/snapserver.dir/stream_session_tcp.cpp.o CMakeFiles/snapserver.dir/stream_session_ws.cpp.o CMakeFiles/snapserver.dir/encoder/encoder_factory.cpp.o CMakeFiles/snapserver.dir/encoder/pcm_encoder.cpp.o CMakeFiles/snapserver.dir/encoder/null_encoder.cpp.o CMakeFiles/snapserver.dir/streamreader/base64.cpp.o CMakeFiles/snapserver.dir/streamreader/control_error.cpp.o CMakeFiles/snapserver.dir/streamreader/stream_control.cpp.o CMakeFiles/snapserver.dir/streamreader/stream_uri.cpp.o CMakeFiles/snapserver.dir/streamreader/stream_manager.cpp.o CMakeFiles/snapserver.dir/streamreader/pcm_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/tcp_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/pipe_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/file_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/airplay_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/librespot_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/meta_stream.cpp.o CMakeFiles/snapserver.dir/streamreader/watchdog.cpp.o CMakeFiles/snapserver.dir/streamreader/properties.cpp.o CMakeFiles/snapserver.dir/streamreader/metadata.cpp.o CMakeFiles/snapserver.dir/streamreader/process_stream.cpp.o CMakeFiles/snapserver.dir/encoder/ogg_encoder.cpp.o CMakeFiles/snapserver.dir/encoder/flac_encoder.cpp.o CMakeFiles/snapserver.dir/encoder/opus_encoder.cpp.o CMakeFiles/snapserver.dir/streamreader/alsa_stream.cpp.o -o ../bin/snapserver -latomic ../bin/libcommon.a -lvorbis -lvorbisenc -logg -lFLAC -lopus -lasound -lexpat -lsoxr
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/config.cpp.o: in function `utils::file::do_chown(std::string const&, std::string const&, std::string const&)':
config.cpp:(.text+0xb70): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: config.cpp:(.text+0xb78): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/control_session_http.cpp.o: in function `__pend__ZN18ControlSessionHttp7on_readEN5boost6system10error_codeEj_17553':
control_session_http.cpp:(.text+0x115ca): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: control_session_http.cpp:(.text+0x115d2): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/streamreader/stream_control.cpp.o: in function `utils::file::exists(std::string const&)':
stream_control.cpp:(.text+0xb98): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: stream_control.cpp:(.text+0xba0): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/streamreader/file_stream.cpp.o: in function `streamreader::FileStream::FileStream(streamreader::PcmStream::Listener*, boost::asio::io_context&, ServerSettings const&, streamreader::StreamUri const&)':
file_stream.cpp:(.text+0xbba): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: file_stream.cpp:(.text+0xc4e): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: file_stream.cpp:(.text+0xc56): undefined reference to `std::filesystem::path::replace_extension(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/streamreader/airplay_stream.cpp.o: in function `utils::file::exists(std::string const&)':
airplay_stream.cpp:(.text+0xb84): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: airplay_stream.cpp:(.text+0xb8c): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/streamreader/librespot_stream.cpp.o: in function `utils::file::exists(std::string const&)':
librespot_stream.cpp:(.text+0xa04): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: librespot_stream.cpp:(.text+0xa0c): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: CMakeFiles/snapserver.dir/streamreader/process_stream.cpp.o: in function `utils::file::exists(std::string const&)':
process_stream.cpp:(.text+0x9bc): undefined reference to `std::filesystem::path::_M_split_cmpts()'
/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/../lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: process_stream.cpp:(.text+0x9c4): undefined reference to `std::filesystem::status(std::filesystem::path const&)'
collect2: error: ld returned 1 exit status
make[5]: *** [server/CMakeFiles/snapserver.dir/build.make:599: bin/snapserver] Error 1
make[5]: Leaving directory '/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0'
make[4]: *** [CMakeFiles/Makefile2:182: server/CMakeFiles/snapserver.dir/all] Error 2
make[4]: Leaving directory '/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0'
make[3]: *** [Makefile:149: all] Error 2
make[3]: Leaving directory '/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0'
make[2]: *** [Makefile:125: /openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/build_dir/target-mipsel_24kc_musl/snapcast-0.28.0/.built] Error 2
make[2]: Leaving directory '/mnt/data/data/DEV/PROJECTS/PRIVATE/routers/openwrt-packages/sound/snapcast'
time: package/snapcast/compile#134.84#13.33#147.17
ERROR: package/snapcast failed to build.
make[1]: *** [package/Makefile:116: package/snapcast/compile] Error 1
make[1]: Leaving directory '/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64'
make: *** [/openwrt-sdk-21.02.7-ramips-rt305x_gcc-8.4.0_musl.Linux-x86_64/include/toplevel.mk:223: package/snapcast/compile] Error 2
What library is missing?
Some random internet result says that std::filesystem
needs -lstdc++fs
flag, but git grep stdc
in openwrt-packages doesn't show anything.
Reverting that #include <filesystem>
commit makes the 21.02 SDK happy.
I don't have any answers for you, but I think it's a good thing to set some expectations:
19.07 has been EOL and unsupported now for about 5 years.
21.02 has been EOL and unsupported for almost 2 years.
Both of these versions have known security vulnerabilities that will never be patched, and thus they are considered unsafe to be used for any purpose.
Because of the age and the security vulnerabilities, very few people are working with these versions anymore, let alone trying to build against these old versions. It's likely most people will not remember the nuances of building for them, either.
All of that said, it's not terribly likely that you'll get any help on these old versions. It is best to simply avoid anything earlier than 23.05 since all older versions are EOL, unsupported, and have issues that make them unsuitable for use.
1 Like