Re: [PATCH 1/1] Fix detection of pwritev support for OSX.

From: Sergey Shinderuk <s(dot)shinderuk(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: James Hilliard <james(dot)hilliard1(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
Date: 2021-01-23 05:02:01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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/ 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

% xcrun --find 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/
> 15G /Applications/


> 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]

Apparently, this documentation is wrong. I’m not installing any
particular formula, just running the Homebrew installer script.

% /bin/bash -c "$(curl -fsSL"
==> 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\
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
alone. Most formulae can be built with just the CLT, and those
that require the full 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.



Sergey Shinderuk
Postgres Professional:
The Russian Postgres Company

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Shinderuk 2021-01-23 05:12:16 Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
Previous Message Dilip Kumar 2021-01-23 04:47:13 Re: Is Recovery actually paused?