I made a VM of Debian Jessie (unstable SHOULD work, according to Ilari) and I have successfully built LSNES on it. Here is what I did:
DEPENDENCIES
Run this as root in your favorite terminal
# apt-get install build-essential git libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-regex-dev libboost-thread-devel libevdev-dev libgcrypt20-dev liblua5.2-dev liblzma-dev libopus-dev libsamplerate0-dev libswscale-dev libwxgtk3.0-dev lua5.2 portaudio19-dev zlib1g-dev
Download a BSNES tarball in your web browser (I've used 'bsnes_v085-source.tar.bz2', it seems to have the most patches) from
https://github.com/Alcaro/bsnes-gc/blob/master/README.md You can also download the GAMBATTE source at
https://sourceforge.net/projects/gambatte/files/gambatte/r537/gambatte_src-r537.tar.gz/download
Extract the BSNES source and copy the dir contents of 'bsnes' into the 'lsnes/bsnes' dir, and extract the whole GAMBATTE source into 'lsnes/gambatte' dir, then cd into 'lsnes/bsnes'.
PATCHING and BUILDING
Do the following:
# patch -p1 < ../bsnes-patches/v085/0001-Make-libsnes-compile.patch
# patch -p1 < ../bsnes-patches/v085/0002-Fix-bsnes-version-number-in-libsnes-to-be-v085-not-v.patch
# patch -p1 < ../bsnes-patches/v085/0003-Don-t-use-time-in-emulating-chips.patch
# patch -p1 < ../bsnes-patches/v085/0004-Save-controller-state-when-savestating.patch
# patch -p1 < ../bsnes-patches/v085/0005-Fix-unserialization-of-64-bit-signed-integers.patch
# patch -p1 < ../bsnes-patches/v085/0006-Allow-frontend-to-control-random-number-seed.patch
# patch -p1 < ../bsnes-patches/v085/0007-Fix-mouse-polling.patch
# patch -p1 < ../bsnes-patches/v085/0008-Fix-uninitialized-variables.patch
# patch -p1 < ../bsnes-patches/v085/0009-Add-needed-support-for-detecting-true-polls-as-oppos.patch
# patch -p1 < ../bsnes-patches/v085/0010-Fix-compiling-on-GCC-4.7.patch
# patch -p1 < ../bsnes-patches/v085/0011-Support-notifying-latches.patch
# patch -p1 < ../bsnes-patches/v085/0012-Support-unlimited-number-of-breakpoints.patch
# patch -p1 < ../bsnes-patches/v085/0013-Support-auto-detecting-bsnes-version.patch
# patch -p1 < ../bsnes-patches/v085/0014-Support-alternate-more-accurate-poll-timings.patch
# patch -p1 < ../bsnes-patches/v085/0015-Fix-mouse-speed-support.patch
# patch -p1 < ../bsnes-patches/v085/0016-Fix-tracelog-of-controller-registers.patch
# patch -p1 < ../bsnes-patches/v085/0017-Fix-performance-problem-with-non-bus-breakpoints.patch
# patch -p1 < ../bsnes-patches/v085/0018-Support-VRAM-OAM-CGRAM-and-APURAM-breakpoints.patch
# patch -p1 < ../bsnes-patches/v085/0019-SA1-trace-hook-support.patch
# patch -p1 < ../bsnes-patches/v085/0020-Fixes-to-SA1-open-bus-emulation.patch
# patch -p1 < ../bsnes-patches/v085/0021-Call-notify-latch-function-on-alternate-timings-mode.patch
# patch -p1 < ../bsnes-patches/v085/0022-Support-DMA-tracing.patch
# patch -p1 < ../bsnes-patches/v085/0023-Add-autopoller-and-IRQ-NMI-tracing.patch
# patch -p1 < ../bsnes-patches/v085/0024-Build-fixes-for-GCC-5.X.patch
# patch -p1 < ../bsnes-patches/v085/0025-Fix-MSU-1-bug-where-write-to-MSU1BASE-4-is-mirred-to.patch
# patch -p1 < ../bsnes-patches/v085/0026-Add-vector-to-avoid-compile-error-due-to-missing-std.patch
cd into 'lsnes/gambatte' and do the following:
# patch -p1 < ../0001-Changes-to-make-libgambatte-rerecording-friendly.patch
# patch -p1 < ../0002-Expose-CPU-registers.patch
# patch -p1 < ../0003-Breakpoints-debugging.patch
# patch -p1 < ../0004-Fix-sound-DC-levels.patch
# patch -p1 < ../0005-Crash-on-illegal-instruction-fix-MBC3-bank0.patch
# patch -p1 < ../0006-Fix-read-write-of-A-PC-and-CycleCounter-when-executi.patch
# patch -p1 < ../0007-Fix-bus-write-breaks.patch
# patch -p1 < ../0008-Fix-execute-breaks-on-bus-and-IOAMHRAM.patch
# patch -p1 < ../0009-Fix-savestates-of-MBC3-without-RTC.patch
I've then edited 'lsnes/options.build' like this:
# Lua package to use.
# - Usually either 'lua' or 'lua5.2'.
# - Default value is 'lua'.
LUA=lua5.2
# Regex package to use.
# Currently supported:
# - NATIVE: std::thread
# - BOOST: boost_thread
REGEX=BOOST
# Threading package to use.
# Currently supported:
# - NATIVE: std::thread
# - BOOST: boost_thread
THREADS=BOOST
# Graphics library to use.
# Currently supported:
# - WXWIDGETS: wxWidgets
GRAPHICS=WXWIDGETS
# Sound library to use.
# Currently supported:
# - DUMMY: No sound.
# - PORTAUDIO: Portaudio.
# - LIBAO: Libao.
SOUND=PORTAUDIO
# Joystick library to use.
# Currently supported:
# - DUMMY: No joystick.
# - EVDEV: EVDEV (Linux only)
# - WIN32MM: Windows Multimedia (Win32 only).
# - WXWIDGETS: wxWidgets (GRAPHICS=WXWIDGETS only)
# - MACOSX: Mac OS X (Mac OS X only).
JOYSTICK=EVDEV
# Set to non-empty value (e.g. 'yes') to enable use of Secret Rabbit Code (a.k.a. libsamperate).
# This is used for high-quality samplerate conversion for dumping.
SECRET_RABBIT_CODE=yes
# Set to non-empty value (e.g. 'yes') to build the gambatte core.
BUILD_GAMBATTE=yes
# Set to non-empty value (e.g. 'yes') to build the bsnes core.
BUILD_BSNES=yes
# Set to non-empty value (e.g. 'yes') if bsnes build uses compatiblity core, not accuracy core.
BSNES_IS_COMPAT=yes
# Set to non-empty value (e.g. 'yes') if boost libraries need the '-mt' prefix.
# Useful on Win32 and Mac OS X.
BOOST_NEEDS_MT=
# Set to non-empty value (e.g. 'yes') if host boost libraries need the '-mt' prefix.
# Useful when building on Mac OS X.
HOST_BOOST_NEEDS_MT=
# Set to non-empty value (e.g. 'yes') if the linker exports symbols without -rdynamic.
# Useful on Mac OS X.
NO_RDYNAMIC=
# Set to non-empty vlaue (e.g. 'yes') to disable use of DLFCN.
NO_DLFCN=
# Set to non-empty value (e.g. 'yes') to use boost::filesystem3 instead of boost::filesystem.
BOOST_FILESYSTEM3=
# Set to non-empty value (e.g. 'yes') to enable commentary track support (requires Opus codec).
OPUS_CODEC=yes
# Set to non-empty value (e.g. 'yes') to use Opus codec surround encoding support.
OPUS_CODEC_SUPPORTS_SURROUND=yes
# Set to non-empty value (e.g. 'yes') to use libgcrypt for SHA-256 instead of builtin routines.
USE_LIBGCRYPT=yes
# Postfix for boost for host builds.
HOST_BOOST_POSTFIX=
# Set to non-empty value (e.g. 'yes') to support LZMA/XZ compression via liblzma (the XZ version).
USE_LIBLZMA=yes
# Set to non-empty value (e.g. 'yes') if iconv(3) needs libiconv.
NEED_LIBICONV=
# The target architecture
# I386 - I386/AMD64
# Leave empty for generic/autodetect.
ARCHITECTURE=
Then I just ran make. After a while it will finish and I would have a binary.
This appears to be JUST DEBIAN and not my normal OSes like Fedora or Mac OS X. I'll experiment with Fedora and post Build instructions for that later. The Mac will have to wait. This is quite a beast to tame and is already taking a while.