get a compiler version?

Sergey A. Osokin osa at
Sun Oct 3 16:20:05 UTC 2021

Hi Josh,

thanks for the reply.

On Sat, Oct 02, 2021 at 12:55:04PM +1000, Joshua Root wrote:
> On 2021-10-2 01:39 , Sergey A. Osokin wrote:
> > Hi,
> > 
> > could you guide me how to get a compiler's version.
> > 
> > I know it's possible to use and configure.compiler
> > variables (their default values are /usr/bin/clang and clang),
> > but is there a variable with the clang version?
> There's no variable because getting that information requires running 
> the compiler. That's also not something you want to be doing every time 
> your Portfile is parsed, if you can help it.
> So let's take a step back and ask: what are you trying to do? If your 
> port needs a compiler with support for a particular language standard 
> for example, there are options you can set to request that.

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

Sergey Osokin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 789 bytes
Desc: not available
URL: <>

More information about the macports-dev mailing list