Simulator support for Ubuntu 24.04

I also got it to work now with yet a different hack :smiley:

I noticed that the versioning difference between webkit2gtk 4.0 and 4.1 seems to be only the libsoup version they are compiled against (libsoup2 vs libsoup3). The PlaydateSimulator itself doesn't link to libsoup, which led me to believe that it doesn't actually matter with which libweb2gtk version it runs (which is also confirmed by @lodomodev above by providing the (also hacky) library symlinks above.)

I didn't want to globally link libwebkit2gtk-4.1 to 4.0 on my system, so I instead used patchelf to replace the dynamic library loader entry in the Simulator binary:

$ ldd $PLAYDATE_SDK_PATH/bin/PlaydateSimulator  | grep "not found"
	libwebkit2gtk-4.0.so.37 => not found
	libjavascriptcoregtk-4.0.so.18 => not found
$ locate libwebkit2gtk-4.1 | grep '^/usr/lib/'
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0.17.8
$ patchelf --replace-needed libwebkit2gtk-4.0.so.37 libwebkit2gtk-4.1.so.0.17.8 $PLAYDATE_SDK_PATH/bin/PlaydateSimulator

And then again for libjavascriptcoregtk:

$ patchelf --replace-needed libjavascriptcoregtk-4.0.so.18 libjavascriptcoregtk-4.1.so.0.8.6 $PLAYDATE_SDK_PATH/bin/PlaydateSimulator

I think this is a better option to modifying the system, as it only makes changes to the playdate simulator binaries. The simulator seems to run fine now.

2 Likes