SimpleDirectMediaLayer.jl
SimpleDirectMediaLayer.jl copied to clipboard
Warning messages about ALSA lib after fresh install on v0.2.1
Made a fresh reinstall of Julia 1.5.1 on a Debian machine and after installing SimpleDirectMediaLayer.jl and
using SimpleDirectMediaLayer
SimpleDirectMediaLayer.init()
I receive the following warning (or error) messages on the terminal, which repeatedly appear every several seconds
ALSA lib conf.c:4048:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
Creating windows and rendering works still fine (I never use sound), but the warning messages overfill the terminal and are very annoying.
Maybe this it is related to #51. When I pin the version to something before v0.2.* in the package manager
pkg> pin [email protected]
the warnings disappear.
I get the same problem.
My guess is that one of the _jll
packages (related to audio) uses a hard-coded path to alsa.conf
that is not standard.
I am also guessing that this "workspace
" directory might have something to do with the machines used to build these packages.
I guess this should also be reported to https://github.com/JuliaPackaging/Yggdrasil as this issue can only get fixed there.
I see. The "SDML" contributors here are not the maintainers of the _jll
files.
Thanks for the heads-up @Gnimuc. Apparently, an issue has already been created: --> https://github.com/JuliaPackaging/Yggdrasil/issues/1432
Anyone have time to try this solution?
Sidetracked
I've sort of had to look at other packages instead of SDML to get my work done. So: sorry. not yet.
Quick analysis
At first glance, it is sort of surprising that setting ENV["ALSA_PLUGINS_DIR"]
in julia would affect the library.
I would have thought the ENV variable would have to be export
ed BEFORE launching julia.
I also don't quite get the joinpath(alsa_plugins_jll.artifact_dir, "lib")
part because you could only get a reference to alsa_plugins_jll
if you've called import alsa_plugins_jll
. And by that point, ENV settings typically have no effect.
My view
... So I'm sort of guessing that post was mostly provided some vague direction on how to move forward. Sorry. I haven't yet had time to allocate neurons on this one.
There is a withenv
function:
help?> withenv
search: withenv
withenv(f::Function, kv::Pair...)
Execute f in an environment that is temporarily modified (not replaced as in setenv) by zero or more "var"=>val arguments kv. withenv is
generally used via the withenv(kv...) do ... end syntax. A value of nothing can be used to temporarily unset an environment variable (if it
is set). When withenv returns, the original environment has been restored.
This is how I got sound working on Linux. But I'm not sure how to convert that into a permanent solution: https://github.com/JuliaPackaging/Yggdrasil/issues/1432#issuecomment-851065063
With #65, I still get these warnings on CI. But that's probably because the config path on CI is not "/usr/share/alsa/alsa.conf".
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[194](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:197)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[195](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:198)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[196](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:199)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[197](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:200)
Test Summary: | Pass Total Time
[198](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:201)
Init+Quit | 4 4 0.3s
[199](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:202)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[200](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:203)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[201](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:204)
Test Summary: | Pass Total Time
[202](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:205)
Text | 7 7 0.1s
[203](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:206)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[204](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:207)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[205](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:208)
Test Summary: | Pass Total Time
[206](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:209)
Rendering | 9 9 0.1s
[207](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:210)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[208](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:211)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[209](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:212)
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
[210](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:213)
ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
[211](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl/actions/runs/3352202640/jobs/5554188390#step:6:214)
Testing SimpleDirectMediaLayer tests passed