Re: [PATCH 1/1] Fix detection of pwritev support for OSX. - Mailing list pgsql-hackers
From | Sergey Shinderuk |
---|---|
Subject | Re: [PATCH 1/1] Fix detection of pwritev support for OSX. |
Date | |
Msg-id | 49989a13-49d2-935a-c651-74719ec565e6@postgrespro.ru Whole thread Raw |
In response to | Re: [PATCH 1/1] Fix detection of pwritev support for OSX. (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
Re: [PATCH 1/1] Fix detection of pwritev support for OSX. |
List | pgsql-hackers |
On 22.01.2021 20:12, Tom Lane wrote: > [ 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). > I did git clone from scratch. Xcode really has all the tools. configure:9519: checking for bison configure:9537: found /usr/bin/bison configure:9549: result: /usr/bin/bison configure:9571: using bison (GNU Bison) 2.3 configure:9609: checking for flex configure:9654: result: /usr/bin/flex configure:9674: using flex 2.5.35 Apple(flex-32) % xcrun --find bison /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bison % xcrun --find install_name_tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool > 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 > Fair. > BTW, reading [1] I see > > You can install Xcode, the CLT, or both; Homebrew supports all three > configurations. > > So I'm not sure why you got that prompt, unless you were using a formula > that knew you were going to need bison. > > [1] https://docs.brew.sh/Installation#3 Apparently, this documentation is wrong. I’m not installing any particular formula, just running the Homebrew installer script. % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Password: ==> This script will install: [...] ==> The following new directories will be created: [...] ==> The Xcode Command Line Tools will be installed. Press RETURN to continue or any other key to abort ==> Installing Command Line Tools for Xcode-12.3 ==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-12.3 Software Update Tool Downloading Command Line Tools for Xcode [...] I checked the script [1], and it really requires the CLT. Here is the explanation [2] for this: There is actually no such requirement. However, there are formulae that will be forced to build from source if you do not have the CLT. They can still be built from source with Xcode only, but because the pre-built bottles are compiled in an environment that has both Xcode and the CLT installed, there are some cases where the bottles end up having a hard dependency on the CLT. A major example is gcc. So installing the CLT may help you avoid some lengthy source builds. We ensure that all Homebrew formulae can be built with Xcode.app alone. Most formulae can be built with just the CLT, and those that require the full Xcode.app have an explicit depends_on :xcode => :build. Some users would prefer to use only the CLT because it's a much smaller download and takes less time to install and upgrade than Xcode. [1] https://github.com/Homebrew/install/blob/master/install.sh#L191 [2] https://github.com/Homebrew/brew/issues/1613 Regards. -- Sergey Shinderuk Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
pgsql-hackers by date: