RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    (Guide) Beginners guide to compile from source

    Scheduled Pinned Locked Moved Ideas and Development
    binarycompileguideportsource
    2 Posts 2 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tpo1990T
      tpo1990
      last edited by tpo1990

      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 necessary dependencies files are in place first, in order to succesfully being able to build a binary that will run on the Raspberry Pi. This is where compiling comes in. Usually the reason why compiling would be to preferred is if a binary does not exist for the current hardware or platform such a Raspberry Pi running Linux on an ARM 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 editor

      Glossary:
      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 required dependencies 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.

      Greetings from Denmark. :-)

      Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

      1 Reply Last reply Reply Quote 8
      • retropieuser555R
        retropieuser555
        last edited by

        Thanks again for doing this!

        Pi 5 4GB

        Retroflag GPI with raspberry pi zero 2 w/ wifi

        Retroachievements:- lovelessrapture

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.