On my previous computer I had Xcode working nicely; on my present computer, with Homebrew installed, gcc and make are present in /Developer/usr/bin but not /usr/bin. On the whole when I try to download and build http://JonathansCorner.com/download/tms1_4.tar.gz, I can find bits and pieces of the tools used to do things, but when invoked from its present path it doesn't recognize #include <stdio.h> type includes.
How can I reinstall Xcode, Homebrew, and anything else to get a fresh and working build so I can run make && make install?
Best Answer
Reinstalling XCode and updating Homebrew should be enough. To do this:
uninstall-devtools
script from this answer to remove older XCode versions. (If it doesn't work or you can't find it, don't worry about it.)brew update && brew upgrade
.brew rm
them andbrew install --fresh
to reinstall.~/.bashrc
) to make sure/usr/local/bin
is on your path.brew doctor
can help diagnose this and other issues.Note that
tms
is designed to install to/usr/lib
by default, which you won't have permissions to do in a normal OS X setup even once you have all the tools installed, because the OS reserves/usr
for its own use. You'll probably want to fiddle with theMakefile
andtms.h
to get it in to/usr/local
or/opt
, which are easier places to drop user-built packages.If you're feeling ambitious, you could even do
brew create http://jonathanscorner.com/download/tms1_4.tar.gz
to make a Homebrew formula for TMS, making repeated installs easier.