Sergey Shinderuk <s.shinderuk@postgrespro.ru> writes:
> I rejected to install CLT and abandoned Homebrew. Then I just cloned and
> built Postgres successfully. So it looks like Xcode is really enough, at
> least on a recent macOS version.
Hm. I seem to recall having had to install CLT as well as Xcode back
in the day, but maybe Apple improved that. On the other side of the
coin, it also seems to be possible to build PG with only CLT and not
Xcode. I didn't try to verify that with a scorched-earth test, but
I did trash Xcode (and empty trash) on my wife's Mac, and I could
still build and "make check" with only the CLT in place.
[ pokes more carefully... ] Ah-hah, I see why I needed the CLT.
I bet you'll find that you can't build from "git clean -dfx" state
with only Xcode, because comparing the contents of
/Applications/Xcode.app/Contents/Developer/usr/bin and
/Library/Developer/CommandLineTools/usr/bin on my own Mac,
I observe that only the CLT provides bison and flex. I also see
install_name_tool only in the CLT; we don't depend on that today,
but may soon (see the latest thread about coping with SIP).
On the whole it looks like we should recommend installing the CLT
and not bothering with Xcode, which is about 10X the size:
$ du -hs /Library/Developer/CommandLineTools
1.1G /Library/Developer/CommandLineTools
$ du -hs /Applications/Xcode.app
15G /Applications/Xcode.app
regards, tom lane