Skip to content

Instantly share code, notes, and snippets.

@codeimpossible
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeimpossible/bc19d0dd46f9e931c888 to your computer and use it in GitHub Desktop.
Save codeimpossible/bc19d0dd46f9e931c888 to your computer and use it in GitHub Desktop.
compiling ragel with js support on mac osx

Prerequisites

  • Node.js (0.10.9 or higher with npm)
  • Make sure you have gcc/g++ 4.6 (4.7 is too strict to build ragel-js)
  • Make sure you have autoconf and automake (brew install automake)
  • Make sure you have the official ragel (brew install ragel)

Clone the gcc patched version of ragel-js

$ git clone https://github.com/codeimpossible/ragel-js

Then, we need to build and install kelbt, which hasn't been supported for a while

$ wget http://www.complang.org/kelbt/kelbt-0.15.tar.gz
$ tar -xf kelbt-0.15.tar.gz
$ cd kelbt-0.15 && cp ../ragel-js/ragel-svn/aapl/* ./aapl
$ make && make install

now kelbt should be patched for gcc 4.2+ and should be installed!

now it's time to make our patched version of ragel and install it

$ cd ragel-js/ragel-svn && ./autogen.sh && ./configure --disable-manual && make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment