CalculiX is using libstdc++ (this installation is configured to use libc++)

Ryan Schmidt ryandesign at macports.org
Thu Jul 28 03:36:27 UTC 2022


On Jul 27, 2022, at 07:41, Mark Brethen wrote:
> 
> As the source does not use configure, I pass the compiler args:
> 
> pre-build {
>    build.args-append    CXX=${configure.cxx} \
>                         CC=${configure.cc}
> }
> 
> For reasons I don’t understand, If I don’t put it in a pre-build override it’s ignored.

Certainly not ignored, but conceivably not doing what you wanted.

If you just write:

   build.args-append    CXX=${configure.cxx} \
                        CC=${configure.cc}

outside of any phase, that takes effect the moment the Portfile is parsed. This will use whatever compiler value MacPorts chooses, modulated by any compiler.blacklist or similar setting you have set on lines before that line.

However, you mentioned the compilers portgroup, which allows you to set a compiler by choosing a variant. Variant blocks are parsed after the main part of the Portfile, so if you want any compiler modifications that might have been made by a variant block to be honored by these build.args, you have to do as you did and wait to set the build.args until right before you use them, e.g. in a pre-build block.



More information about the macports-dev mailing list