Posts for Gladian00b


Gladian00b
He/Him
Experienced Forum User
Joined: 7/10/2015
Posts: 5
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.
Gladian00b
He/Him
Experienced Forum User
Joined: 7/10/2015
Posts: 5
I have tried compiling on my Linux box, which has GCC 6.2.1. There is more progress, but it throws a bunch of things like
/usr/include/boost/type_traits/detail/template_arity_spec.hpp:13:84: note: #pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated
When I have compiled LSNES successfully before I used a 5.x.x version of the GCC (this was Fedora 23, I now have 24) and the boost-iostreams was 1.58. I made a copy of the symlink 'wx-config-3.0' and renamed it to 'wx-config', putting an '.old' suffix on the original. If I do get this compiled successfully, I'm tempted to 'AppImage' the Linux version and call it good. Then again, I am trying to compile the Mac version of this. I will see what instructions I can get from the IRC.
Gladian00b
He/Him
Experienced Forum User
Joined: 7/10/2015
Posts: 5
As a matter of fact, yes. I copied the output into a text file and also made a link. https://drive.google.com/open?id=0B-c5_ok5SimkbGVaVWpPVGtTQ0U The directory tree is also saved in a text file. (They are abridged - I collapsed the bsnes and gambatte dirs). Any search for the file itself will result in a positive. It is very likely that on compile time, it is not looking in the right place. I still believe 'buildaux/makedeps.cpp' is to blame, but I am just a user that knows how to compile. I will need to try this out on my Linux box to see if the same problem also exists.
Post subject: LSNES Compiling Questions! (Mac and Linux)
Gladian00b
He/Him
Experienced Forum User
Joined: 7/10/2015
Posts: 5
I tried compiling LSNES on my Mac but ran into a few snags. I have built LSNES successfully on Linux (I don't remember much other than making a symlink for a recent version of wxWidgets so it builds successfully) and am now trying to make a build on Mac OS X (using El Capitan), but it won't compile after I applied all the patches. After compiling the GCC 6.2.0 C++ compiler for Mac OS X (I assumed the default CLANG didn't do it's job) I tried compiling again, but it stalls at the 'buildaux/makedeps' part, giving me a TON of things like this:
WARNING: Include file 'library/zlibstream.hpp' not found.
What things do I need to do just so I can compile this thing on the Mac? Bizhawk has incomplete support for TASing on the Mac, and I do want to TAS a few SNES games. Do I need to make individual changes to each cpp and hpp file? Or is it as simple as changing a few things in the 'buildaux/makedeps.cpp' file? PS: GCC takes a LONG TIME to compile, so I don't expect a hasty answer per se.
Gladian00b
He/Him
Experienced Forum User
Joined: 7/10/2015
Posts: 5
I thought this run was great, even though the video desynced. The encoders definitely pull their hair out for good reason.