Skip to content

snapcast: fix PulseAudio dependency#27441

Merged
robimarko merged 1 commit into
openwrt:masterfrom
xabolcs:fix-snapcast-buildbot-and-pulseaudio
Sep 14, 2025
Merged

snapcast: fix PulseAudio dependency#27441
robimarko merged 1 commit into
openwrt:masterfrom
xabolcs:fix-snapcast-buildbot-and-pulseaudio

Conversation

@xabolcs

@xabolcs xabolcs commented Sep 13, 2025

Copy link
Copy Markdown
Contributor

📦 Package Details

Maintainer: me (@xabolcs), @davidandreoletti

Description:
While testing my integration of Snapcast, I didn't test with CONFIG_ALL* and CONFIG_BUILDBOT flags, but the buildbots did and failed with a lot of undefined reference to PulseAudio:

[54/56] Linking CXX executable bin/snapserver
[55/56] Building CXX object client/CMakeFiles/snapclient.dir/decoder/opus_decoder.cpp.o
[56/56] Linking CXX executable bin/snapclient
FAILED: bin/snapclient 
: && /builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/bin/aarch64-openwrt-linux-musl-g++ -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_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/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/lib -fuse-ld=bfd -znow -zrelro     -Wl,--dependency-file=client/CMakeFiles/snapclient.dir/link.d client/CMakeFiles/snapclient.dir/client_connection.cpp.o client/CMakeFiles/snapclient.dir/controller.cpp.o client/CMakeFiles/snapclient.dir/snapclient.cpp.o client/CMakeFiles/snapclient.dir/stream.cpp.o client/CMakeFiles/snapclient.dir/time_provider.cpp.o client/CMakeFiles/snapclient.dir/decoder/pcm_decoder.cpp.o client/CMakeFiles/snapclient.dir/decoder/null_decoder.cpp.o client/CMakeFiles/snapclient.dir/player/player.cpp.o client/CMakeFiles/snapclient.dir/player/file_player.cpp.o client/CMakeFiles/snapclient.dir/browseZeroConf/browse_avahi.cpp.o client/CMakeFiles/snapclient.dir/player/alsa_player.cpp.o client/CMakeFiles/snapclient.dir/player/pulse_player.cpp.o client/CMakeFiles/snapclient.dir/decoder/ogg_decoder.cpp.o client/CMakeFiles/snapclient.dir/decoder/flac_decoder.cpp.o client/CMakeFiles/snapclient.dir/decoder/opus_decoder.cpp.o -o bin/snapclient  bin/libcommon.a  -lavahi-common  -lavahi-client  -lasound  -lpulse  -lvorbisidec  -logg  -lFLAC  -lopus  -lsoxr && :
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/14.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld.bfd: warning: libpulsecommon-17.0.so, needed by /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_cortex-a53_musl/usr/lib/libpulse.so, not found (try using -rpath or -rpath-link)
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/14.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld.bfd: /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_cortex-a53_musl/usr/lib/libpulse.so: undefined reference to `pa_memblock_ref'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-14.3.0_musl/bin/../lib/gcc/aarch64-openwrt-linux-musl/14.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld.bfd: /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_cortex-a53_musl/usr/lib/libpulse.so: undefined reference to `pa_strlist_pop'

Fix it with preventing PulseAudio detection.
While at it, prevent Avahi detection too to save more flash space.

These features will be available later, through flavours.

Fixes: #23956
Fixes: eeb8d13 ("snapcast: add package snapserver and snapclient")


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT
  • OpenWrt Target/Subtarget: mediatek/mt7622
  • OpenWrt Device: Xiaomi AX3200

Not run tested, but compile tested:

$ find bin -type f -name 'snap*' -exec ls -gGh {} \;
-rw-r--r-- 1 240K Sep 13 17:58 bin/packages/aarch64_cortex-a53/packages/snapclient-0.28.0-r1.apk
-rw-r--r-- 1 755K Sep 13 17:58 bin/packages/aarch64_cortex-a53/packages/snapserver-0.28.0-r1.apk

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable:
    N/A

While testing my integration of Snapcast, I didn't test with CONFIG_ALL*
and CONFIG_BUILDBOT flags, but the buildbots did and failed with a lot
of undefined reference to PulseAudio.

Fix it with preventing PulseAudio detection.
While at it, prevent Avahi detection too to save more flash space.

These features will be available later, through flavours.

Fixes: openwrt#23956
Fixes: eeb8d13 ("snapcast: add package snapserver and snapclient")

Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
@davidandreoletti

Copy link
Copy Markdown
Contributor

@xabolcs LGTM.

@robimarko robimarko merged commit a9ac866 into openwrt:master Sep 14, 2025
16 of 17 checks passed
@xabolcs

xabolcs commented Sep 14, 2025

Copy link
Copy Markdown
Contributor Author

Thank you @robimarko for quick response! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants