Running Ren'py games on aarch64 or arm64?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Running Ren'py games on aarch64 or arm64?

#1 Post by llirium »

In an older topic, I read that there wasn't support for these architectures, is this still the case? Running Ren'py launcher itself on my machine is fine though, I'm running NixOS on aarch64 with a Raspberry Pi 4 system (4G of RAM). Attempting to run the game file's .sh from console doesn't work, as you can see:

Code: Select all

[llirium@nixospi:~/Games/Katawa Shoujo-1.3.1-linux]$ ./Katawa\ Shoujo.sh
Ren'Py could not detect that platform it's running on. Please set
the RENPY_PLATFORM environment variable to one of "linux-i686" or
"linux-x86_64", or "darwin-x86_64" and run this command again.
Is it possible to run a Ren'py game with Python 2 or 3 support alone, perhaps? Like this:

Code: Select all

python2 name_of_game.py

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#2 Post by Zetsubou »

Is it supported nowadays. But I believe you'll need to grab the ARM version
"Download ARM Linux (Raspberry Pi and Chromebook) SDK tar.bz2"
from the renpy downloads page and compile the game with that.
Then when you compile a game for Linux it should have py2-linux-aarch64 or py3-linux-aarch64 in the lib folder.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#3 Post by llirium »

Appreciate the answer, but I'm trying to run older games without a specific arm64/aarch64 version. Guess it's impossible to run them unless you're running on an x86/x86_64/darwin-x86_64 machine?

(unrelated note for Zetsubou: Really liked the concept of Humanity Must Perish, it was played more [and less] seriously than I'd expected and both were a pleasant surprise. :))

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#4 Post by Zetsubou »

Huh. I thought Katawa Shoujo was open source, so you'd be able to compile it yourself with the above launcher, but I guess not.

In that case you might be able to run the game by copying the lib directory from the above SDK into the game folder.
So replace the directory of KatawaShoujo/lib with renpy-7.5.3-arm/lib
And replace the content of KatawaShoujo.sh with the content of renpy.sh (the .sh script isn't game-specific)
That way you'll have the arm libraries needed for your platform and a .sh file which knows how to run it.

(unrelated note: thanks :) I'm glad you liked it)
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#5 Post by PyTom »

You can usually run Ren'Py games by copying the game into your projects directory, picking it out of the launcher, and running it in the launcher. You'll be running in the newer version of Ren'Py, but if there isn't any use of Ren'Py internals, it often works.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#6 Post by llirium »

Oh, thanks for letting me know, I'll give it a shot. Will give an update if it works. :)

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#7 Post by llirium »

Nevermind about the last post, I missed some steps when trying to make it work. :oops:

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#8 Post by llirium »

Still no dice. Manually downloaded the 7.5.3 SDK for ARM, backed up and then replaced the lib directory of Katawa Shoujo with the SDK's lib, and replaced the .sh file with the one from the SDK too. Not sure what's wrong, the renpy file is definitely in that location, the file permissions are fine.

Code: Select all

$ ./Katawa\ Shoujo.sh
./Katawa Shoujo.sh: line 67: /home/llirium/Games/Katawa Shoujo-1.3.1-linux/lib/py2-linux-aarch64/renpy: No such file or directory
$ ls -l /home/llirium/Games/Katawa\ Shoujo-1.3.1-linux/lib/py2-linux-aarch64/renpy
-rwxr-xr-x 1 llirium users 6.0K 2022-09-08 22:21 '/home/llirium/Games/Katawa Shoujo-1.3.1-linux/lib/py2-linux-aarch64/renpy'*
I'm out of ideas. :(

EDIT: here's the section of code from line 67 from the repurposed renpy.sh in Ren'Py 7.5.3.

Code: Select all

if [ -e "$LIB/renpy" ] ; then
    exec $RENPY_GDB "$LIB/renpy" "$@" ## <-- THIS is line 67
fi
Last edited by llirium on Mon Apr 10, 2023 6:47 pm, edited 1 time in total.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#9 Post by Zetsubou »

On Linux that error can actually mean the loader, not the file itself, can't be found.
So it can find py2-linux-aarch64/renpy but doesn't know how to run it.

A quick bit of googling suggests this might be due to the way nixos runs.
I'm not familiar with nixos myself, but search results suggest patching the binary with patchelf might be necessary.
eg. https://stackoverflow.com/a/56997739
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#10 Post by llirium »

Think I'm getting closer to figuring it out now. Here's what ldd reported on the renpy executable in the py2-linux-aarch64 folder:

Code: Select all

$ ldd ./renpy
        linux-vdso.so.1 (0x0000007f8a951000)
        librenpython.so => /home/llirium/Games/Katawa Shoujo-1.3.1-linux/lib/py2-linux-aarch64/./librenpython.so (0x0000007f891e0000)
        libpthread.so.0 => /nix/store/glibc-2.35-224/lib/libpthread.so.0 (0x0000007f891b0000)
        libc.so.6 => /nix/store/glibc-2.35-224/lib/libc.so.6 (0x0000007f89000000)
        libGL.so.1 => not found ## <------ HERE's the problem!
        libdl.so.2 => /nix/store/glibc-2.35-224/lib/libdl.so.2 (0x0000007f88fd0000)
        libutil.so.1 => /nix/store/glibc-2.35-224/lib/libutil.so.1 (0x0000007f88fa0000)
        libm.so.6 => /nix/store/glibc-2.35-224/lib/libm.so.6 (0x0000007f88ef0000)
        /lib/ld-linux-aarch64.so.1 => /nix/store/glibc-2.35-224/lib/ld-linux-aarch64.so.1 (0x0000007f8a914000)

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#11 Post by PyTom »

You do need to install libgl to get things working. I'm not sure how to do that on NixOS - I've only tried on raspbian.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
llirium
Regular
Posts: 31
Joined: Mon Oct 16, 2006 4:09 pm
Projects: Aurora Fall (editor, as Xyllirium)
Contact:

Re: Running Ren'py games on aarch64 or arm64?

#12 Post by llirium »

Sorry, I was barking up the wrong tree all along due to my inexperience with NixOS. Pre-compiled executables (like a Ren'Py binary which hasn't been installed in the NixOS way) do not typically work on NixOS (feature, not a bug).

If anybody else ever shares my problem, the article below (Dec 2022) helps to explain why NixOS does not function like other Linux distros. It will (apparently) no longer be a problem in future versions of the distro (NixOS version 23.05).

https://blog.thalheim.io/2022/12/31/nix ... -on-nixos/

Will put plans on running older Ren'Py games on hold for now. But once NixOS 23.05 becomes the stable version of the distro, I'll experiment with nix-ld and probably get those Ren'Py binaries working. Apologies for not realizing this sooner, thanks for trying to help. :oops:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]