box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Symbol "_snd_pcm_query_chmaps" not found in libasound.so.2

Open shakeheartbreak opened this issue 4 months ago • 7 comments

Running a 32-bit x86 SDL app under box64 on aarch64, its ALSA audio init fails with:

Failed loading snd_pcm_query_chmaps: Symbol "_snd_pcm_query_chmaps" not found in libasound.so.2

The wrapped 32-bit libasound.so.2 doesn't seem to export snd_pcm_query_chmaps. SDL falls back to no audio.

Would it be possible to add that symbol to the wrapper?

(Appreciate your work, as always.)

shakeheartbreak avatar Jul 18 '26 20:07 shakeheartbreak

Ok, I added that function

ptitSeb avatar Jul 19 '26 07:07 ptitSeb

Superb! Thank you very much, I'll pull and rebuild and let you know if audio comes up.

shakeheartbreak avatar Jul 19 '26 09:07 shakeheartbreak

I tested it tonight and we have sound :) I then hit a crash in box64's wrapped snd_strerror under Box32. When ALSA can't open a card, the app calls snd_strerror to format the error and box64 aborts on it:

[BOX32] Warning, pointer 0x7f4bb60b30 is not a 32bits value 9651|SIGABRT @... x64pc=.../"box64/snd_strerror + 0x13"

Looks like the wrapped snd_strerror hands back a native 64-bit pointer that isn't converted for the 32-bit guest. i386 app + ALSA with no card reproduces it every time.

(As always, I have a full log if useful and thanks for your great work)

shakeheartbreak avatar Jul 21 '26 23:07 shakeheartbreak

Oh, a SIGABRT because message pointer is not 32bits compatible. I see. I'll fix that.

ptitSeb avatar Jul 22 '26 08:07 ptitSeb

Ok, that should be fixed now.

ptitSeb avatar Jul 22 '26 08:07 ptitSeb

Fixed 😎

shakeheartbreak avatar Jul 25 '26 12:07 shakeheartbreak

Good, thanks for the feedback.

ptitSeb avatar Jul 25 '26 13:07 ptitSeb