Roguelike game on Heroku server: Libtcod dependence

57 Views Asked by At

I am trying to serve up game logic in a Heroku Python app. I'm using the libtcod library for some basic tasks (mostly Field of View calculations) and I'm having trouble getting it to run there.

Right now it's getting hung up on libSDL not existing. Crash log:

app[web.1]: import libtcodpy as libtcod
...
app[web.1]: OSError: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

The readme says: "To be able to compile libtcod on Linux, make sure that following packages are installed : gcc, g++, make , zlib , libpng12 , libsdl1.2 , upx , electric-fence ,libpng12-dev , libsdl1.2-dev "

I've tried adding libSDL to my pipfile and requirements.txt but this was not effective.

1

There are 1 best solutions below

1
krisz On

You need to have libsdl installed on the dyno. Installing additional packages is not supported, but there are some workarounds described here: https://help.heroku.com/IYRYW6VB/how-do-i-install-additional-software-packages-that-my-application-requires