How can I force homebrew to recompile?

Homebrew

Homebrew Problem Overview


I'm trying to install wxWidgets on Mac OS X 10.9. It's already installed, but I'm having the problem described here. Someone suggested to add ENV.append_to_cflags "-stdlib=libc++". I did, but I'm not able to recompile the code.

$ brew install wxmac
Warning: wxmac-3.0.0 already installed
$ brew edit wxmac
=> ok, modifications done, now I want to recompile and reinstall
$ brew uninstall wxmac
Uninstalling /usr/local/Cellar/wxmac/3.0.0...
$ brew install wxmac
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/wxmac-    3.0.0.mavericks.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/wxmac-3.0.0.mavericks.bottle.2.tar.gz
==> Pouring wxmac-3.0.0.mavericks.bottle.2.tar.gz
🍺  /usr/local/Cellar/wxmac/3.0.0: 775 files, 41M

How can I force homebrew to recompile?

Homebrew Solutions


Solution 1 - Homebrew

Homebrew is installing wxmac in bottle form (a pre-compiled binary of wxmac). To build from source, add the --build-from-source flag when calling brew install:

$ brew install --build-from-source wxmac

Solution 2 - Homebrew

To rebuild all installed FORMULAE from source:

$ brew list | xargs brew reinstall --build-from-source

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFriasView Question on Stackoverflow
Solution 1 - HomebrewmipadiView Answer on Stackoverflow
Solution 2 - HomebrewKároly KassView Answer on Stackoverflow