From 8f0f9eb4d059480d712ea7982cf0f7b91ff06790 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 30 May 2026 13:14:07 -0400 Subject: [PATCH 1/2] [SCons] Allow CC/CXX/AR/FC env variables for compiler selection Co-Authored-By: Claude Opus 4.8 --- SConstruct | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index b51e22a409..b6f8e1e844 100644 --- a/SConstruct +++ b/SConstruct @@ -313,11 +313,11 @@ config_options = [ Option( "AR", "The archiver to use.", - "${AR}"), + os.environ.get("AR") or "${AR}"), Option( "CXX", "The C++ compiler to use.", - "${CXX}"), + os.environ.get("CXX") or "${CXX}"), Option( "cxx_flags", """Compiler flags passed to the C++ compiler only. Separate multiple @@ -330,7 +330,7 @@ config_options = [ Option( "CC", "The C compiler to use. This is only used to compile CVODE.", - "${CC}"), + os.environ.get("CC") or "${CC}"), Option( "cc_flags", """Compiler flags passed to both the C and C++ compilers, regardless of @@ -397,10 +397,11 @@ config_options = [ "default", ("y", "n", "default")), PathOption( "FORTRAN", - """The Fortran (90) compiler. If unspecified, the builder will look for a - compatible compiler (pgfortran, gfortran, ifort, ifx, g95) in the 'PATH' - environment variable. Used only for compiling the Fortran 90 interface.""", - "", PathVariable.PathAccept), + """The Fortran (90) compiler. If unspecified, the 'FC' environment variable is + used if set; otherwise the builder will look for a compatible compiler + (pgfortran, gfortran, ifort, ifx, g95) in the 'PATH' environment variable. + Used only for compiling the Fortran 90 interface.""", + os.environ.get("FC") or "", PathVariable.PathAccept), Option( "FORTRANFLAGS", "Compilation options for the Fortran (90) compiler.", From ab2ce49cba8dd370c01651b97ea236deac7df639 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 30 May 2026 13:18:55 -0400 Subject: [PATCH 2/2] Use correct compiler toolchain package in Linux Pixi environments These packages provide a complete toolchain and set the CC/CXX/AR environment variables (which SCons now looks for), allowing for a consistent compiler environment whether or not system compilers are present. Fixes #2118. Co-Authored-By: Claude Opus 4.8 --- pixi.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 60cc10dfc7..4cf47d0f62 100644 --- a/pixi.toml +++ b/pixi.toml @@ -31,8 +31,14 @@ pytest = ">=9.0.2,<10" "ruamel.yaml" = ">=0.19.1,<0.20" jinja2 = ">=3.1.6,<4" +# Provide a self-consistent compiler toolchain matching the conda-forge-built +# dependencies. The activation packages set CC/CXX/AR, which SConstruct honors. To build +# with the system compiler instead, set `CXX = "g++"` and `CC = "gcc"` in cantera.conf. [feature.core.target.linux-64.dependencies] -clangxx = ">=18.0" +gxx_linux-64 = ">=13" + +[feature.core.target.linux-aarch64.dependencies] +gxx_linux-aarch64 = ">=13" [feature.samples.dependencies] pandas = ">=3.0.0,<4"