Ubuntu Compilation / Development Guide¶
The easiest route to get into building RetroArch and libretro cores on Ubuntu linux is to use libretro's PPA.
For stable releases you can add the PPA like this:
For development work we recommend the testing PPA instead:
You will need git and a few build tools at least to proceed which you can install by issuing the following command:
The first step is to obtain RetroArch's source tree.
You can get RetroArch's dependenencies by running the following command:
Depending on your configuration you may need to uncomment the deb-src repositories in /etc/apt/sources.list, /etc/apt/sources.list.d/libretro-ubuntu-testing-$version.list and then run apt-get update before running apt-get build-dep
For subsequent builds you will need to pull the changes from the repo
To compile RetroArch run the following commands inside RetroArch's source tree:
1 2 3
For development purposes you might want to run a debug build instead. In such case use the following commands:
1 2 3
You can then start RetroArch by running:
Local builds do not contain assets. On a clean build, assets will be located by default at $HOME/.config/retroarch/assets, and can be downloaded from the Main Menu via Online Updater > Update Assets
If you're building frequently you may want to add ccache to the mix to speed up the build process.
Install ccache via apt and the prepend the ccache symlink directory to your build environment path as shown below.
For further instructions check the documentation
You can add that last line to your ~/.bashrc to avoid having to type that every time you start your working environment.
You can find the cores on libretro's GitHUB organization.
We have an all-in-one tool to fetch and compile cores which you can use to streamline the process.
You can obtain the tool by using these commands:
Then you can fetch one or all the cores by using libretro-fetch.sh
Fetch all cores:
Fetch one core:
Replace corename with the name of the core you want to fetch, for example gambatte
The easiest way to build all the cores is to use libretro-build.sh from within libretro-super's source tree:
In case you only want to build one and/or more cores instead of all, you can specify the cores you want to build after the first command in no particular order:
Once compilation has finished, you can find the libretro cores inside dist/unix.
Manual Fetching and Compilation¶
Get the core's source tree. As an example we'll use fceumm
Then compile the core:
Optionally strip the build product:
Most cores will build with these instructions. You might need to browse to a subdirectory in some cases.