[Question]: Is it possible to build the game using Termux?
Closed this issue ยท 19 comments
I remember trying without success.
It should be possible, given that the arm-none-eabi-gcc compiler is installed. I think the best option is to download the compiler's binary executables from ARM's website, if they are available.
It might also be necessary to change the compiler name in Makefile
.
The Device Architecture I use is Armeabi-v7a, so I don't know if it's possible to build the game.
But in which lines of the Makefile
can I change the Compiler, and which ones are Compatible?
I use GNU Make and Clang. I typed these commands in the Terminal to see the Compiler version
~ $ gcc -v clang version 15.0.7 Target: armv7a-unknown-linux-android24 Thread model: posix InstalledDir: /data/data/com.alif.ide.python/files/alif/bin ~ $ make -v GNU Make 4.4.1 Built for arm-unknown-linux-androideabi Copyright (C) 1988-2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
The lines in Makefile
that might have to be changed are these:
ifeq ($(CURRENT_OS),UNIX)
CC := arm-none-eabi-gcc
AS := arm-none-eabi-as
OBJCOPY := arm-none-eabi-objcopy
EMULATOR := mgba-qt
else ifeq ($(CURRENT_OS),WINDOWS)
...
changing CC, AS and OBJCOPY to the installed compiler and tools.
There could be a fair amount of tinkering to get the game to compile on that platform, including potentially missing libraries (newlib??) and tools.
What I would try, since I'm not sure clang can compile the game considering I'm using GCC extensions and linker script, is downloading arm-none-eabi-gcc directly from ARM's website. Pretty sure this is the correct download page: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
What are AS and OBJCOPY? and what do they do? (Just a question)
AS is the assembler, needed for a few assembly files required in the code. OBJCOPY is the tool I use to convert ELF files into raw (GBA) files.
Basically the game gets first compiled into ELF, then converted into GBA cartridge format.
The lines in
Makefile
that might have to be changed are these:ifeq ($(CURRENT_OS),UNIX) CC := arm-none-eabi-gcc AS := arm-none-eabi-as OBJCOPY := arm-none-eabi-objcopy EMULATOR := mgba-qt else ifeq ($(CURRENT_OS),WINDOWS) ...
changing CC, AS and OBJCOPY to the installed compiler and tools.
There could be a fair amount of tinkering to get the game to compile on that platform, including potentially missing libraries (newlib??) and tools.
What I would try, since I'm not sure clang can compile the game considering I'm using GCC extensions and linker script, is downloading arm-none-eabi-gcc directly from ARM's website. Pretty sure this is the correct download page: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
the only problem is that I only use Android, and the arm-none-eabi-gcc objcopy and as, is not possible to install on Android (as far as I know)
That should be easy to fix. Change that line in the Makefile to python3 scripts/convert-resources.py
.
Which line?
The line that says scripts/convert-resources.py
. Try adding "python3" or "python" at its beginning.
There's some problem with the execution permissions in that directory. All those scripts are Python scripts. I'm not sure how to do that, but the easiest solution would be to allow executions in that directory or mount point.
Maybe the problem could be in termux, it could be that in other terminal emulators it works.
I came to this conclusion because I am absolutely sure that everything I am doing is right, but Termux is not working properly.
The "undefined symbol" errors are my fault, I just fixed those in commit 4d00d63.
I'm not sure what those "relocation" errors mean, maybe the compiler needs to be configured differently.
The "undefined symbol" errors are my fault, I just fixed those in commit 4d00d63.
I'm not sure what those "relocation" errors mean, maybe the compiler needs to be configured differently.
Yeah. I'm glad I helped you find a flaw in the code even though it wasn't my intention. Thank you.