Hercules from source

Installing the latest version

Now this is the fun part. I will try to describe this as clearly as I can. It’s not all that complicated once you know where to get your stuff (and your info). It is in this area that the invaluable help from mgrossman came in. Here we go.

Install Github

First we ensure that we have access to Github, a ginormous open source source file repository. To get our access to Github we proceed as follows:

sudo apt-get install git

When this is done, we create our own git working directory and we go there:

cd ~
mkdir git
cd ~/git

There we are, you now have your own git workshop.

Install Hercules source

Now we are going to download (in git terms we ‘clone’) our version of Hercules. I recommend using the one from this Github user: SDL-Hercules-390. Go to his page, then click on the ‘Hyperion’ link. Once there, you will see a green ‘Clone or download’ button. Click on it and you will see this pop-up screen open.

Now you click on the small symbol next to the URL. This will copy the URL into your buffer to be pasted. Now we go to our terminal window we type:

cd ~/git
git clone https://github.com/SDL-Hercules-390/hyperion.

Mind you, the URL I got, might be outdated at the time you try this recipe! Paste in your own after the ‘git clone ‘ command. Execute the command and have it install all files you need.

Make sure we have all packages we need

To make sure our tool box is up to date we type:

cd ~/git/hyperion/util/

This will tell us which tools we need to get or upgrade. You carefully check which tools you need to get or upgrade and then you type:

sudo apt-get install ... autotools-dev cmake g++

This line above is an example! Fill in your packages on the dots! Important to notice is that ‘g++‘, ‘autotools-dev‘ and ‘cmake‘ are in the list of files to install. the bldlvlck utility will not warn you about g++, but install it, just like the others, the process needs it! We will come back here after we have done something else.

Install external packages

First we need to install some external packages because the standard ones will not work on our Raspberry Pi’s ARM architecture. To do that we visit the : SDL-Hercules-390 Github page again. This time we go to the ‘gists’ subpage. In the same manner as shown above we cope the URL for this stuff and we go to our terminal again, where we give the commands:

cd ~/git
git clone https://github.com/SDL-Hercules-390/gists.git

Again, your mileage may vary. Copy your own URL and paste it just after the ‘git clone ‘ command! Now we rename the directory it created for clarity and we execute the script we need:

cd ~/git
mv gists extpkgs
cd extpkgs

Now in this directory extpkgs, there’s a configuration file called extpkgs.sh.ini, that contains a line that we are going to comment out and replace with another one:

nano extpkgs.sh.ini

#cpu             =  x86    /* old line */
cpu             =  arm     /* new line */

After you have changed and save the file, remain in the ~/git/extpkgs directory and execute the script:

chmod +x extpkgs.sh
./extpkgs.sh clone c d s t

After this ends well, we have our fresh version of the external packages.

Building & installing Hercules

Now we can go back to our hyperion directory and build our version. First we do:

cd ~/git/hyperion

And now, when the previous command went well, we are ready to configure our build; but watch it, you have to specify your own path name:

./configure --enable-optimization="-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard" --enable-extpkgs=/YourPathTo/git/extpkgs

After this command executed well, you can proceed to actually ‘make‘ the build:


This will take a while, especially on our Raspberry Pi… It will generate a lot of warnings, that is expected and can be ignored. When this make finished without errors we can do:

sudo make install

And we’re done building our own version. Now we need to take care of the old hercules version you might have installed from the repositories:

sudo apt-get remove hercules

This will (only) remove the hercules files that were installed by apt-get, so no worries, your build is save.