BLLIP / bllip-parser

BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser) See http://pypi.python.org/pypi/bllipparser/ for Python module.
http://bllip.cs.brown.edu/
227 stars 53 forks source link

Compilation in OSX #60

Open danyaljj opened 7 years ago

danyaljj commented 7 years ago

I had to go through these steps to be able to compile in my Mac, which has gcc 4.2 by default. Thought it would be worth sharing.

First install gcc49, but this is not gonna change the default behavior:

brew install gcc49 

In command-line, create aliases for gcc 4.9:

export CC=/usr/local/bin/gcc-4.9
export CXX=/usr/local/bin/g++-4.9
export CPP=/usr/local/bin/cpp-4.9
export LD=/usr/local/bin/gcc-4.9
alias c++=/usr/local/bin/c++-4.9
alias g++=/usr/local/bin/g++-4.9
alias gcc=/usr/local/bin/gcc-4.9
alias cpp=/usr/local/bin/cpp-4.9
alias ld=/usr/local/bin/gcc-4.9
alias cc=/usr/local/bin/gcc-4.9
dmcc commented 7 years ago

Thanks! I've linked to this issue from the README (though perhaps you'd be interested in incorporating it into the official docs as README-OSX.rst -- if so, please send a PR).