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

Changes needed for compiling with clang under OS X #44

Closed didzis closed 8 years ago

didzis commented 8 years ago

As clang doesn't have OpenMP implementation, installation of libiomp is needed; can be done using homebrew:

$ brew install libiomp

FOPENMP environment variable should be set, for example, from command line:

$ FOPENMP="-liomp5" make

GNU stdio_filebuf API is replaced with portable version from here: http://www.josuttis.com/cppcode/fdstream.hpp Other small changes made, so that clang will compile. Tested under Yosemite with clang version: Apple LLVM version 7.0.0 (clang-700.0.72) No GCC installation needed.

dmcc commented 8 years ago

Thanks @didzis, this is very helpful! (should fix #19) I want to do a little more testing before merging, though will be on vacation for a bit, so it might take me a little while. Don't worry about the coveralls check pending since that's not fully set up. .travis.yml will need to be updated at some point to test on clang in addition to gcc.

In the meantime, would you be able to fill out the Contributor License Agreement (see https://github.com/BLLIP/bllip-parser/blob/master/CONTRIBUTING.rst#submitting-changes)? I'm afraid I'm not currently allowed to merge contributions without this. Also, feel free to add yourself as a contributor in CONTRIBUTORS.rst

Jianwei-Wu-1 commented 6 years ago

When I use "brew install libiomp". Tons of errors: Error: No available formula with the name "libiomp" ==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run: git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found. ==> Searching for similarly named formulae... ==> Searching local taps... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps.

osx 10.13.5

didzis commented 6 years ago

Try

$ brew install libomp
Jianwei-Wu-1 commented 6 years ago

Thanks a lot! it works! @didzis