Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi, I can't get the game to run on linux. I get the following error:

INFO: started Skeletris version: 1.0.3-BETA
INFO: development mode: False
INFO: pygame version: 1.9.3
INFO: initializing sounds...
libGL error: MESA-LOADER: failed to open radeonsi (search paths /usr/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi (search paths /usr/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  43
  Current serial number in output stream:  42

I'm running Arch Linux and have a Radeon RX 580 video card.

I'd be happy to provide any further info and/or debug this. The game looks awesome and I'd love to give it a try :)

Sorry about that and thanks for grabbing the logs - it looks like OpenGL is failing to start. Can you verify that your system supports OpenGL? An easy way to check is to run 'glxgears -info' in a command line, and it should create a window with some spinning gears and dump a bunch of info about your system's opengl setup. If that works, let me know what it says the GL_RENDERER, GL_VERSION, and GL_VENDORs are (no need to include any of GL_EXTENSIONS). For example, mine reports:

GL_RENDERER   = Mesa DRI Intel(R) Ivybridge Mobile

GL_VERSION    = 3.0 Mesa 10.5.9
GL_VENDOR     = Intel Open Source Technology Center

If the gears benchmark works and your GL_VERSION is at least 2.1, I'd expect the game to run ok, so in that case maybe there's something on my end I need to update or fix. And your computer is definitely 64-bit, right?

I also encountered this issue. It seemed to be fixed by launching the game like: LD_PRELOAD=/usr/lib/libstdc++.so ./Skeletris

I'd encountered a similar bug where a game came with an older copy of that library.

GL_RENDERER   = Radeon RX Vega (VEGA10, DRM 3.35.0, 5.4.43-1-MANJARO, LLVM 10.0.0)
GL_VERSION    = 4.6 (Compatibility Profile) Mesa 20.0.7
GL_VENDOR     = X.Org

Thanks for the quick response!

glxgears works, this is the output you requested:
GL_RENDERER   = Radeon RX 580 Series (POLARIS10, DRM 3.37.0, 5.7.2-zen1-1-zen, LLVM 10.0.0)
GL_VERSION    = 4.6 (Compatibility Profile) Mesa 20.1.1
GL_VENDOR     = X.Org

Yes, my computer is 64-bit :) For completeness, the output of `uname -a`
Linux arch-desktop 5.7.2-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 10 Jun 2020 20:36:27 +0000 x86_64 GNU/Linux

I also tried the suggestion from espr, `LD_PRELOAD=/usr/lib/libstdc++.so ./Skeletris` and that works.

Again for completeness, the output of `ls -l /usr/lib/libstdc++.so`
lrwxrwxrwx 1 root root 19 21 mei 19:20 /usr/lib/libstdc++.so -> libstdc++.so.6.0.28*

I hope this helps track down and solve the underlying issue. If you need any more info or any more tests, please let me know.

Thank you both for your help here! Based on this blog (section 3, "What if I need a (more) recent compiler?") it sounds like the problem is that the game is packaged with a version of libstdc++.so that's too old for your OpenGL instances to use - causing the program to crash.

I will try to upload a new Linux version today that doesn't include libstdc++.so, which should cause the game to use the system's version of that library instead and prevent this issue moving forward. (I think it's safe to assume there will always be a libstdc++ on people's systems if they have OpenGL...). In the meantime, the LD_PRELOAD workaround seems like the best option (thanks @espr, you're a lifesaver).

I've uploaded a new Linux build titled "Skeletris for Linux (experimental build, 64-bit)" that doesn't include the libstdc++.so.6 library, so I think the game will work properly if you try using that version instead. I may also move this thread into a dev log because it's so huge. Thanks again.

Thanks for the quick update. I've tested the experimental build and that works. I've also played a couple of rounds in the game, which is great :)

Just one remaining issue: I don't have any sound. The only line in the log that stood out to me as being related to sound is this one:

ALSA lib pcm.c:8545:(snd_pcm_recover) underrun occurred

Any thoughts on how to debug this? :)

(2 edits)

I'm glad the build works!

I'm sad the sound doesn't :(

The game is just using the regular pygame api for sound so I'm not sure where to start really. It could be the same issue as before, where some older dependency is being used instead of a newer one your system is expecting, or maybe your system wants to use PulseAudio instead of ALSA, or something else entirely. I'm not really sure.

That log line is interesting, but I suspect it's a symptom of some root audio issue rather than the cause. Looks like the audio buffer isn't being passed as much data as it's supposed to be.

If you're really curious you could try downloading some other pygame games and see if the sound works properly on those - I suspect it won't but you never know.

I think the real answer here though is that I shouldn't have assumed that testing on Ubuntu alone would be enough to clear this for a general "Linux" release, so I'm sorry about that. Moving forward I'll probably label these builds as Ubuntu specifically until I have more of my own machines to test on. Sorry for all the trouble.

No need to be sorry! I'm already super happy with the support you're giving.

I'll go play around a bit with pygame stuff and see if I can find anything. I'll let you know if I do. Perhaps together we can expand Ubuntu back into "general Linux" :)

Hi again. I've got sound!

Similar issue to libstdc++ I think. LD_PRELOAD=/usr/lib/libSDL.so ./Skeletris works. Can you make a build with the same trick you used for libstdc++ and apply it to libSDL?

Oh nice! That's quite interesting. SDL is essentially the core dependency of pygame - so I don't think it's a good idea to swap it out for a different version on the fly like that. It could cause pygame to crash in bizarre ways at runtime if it ever tries to call a method or something that differs between the two versions.

And actually now that I'm reading the pygame wiki, it's become apparent that there are different pygame packages for the different families of linux distros... which is probably why nothing is working correctly... so that's my bad.

In terms of what to do next... I don't think there actually is a legitimate way for me to build the game on my machine (Mint) in a way that will run correctly on Arch. Even beyond libSDL and libstdc++ I don't think it's safe to assume that any of the dependencies will be 100% compatible.

If you want a real, totally functional build, you'd probably need to download the source code, install the Arch versions of all the dependencies, and build it yourself. I'm thinking this is probably more trouble than it's worth though. The game is about an hour long, after all haha.

And thanks for your dedication! You've gone way above and beyond what I'd expect from a player to help me fix this and I've learned a lot about Linux + pygame distribution in the meantime so I really appreciate it. On my next game I promise I will try to find an Arch machine that I can use to distribute it properly!