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

Warning messages about ALSA lib after fresh install on v0.2.1 #52

Open
berndblasius opened this issue Sep 3, 2020 · 8 comments
Open

Comments

@berndblasius
Copy link

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 SimpleDirectMediaLayer@0.1.1
the warnings disappear.

@ma-laforge
Copy link

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.

@Gnimuc
Copy link
Member

Gnimuc commented May 3, 2021

I guess this should also be reported to https://github.com/JuliaPackaging/Yggdrasil as this issue can only get fixed there.

@ma-laforge
Copy link

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:
--> JuliaPackaging/Yggdrasil#1432

@Gnimuc
Copy link
Member

Gnimuc commented May 7, 2021

Anyone have time to try this solution?

@ma-laforge
Copy link

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 exported 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.

@Gnimuc
Copy link
Member

Gnimuc commented May 8, 2021

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.

@aviks
Copy link
Contributor

aviks commented Sep 24, 2022

This is how I got sound working on Linux. But I'm not sure how to convert that into a permanent solution: JuliaPackaging/Yggdrasil#1432 (comment)

@Gnimuc
Copy link
Member

Gnimuc commented Oct 29, 2022

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

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

No branches or pull requests

4 participants