I have been fighting to get FCEUX installed on my iMac ever since I got it. It came with Mountain Lion and I was able to install FCEUX on Lion without issue, but Mountain Lion was a completely different story. I initially tried installing XQuartz (make sure to do this first if you have not already) and then FCEUX using homebrew as I had done before.
brew install fceux
But got the following error:
==> Downloading http://downloads.sourceforge.net/fceultra/fceux-2.1.5.src.tar.bz2
Already downloaded: /Library/Caches/Homebrew/fceux-2.1.5.tar.bz2
patching file src/drivers/sdl/SConscript
env.ParseConfig(‘pkg-config –cflags –libs gtk+-2.0′)
File “/usr/local/Cellar/scons/2.2.0/libexec/scons-local/SCons/Environment.py”, line 1554:
return function(self, self.backtick(command))
File “/usr/local/Cellar/scons/2.2.0/libexec/scons-local/SCons/Environment.py”, line 596:
raise OSError(“‘%s’ exited %d” % (command, status))
After doing some research, I discovered that it was having issues finding the required X11 packages and was failing. I tried specifying
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ brew install fceux
But that also did not resolve the problem. I found someone else having the same issue as me on github and commented that I was having the same issue, but didn’t get back anything that worked, so I decided to go straight to source and see if I could compile and install it from the FCEUX site.
I downloaded the latest version 2.2.0 src tarball and read the “README-SDL.md”. The readme stated that it should be compiled and installed using scons, so I ran the scons command within the directory and got the same error again. So I decided to break into the SConscript file and see if I could figure out how to fix the error. I found the line that was running pkg-config on gtk+-2.0 from the error and added
to the front of the pkg-config command to see if that would work and to my surprise I got passed the error. The next error I received was that liblua could not be found. That was easy to fix by running
brew install lua
After that I ran scons again and to an even greater surprise it compiled without error. After that I was able to run scons install to install the binary and then ran fceux and it ran without error.