Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2jRj-0002EW-GL for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 23:33:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2jRg-0007dd-QC for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 23:32:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2jRg-0007dW-FZ for pgsql-hackers@lists.postgresql.org; Thu, 21 Jan 2021 23:32:56 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2jRZ-0001E4-Bj for pgsql-hackers@lists.postgresql.org; Thu, 21 Jan 2021 23:32:55 +0000 Received: from Sergeys-MacBook-Pro.local (unknown [62.217.185.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 39CD121C3678; Fri, 22 Jan 2021 02:32:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1611271967; bh=aRWLe7TsLjoUTrmefnKm/YAp/ZZVtYvzWVQY86AzEgk=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=pAT7m8zD71v5CBZXUwGjip+gREZ/SNky31YtsDPh8ZQdsIkdyoCvQzsCwVj5slcOt pIxHPw9F54OIjcOS+ymMQEksGC/VkDJe5AfKnckLbUMoZM9KeEi6/NNH6vhqKJSCZ3 JBpq9K+PG5ToEZc77jKiSWH3owD7RTdpcqo9znt0= Subject: Re: [PATCH 1/1] Fix detection of pwritev support for OSX. To: James Hilliard , Tom Lane Cc: pgsql-hackers@lists.postgresql.org, Thomas Munro References: <20210119111625.20435-1-james.hilliard1@gmail.com> <479372.1611070041@sss.pgh.pa.us> <480660.1611071845@sss.pgh.pa.us> <483800.1611076636@sss.pgh.pa.us> <522433.1611089678@sss.pgh.pa.us> <559755.1611106628@sss.pgh.pa.us> <791992.1611184078@sss.pgh.pa.us> <915981.1611254324@sss.pgh.pa.us> From: Sergey Shinderuk Message-ID: <6d43a157-e51a-6449-0b47-94d133829afc@postgrespro.ru> Date: Fri, 22 Jan 2021 02:32:46 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 22.01.2021 01:17, James Hilliard wrote: > On Thu, Jan 21, 2021 at 11:38 AM Tom Lane wrote: >> >> James Hilliard writes: >>> On Wed, Jan 20, 2021 at 4:07 PM Tom Lane 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