(Guide) Beginners guide to compile from source
-
Notice: This topic is being worked on and is not yet finished. Please hold off testing it at the moment. I will remove this text when it is ready.
Welcome to the beginners guide on how to compile from source for the Raspberry Pi.
Introduction:
I have recently received input from fellow members of the RetroPie community in the topic "Suggestions for ports" that they are interested in a guide that will get them started on how to compile from source. Compiling from source is nothing like installing software on Windows. It is quite different since it requires the user to either clone or download the source files and make sure all the necessarydependencies
files are in place first, in order to succesfully being able to build abinary
that will run on the Raspberry Pi. This is where compiling comes in. Usually the reason why compiling would be to preferred is if abinary
does not exist for the current hardware or platform such a Raspberry Pi running Linux on anARM
architecture or if the existing binary does not fit the current version running.Requirements:
Raspberry Pi of course, 3B(+) or 4B
Raspbian Desktop
Text and code editorGlossary:
RPI - Raspberry PI an inexpensive single board computer.
ARM - Advanced RISC Machines. ARM is processor architecture just like X86 is for Windows.
Binary - Binary is the file that the software or program is used to execute just like an .exe from Windows. This is also the file that we can run games and software from.
Dependencies - The files that sources need in order to be able to build a working binary. This is like the .dll files for Windows, except it is for the source or port.Basic compiling recipe with cloning from github repository:
- Check dependency requirements of the source port.
- Open
linux terminal
and install necessary requireddependencies
for the source port. - Clone the github
repository
. - Change directory to the cloned repository
folder
. - Create a
build
folder inside the cloned repository folder. - Change directory to the
build
folder. - Use
cmake
command to build compiling instructions. - Run
make
command to build a binary that can run the game. - Use
./name-of-binary
to run the binary that was created during make process.
To be continued.
-
Thanks again for doing this!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.