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

Linux AppImage crashes at runtime on Linux Mint 21.3 due to undefined symbol: Mix_PlayChannel #289

Open
milleniumbug opened this issue Feb 24, 2024 · 2 comments

Comments

@milleniumbug
Copy link

milleniumbug commented Feb 24, 2024

This seems to be related to the fact that the distro ships with SDL2_mixer 2.0.4 and the binary seems to be compiled against 2.6 or newer.

Note that before SDL_mixer 2.6.0, this function was a macro that called Mix_PlayChannelTimed() with a fourth parameter ("ticks") of -1. This function still does the same thing, but promotes it to a proper API function. Older binaries linked against a newer SDL_mixer will still call Mix_PlayChannelTimed directly, as they are using the macro, which was available since the dawn of time.

https://wiki.libsdl.org/SDL2_mixer/Mix_PlayChannel

Given that compiling the game from source on this distro works just fine, and this function seems to be used in only one place, and looking up the SDL source code confirms it's the same as calling Mix_PlayChannelTimed with an extra parameter, I think it would be safe enough to either replace the call, or compile against the earlier SDL2_mixer.

int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops)
{
    return Mix_PlayChannelTimed(channel, chunk, loops, -1);
}
@xordspar0
Copy link
Contributor

What version are you using? If you're using NXEngine-Evo-v2.6.5-1-Linux-x86_64.AppImage then it will fail to start anyway because of #262. No code changes should be required because the AppImage ships with its own SDL mixer library. On master, it links to and ships with 2.0.4, but evidently the last release has multiple bugs in the AppImage that prevent it from working.

@milleniumbug
Copy link
Author

I indeed tried NXEngine-Evo-v2.6.5-1-Linux-x86_64.AppImage, which appears to be the latest compiled release, before compiling it myself.

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

2 participants