Nate's Programming Blog

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 update
brew doctor
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
patching file src/drivers/sdl/SConscript
==> scons
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

PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/

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.

FCEUX running Super Mario Bros on Mac OS X Mountain Lion

FCEUX running Super Mario Bros on Mac OS X Mountain Lion


This entry was posted on Sunday, February 3rd, 2013 at 12:15 pm and is filed under Games. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
4 Comments so far

  1. Charlie Engel on October 14, 2014 12:44 pm

    Hi Nate.
    Im triying to compile FCEUX in Mountain Lion aswell, and have the same errors as you, with Brew and Scons aswell.

    You think it will work if you could send me a complied version on Fceux ? i would be eternally grateful. Im not a developer, so im kind of lost,

    Cheers,
    Charlie

  2. Nate on October 16, 2014 8:26 am

    I’m actually on Mavericks now, but I will see if I can find the source that I used to build the version I’m currently using and send to you.

    Out of curiosity, are you installing fceux via homebrew? I submitted my changes back to the fceux developers and I thought they integrated them into the latest version.

  3. Nate on January 4, 2015 10:24 pm

    If anyone is interested, I’ve also fixed this on Yosemite. See my bug and resolution post on FCEUX’s site.

    http://sourceforge.net/p/fceultra/bugs/675/

  4. Clay on February 2, 2016 6:37 pm

    I’m also looking for a compiled version that will run on El Capitan. I like to hack roms once in a while and would love it if I could just do so on my laptop without having to install windows on another partition.

Name (required)

Email (required)

Website

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Feel free to leave a comment

top