Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed for compiling with clang under OS X #44

Merged
merged 2 commits into from
Jan 10, 2016
Merged

Conversation

didzis
Copy link

@didzis didzis commented Nov 19, 2015

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
Copy link
Member

dmcc commented Nov 20, 2015

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

dmcc added a commit that referenced this pull request Jan 10, 2016
Changes needed for compiling with clang under OS X
@dmcc dmcc merged commit 558adf6 into BLLIP:master Jan 10, 2016
@Jianwei-Wu-1
Copy link

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
Copy link
Author

didzis commented Jun 29, 2018

Try

$ brew install libomp

@Jianwei-Wu-1
Copy link

Thanks a lot! it works! @didzis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants