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

libasound is mandatory for startup on Linux #5

Open
baget opened this issue Aug 3, 2019 · 9 comments
Open

libasound is mandatory for startup on Linux #5

baget opened this issue Aug 3, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@baget
Copy link

baget commented Aug 3, 2019

when trying to run on latest WSL with Ubuntu, getting the following error:
sampler: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

@sqshq
Copy link
Owner

sqshq commented Aug 4, 2019

1.0.1 was released, the fix for this issue included. Could you please update Sampler and try again?

sudo wget https://github.com/sqshq/sampler/releases/download/v1.0.1/sampler-1.0.1-linux-amd64 -O /usr/local/bin/sampler

@baget
Copy link
Author

baget commented Aug 4, 2019

didn't work
why does the sampler need libasound?

@baget
Copy link
Author

baget commented Aug 4, 2019

I'm using it on my personal Windows 10 (1903) computer, you can use VM to test it
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

@sqshq
Copy link
Owner

sqshq commented Aug 4, 2019

Was able do reproduce. Can be fixed with apt-get install libasound2, but it better work without it. I'll see what I can do.

The libasound is needed to play a beep sound (NASA quindar tone) on conditional action (trigger): https://github.com/sqshq/sampler#triggers

@baget
Copy link
Author

baget commented Aug 4, 2019

Was able do reproduce. Can be fixed with apt-get install libasound2, but it better work without it. I'll see what I can do.

The libasound is needed to play a beep sound (NASA quindar tone) on conditional action (trigger): https://github.com/sqshq/sampler#triggers

that solved the issue, maybe you should add it to the README?

@sqshq
Copy link
Owner

sqshq commented Aug 4, 2019

Done.

@sqshq sqshq changed the title does not work on WSL libasound is mandatory for startup on Linux Aug 6, 2019
@sqshq sqshq added the enhancement New feature or request label Aug 6, 2019
@rowco
Copy link

rowco commented Aug 7, 2019

Struggling to solve this dependency on RedHat. Is it possible to make it optional?

@sqshq
Copy link
Owner

sqshq commented Aug 7, 2019

Yes, that's the plan. I'll try to figure out how to do that without removing sound tone functionality completely. Right now the binary needs to dynamically load libasound at runtime, that's why we are failing on startup.

Any ideas are welcome.

Oto player also causes me troubles with cross-compilation for ARM.
Need to do something with it.

@bartoque
Copy link

I ran into the same issue on a system I am not the admin of. To have an option to disable the sound feature altogether would be handy.

Wrote a small wrapper script that sets the LD_LIBRARY_PATH to include the directory that the sampler binary is located in and copied over the libasound.so.2 from another linux system. Then at least I can run sampler.

Didn't test using a trigger to get a sound, I assume it would break as the lib file by itself might not be enough for it to work...

sampler.sh :

#!/bin/sh

if [ -n "$LD_LIBRARY_PATH" ]; then
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
else
  LD_LIBRARY_PATH=./
fi
export LD_LIBRARY_PATH
exec ./sampler-1.0.2-linux-amd64 "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants