get a compiler version?

Ryan Schmidt ryandesign at
Tue Oct 5 22:55:19 UTC 2021

On Oct 3, 2021, at 16:02, Sergey A. Osokin wrote:

> On Mon, Oct 04, 2021 at 04:27:19AM +1100, Joshua Root wrote:
>> On 2021-10-4 03:20 , Sergey A. Osokin wrote:
>>> I've found that www/unit builds, primarily unit-perl* and unit-ruby
>>> modules, fail when it runs with clang13.  And that's because of the
>>> -Wcompound-token-split-by-macro warning, enable by default for clang13.
>>> Here's the similar issue and bug report,
>>> From the other side, all 12 builds are successful with clang12.
>>> Please note, that's not an issue with NGINX Unit itself, that's the
>>> issues when clang13 builds unit-perl* and unit-ruby* modules, and
>>> there's no issue with unit-python* modules.
>>> So, the forehead solution is probably disable -Werror warning for
>>> perl and ruby modules with a reinplace, but I see no reason to do
>>> that for all 12 ports, that's why I'm looking for details how to
>>> enable -Wno-compound-token-split-by-macro for a specific compiler
>>> version.
>> Removing use of -Werror (for all ports) is the preferable solution here. 
>> That's a good flag for the upstream developers to use so they have to 
>> fix warnings, but all it does for our users is cause unnecessary build 
>> failures.
> Wel, that's definitely good idea for perl and ruby developers to do
> that, but in case of NGINX Unit I'd prefer to use more granular
> solution, i.e. enable -Wno-compound-token-split-by-macro for clang13.

Presumably if you add -Wno-compound-token-split-by-macro to configure.cflags that will cause problems for older compilers that don't understand that option. If so, then the MacPorts-approved solution is: remove -Werror, as Josh said. We do not want it in ports.

More information about the macports-dev mailing list