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

squeezelite: Fix codec libraries loading by using a wrapper #76587

Merged
merged 1 commit into from Jan 31, 2020

Conversation

azazel75
Copy link
Contributor

Motivation for this change

This application really doesn't so much as it is, It's only able to play PCM music. The music encoded with the codecs (flac, mp3, ogg) doesn't work because the corresponding libraries are dynamically loaded at runtime. This PR fixes the situation by wrapping the executable and defining an LD_LIBRARY_PATH.

To see the problem install the squeezelite binary and run the following command:

$ squeezelit -c flac,ogg,pcm,mp3 -n squeezender -d all=debug

you should see the following lines:

...
[22:07:49.481102] load_vorbis:289 dlerror: libvorbisidec.so.1: cannot open shared object file: No such file or directory
[22:07:49.481177] load_flac:266 loaded libFLAC.so.8
[22:07:49.481354] load_mad:366 dlerror: libmad.so.0: cannot open shared object file: No such file or directory
[22:07:49.481389] decode_init:187 include codecs: flac,ogg,pcm,mp3 exclude codecs: 
[22:07:49.481576] discover_server:784 sending discovery
[22:07:49.483470] discover_server:795 got response from: 192.168.1.3:3483
[22:07:49.484691] alsa_open:422 opened device default using format: S32_LE sample rate: 44100 mmap: 0
...
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

no maintainers listed unfortunately...

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-20-03-feature-freeze/5655/12

@ryantm ryantm merged commit 1e14919 into NixOS:master Jan 31, 2020
@ryantm
Copy link
Member

ryantm commented Jan 31, 2020

thanks; please consider adding yourself as a maintainer.

anna328p pushed a commit to anna328p/nixpkgs that referenced this pull request Feb 2, 2020
squeezelite: Fix codec libraries loading by using a wrapper
@samdoshi samdoshi mentioned this pull request Feb 10, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants