Building Erlang on Snow Leopard

August 17th, 2009

The macports install of CouchDB requires Erlang (naturally) and Erlang requires WxWidgets and Tk, which are probably pointless for most uses, and won’t compile on 10.6.

Here is a patch for the Erlang Portfile that will let you build on pre-GM 10.6.

Save the patch to ~/Desktop/erlang.diff

Patching icu

You might also have to patch icu. To test, run:

sudo port install icu

If it errors, grab the unified diff patch file and save it to your ~/Desktop as “icu.diff” and run:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/icu

sudo patch < ~/Desktop/icu.diff

sudo port install icu

Patching Erlang

To run the Erlang patch and install the port, just do the following:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/erlang

patch < ~/Desktop/erlang.diff

sudo port install erlang

CouchDB?

I can get CouchDB to build, but not to run. I think I'll let someone else solve this one. Maybe you?

  • Raghavan
    Thanks for the update i've been having trouble getting erlang up and running in snowlepord, will try it out today
  • mtkd
    Thanks for this, and thanks for posting the commands themselves ...
  • Building Erlang on Snow Leopard > http://bit.ly/3kV8uC – been having the same Tk issue, meh.


    This comment was originally posted on Twitter

  • @fujin_ not sure how i feel about this route: http://bit.ly/44BHW6


    This comment was originally posted on Twitter

  • cult hero
    The trouble with couchdb was worth it just to find a patch that stopped all the stupid deps for erlang.

    Unfortunately, I have the same problem. Got everything to build but couch doesn't seem to be running. I wonder what gives. (I knew I should have resisted the UPDATE NOW NEW AND SHINY THINGS impulse.)
  • Sho
    Why the hell does erlang have WxWidgets and TK as dependencies anyway? There are no such dependencies when you build it from source!

    Damn macports, it's only slightly better than nothing. Thanks for the help anyway, saved me a lot of time.
  • Thanks for the advice. You're free to write a comprehensive article and publish it and I will happily link to it.

    My guess is that anyone looking to manually patch a functional programming language on a pre-release operating system seeded to developers already knows how to change directories.

    If they don't, there are many resources they should study before patching Erlang.
  • I installed MacPorts from SVN for Snow Leopard, I haven’t had any problems yet.Edit: I believe this is where I learned that installing from svn was necessary:


    http://forums.macrumors.com/showthread.php?t=720035


    This comment was originally posted on Hacker News

  • eli

    This is one of the reasons I do all my development in a Linux VMWare image. No wrestling with MacPorts and I get to develop in an environment that much more closely mimics production. (easy snapshot/rollbacks of the whole OS are just a bonus)


    This comment was originally posted on Hacker News

  • rjrr
    Why don't you just tell people what to do instead of giving them commands to paste without understanding? People should know how to change directories and use patch, and if not then they should learn.
  • Patching Erlang for Snow Leopard http://bit.ly/gYSWN


    This comment was originally posted on Twitter

  • I’ve tried to install MacPorts on Snow Leopard yesterday and it is not available.Snow Leopard adoption will be slow.


    Yes, it’s faster and yes, it’s stable, but Leopard is very faster and very stable too.


    I’ve already pre-ordered my SL copy, but i’m thinking that i’m not going to install it any soon.


    This comment was originally posted on Hacker News

  • HNews: Patching Erlang for Snow Leopard http://bit.ly/3yeVY1


    This comment was originally posted on Twitter

blog comments powered by Disqus