Skip to content

Commit

Permalink
fix OSX 10.9 compiler/stdlib override for latest homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
shelhamer committed May 25, 2014
1 parent 211c3c2 commit 2dcbcd9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,19 @@ For each of these formulas, `brew edit FORMULA`, and add the ENV definitions as

```
def install
#ADD THE FOLLOWING:
ENV.append "CXXFLAGS", '-stdlib=libstdc++'
ENV.append "CFLAGS", '-stdlib=libstdc++'
ENV.append "LDFLAGS", '-stdlib=libstdc++ -lstdc++'
#The following is necessary because libtool liks to strip LDFLAGS:
ENV.cxx = "/usr/bin/clang -stdlib=libstdc++"
# ADD THE FOLLOWING:
ENV.append "CXXFLAGS", "-stdlib=libstdc++"
ENV.append "CFLAGS", "-stdlib=libstdc++"
ENV.append "LDFLAGS", "-stdlib=libstdc++ -lstdc++"
# The following is necessary because libtool likes to strip LDFLAGS:
ENV["CXX"] = "/usr/bin/clang -stdlib=libstdc++"
...
```

To edit the formulae in turn, run

for x in snappy leveldb protobuf gflags glog szip boost homebrew/science/opencv; do brew edit $x; done

After this, run

for x in snappy leveldb protobuf gflags glog szip boost homebrew/science/opencv; do brew uninstall $x; brew install --build-from-source --fresh -vd $x; done
Expand Down

0 comments on commit 2dcbcd9

Please sign in to comment.