[PATCH] Configure: add support for Homebrew on Apple Silicon

Sergey Kandaurov pluknet at nginx.com
Wed Mar 27 17:58:18 UTC 2024


> On 11 Mar 2024, at 19:14, Sergey Kandaurov <pluknet at nginx.com> wrote:
> 
> 
>> On 8 Mar 2024, at 19:31, Piotr Sikora via nginx-devel <nginx-devel at nginx.org> wrote:
>> 
>> Hi Sergey,
>> 
>>> An obvious question is why do you need this change.  Homebrew seems
>>> to be quite niche to pay attention.
>> 
>> Homebrew [1] is orders of magnitude more popular than MacPorts [2],
>> which is already supported by the configure script.
> 
> Thanks for clarifying this.
> 
>> 
>>> Using appropriate paths in
>>> --with-cc-opt / --with-ld-opt should work (not tested).
>> 
>> Everything under auto/lib can be replaced with --with-{cc,ld}-opt,
>> so I don't really understand this reasoning.
> 
> Given the high popularity, it may be indeed not an option.
> 
>> 
>>> A quick grep for MacPorts search paths suggests that some libraries
>>> are missing in the change.  If this is on purpose, please reflect
>>> this in the description.
>> 
>> libxml2, libxslt, and libexslt are all installed as part of Xcode,
>> which is required to use Homebrew and compile anything on macOS.
> 
> This raises a question whether we need to test it for MacPorts as well,
> which also requires SDK.  Obviously, it is out of scope of this patch.
> 
>> 
>> I'll ship update patch in a moment.
>> 
>>> Apple Silicon is something from the marketing language,
>>> using Apple ARM instead should be fine.
>>> 
>>> Notably, Homebrew uses Hardware::CPU.arm Ruby language boolean
>>> to make the distinction.
>> 
>> There is no such thing as "Apple ARM".
>> 
>> The official documentation uses the term "Apple silicon" [3],
>> Homebrew refers to the supported platform as "Apple Silicon" [4],
>> and Wikipedia has an article about "Apple silicon" [5].
> 
> Thank you for clarification.
> 
>> 
>>> Further, given the smooth decay on Intel-based hardware,
>>> I'd reduce this just to "Homebrew".
>> 
>> But that would be misleading, seeing that the new code path doesn't do
>> anything for Homebrew on Intel.
>> 
>> And then, there is Homebrew on Linux [6].
> 
> Given all the above argumentation, it makes sense
> to push the patch just as is.

Pushed, thanks.

-- 
Sergey Kandaurov


More information about the nginx-devel mailing list