Skip to content
Stewart Russell edited this page Mar 4, 2024 · 4 revisions

How to build b-em on Linux

Scope

These instructions are for Raspberry Pi OS with desktop (32 bit), which is a variant of Debian for the Raspberry Pi. Debian and Ubuntu should be similar. For other versions of Linux it will be necessary to install the compiler (gcc) together with automake 1.11 and the libraries - refer to the documentation for that distribution for instructions on how to do this. Package names may be slightly different, but should still be recognisable.

Please also note that the main readme has notes on compiling, and is likely to be more up to date than this page. Make sure you check it as well.

The How To

First set up the network, either plug in a network cable or configure the wifi.

In a terminal window: Install required libraries and header files. Say Y when it asks you if you really want to, and if you want to install dependencies. You have to do an update to make sure your Raspberry Pi knows what packages are available, otherwise it might try to download files that no longer exist. The upgrade is good practice to do occasionally.

sudo apt update
sudo apt full-upgrade
sudo apt install liballegro5-dev zlib1g-dev build-essential automake git libopenal-dev libalut-dev

To download, build and install the current development version from this repository:

git clone https://github.com/stardot/b-em.git
cd b-em/
autoupdate && ./autogen.sh && ./configure && make
sudo make install

While it's compiling, go and make a cup of tea. It takes a while on a Raspberry Pi - quicker on bigger computers. Don't worry about the warnings which are typically caused by the compiler getting more picky since the code was written, it still works OK. When the prompt comes back after sudo make install, try it out:

b-em

On a Raspberry Pi, while the emulator uses almost 100% of one core which suggests it needs a slightly faster CPU, it actually seems to run at the right speed.