Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chrisyco
Created December 13, 2011 05:01
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chrisyco/1470676 to your computer and use it in GitHub Desktop.
Save chrisyco/1470676 to your computer and use it in GitHub Desktop.
How to compile DeSmuME on Debian or Ubuntu

How to compile DeSmuME on Debian or Ubuntu

(with a mildly condescending tone)

Step 0 (optional)

You can enable fancy optimizations by creating a config.site file. To do this, open your favorite text editor and type:

CFLAGS='-march=native'
CXXFLAGS='-march=native'

Save it somewhere, preferably somewhere you'll remember.

Now back in your terminal, tell the compiler where you put it:

export CONFIG_SITE=/absolute/path/to/config.site

Don't close the terminal. If you close it, you'll have to export that variable again. When you follow the steps below, use the same terminal you used to type that command.

Step 1

Download the source code.

Step 2

Unpack the source code:

cd Downloads
tar -xzvf desmume-*.tar.gz
cd desmume-*

Step 3

Install dependencies:

sudo apt-get install libsdl1.2-dev libgtk2.0-dev libglade2-dev libosmesa6-dev \
                     libagg-dev intltool libgtkglext1-dev liblua5.1-0-dev

Type that command exactly. Don't go fiddling around with the package names—we don't want this to break, do we?

Explanation: SDL and GTKGLExt and OSMesa and AGG are used for graphics. GTK2 (not 3) and Glade (glade2, not GladeUI) provide the GUI. Lua is used for scripting. Intltool is used for translations.

Step 4

Check everything's okay:

./configure

Read the output carefully. If anything says "no", check you've installed it, and installed the right one. Then try again.

Step 5

If and only if the checks passed, start compiling:

make

Ignore the flurry of commands and warnings: if it didn't say "error", it's okay.

Step 6

Test it to see if it works:

src/gtk-glade/desmume-glade

A window should pop up. That's DeSmuME. If you can see it, it works. You can go play now.

Step 7 (optional)

If you want to, you can install it globally:

sudo make install

Check it worked:

which desmume

Now you can run it simply using:

desmume

Have fun!

Copy link

ghost commented May 14, 2013

Thank you for the simple how to, it worked just fine running xubuntu 13.04 64bit

Copy link

ghost commented Aug 24, 2015

This a great help, but I should point out I had to exclude the "libosmesa6-dev" package to make it compile on Ubuntu 14.04.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment