pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
To: James Hilliard <james.hilliard1@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Subject: Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
Date: Fri, 22 Jan 2021 02:32:46 +0300
Message-ID: <6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru> (raw)
In-Reply-To: <CADvTj4pzBHOa4PyzLKxZrnOiuwYTa2CDYU=4nUB3Dh8BoReQPg@mail.gmail.com>
References: <20210119111625.20435-1-james.hilliard1@gmail.com>
	<479372.1611070041@sss.pgh.pa.us>
	<CADvTj4riiHN9Zhhk5qOVndevQMOxuduFbFVVJnCiQ4R7k5_eng@mail.gmail.com>
	<480660.1611071845@sss.pgh.pa.us>
	<CADvTj4o6LEGRJSRR4H8Rmn8r_vv4ZE_mS0MS5Z60NwDZRwdZHQ@mail.gmail.com>
	<483800.1611076636@sss.pgh.pa.us>
	<CADvTj4oD6NoTe78vLi+Ss1CFuPH26vrhUrVTd5DHAPX63vP9Ww@mail.gmail.com>
	<522433.1611089678@sss.pgh.pa.us>
	<CADvTj4qNyMM5vHo+uZ6Xfq5n5g++X_bUTX1-g3zmNXYDWAo8sQ@mail.gmail.com>
	<CADvTj4pucOvo6aWinatLgARs3mjPFSiAXZr2ErSG4ASJsKNxBw@mail.gmail.com>
	<559755.1611106628@sss.pgh.pa.us>
	<CADvTj4qcwzrti9qK8E_xnoPHHn13hWqOGQC-1r3a=Y=mmGvCfQ@mail.gmail.com>
	<791992.1611184078@sss.pgh.pa.us>
	<CADvTj4qJmUdvVw3ECGK_FXXjkTneo5gVJGSvtpDxGrrseQdXDw@mail.gmail.com>
	<915981.1611254324@sss.pgh.pa.us>
	<CADvTj4pzBHOa4PyzLKxZrnOiuwYTa2CDYU=4nUB3Dh8BoReQPg@mail.gmail.com>

On 22.01.2021 01:17, James Hilliard wrote:
> On Thu, Jan 21, 2021 at 11:38 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> James Hilliard <james.hilliard1@gmail.com> writes:
>>> On Wed, Jan 20, 2021 at 4:07 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> I'm not sure that the case of not having the "command line tools"
>>>> installed is interesting for our purposes.  AFAIK you have to have
>>>> that in order to have access to required tools like bison and gmake.
>>>> (That reminds me, I was intending to add something to our docs
>>>> about how-to-build-from-source to say that you need to install those.)
>>
>>> Yeah, not 100% sure but I was able to build just fine after deleting my
>>> command line tools.
>>
>> Hm.  I've never been totally clear on what's included in the "command line
>> tools", although it's now apparent that one thing that gets installed is
>> an SDK matching the host OS version.  However, Apple's description at [1]
>> says
>>
>>      Command Line Tools
>>
>>      Download the macOS SDK, headers, and build tools such as the Apple
>>      LLVM compiler and Make. These tools make it easy to install open
>>      source software or develop on UNIX within Terminal. macOS can
>>      automatically download these tools the first time you try to build
>>      software, and they are available on the downloads page.
>>
>> which certainly strongly implies that gmake is not there otherwise.
>> At this point I lack any "bare" macOS system to check it on.  I wonder
>> whether you have a copy of make available from MacPorts or Homebrew.
>> Or maybe uninstalling the command line tools doesn't really remove
>> everything?
> Yeah, not entirely sure there but I do use homebrew.


FWIW, I tested with a clean install of Catalina. Before I install 
anything at all, I already have xcode-select, xcrun and all the shims in 
/usr/bin for developer tools, including cc, make, git, xcodebuild... 
Just about everything listed in the FILES section of "man xcode-select".

When I run any tool (except xcode-select), a GUI dialog pops up offering 
to install the Command Line Tools. So apparently those shims are not 
functional yet. I rejected the installation.

Instead I downloaded Xcode12.1.xip via [1], the latest version with 
macosx10.15 SDK. I unpacked it and installed by dragging Xcode.app to 
/Applications. It seems to me there is no magic behind the scenes, just 
moving the directory. I selectively checked that the shims in /usr/bin 
didn't change after that.

Now, running "cc" tells me that I have to accept the Xcode license 
agreement. After accepting it, all the shims in /usr/bin start to work, 
forwarding to the real tools inside Xcode.app.

If I run the Homebrew installer, it says that it's going to install the 
Command Line Tools. I don't know why it needs them, all the tools are 
there already. I thought that CLT is a lighter-weight option when you 
don't want the full Xcode installation, but Homebrew requires them anyway.

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.


[1] https://xcodereleases.com

-- 
Sergey Shinderuk
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





view thread (30+ messages)  latest in thread

Message-ID: <6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru>
Permalink:  ../6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru/
Also on:    postgresql.org/message-id/6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: s.shinderuk@postgrespro.ru, james.hilliard1@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com
  Subject: Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
  In-Reply-To: <6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox