I have to say homebrew is hard to debug if something is wrong when building a package although it’s a de-facto package manager on Mac for the developer.

If ‘brew install something’ failed, you can use the following command to see more info:

1
brew install -v your_package

If you can’t find useful info, you can find the logs from:

1
2
3
4
5
6
7
8
9
10
...
Logs:
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/00.options.out
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/CMakeFiles
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/01.cmake.cc
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/01.cmake
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/02.make.cc
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/CMakeCache.txt
/Users/YOURNAME/Library/Logs/Homebrew/PACKAGENAME@PACKAGEVERSION/02.make
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):

You can edit the following file to add more debug option, for example ‘make V=1’:

1
/usr/local/Homebrew/Library/Taps/<TAPNAME>/homebrew-<REPONAME>/<PACKAGENAME>@<PACKAGEVERSION>.rb

Finally, if some program can’t find, it might be the reason superenv bring. You can consider using std env in the formula like:

1
2
3
class PACKAGENAME < Formula
env :std
...

Above is what I learned this morning.