Skip to content

ci: set CC and CXX to force compiler used in setuptools / distutils#1995

Merged
romanc merged 10 commits intoGridTools:mainfrom
romanc:romanc/test-cartesian-ci
Apr 23, 2025
Merged

ci: set CC and CXX to force compiler used in setuptools / distutils#1995
romanc merged 10 commits intoGridTools:mainfrom
romanc:romanc/test-cartesian-ci

Conversation

@romanc
Copy link
Copy Markdown
Contributor

@romanc romanc commented Apr 22, 2025

Description

gt4py.cartesian uses setuptools / distutils to compiler sources. For some unknown reason, the default compiler changed in the GHA runners over the last weekend. Daily CI started to fail as a consequence. This PR forces the GNU compiler suite by setting CC and CXX environment variable to gcc and g++ respectively.

While setuptools version 75 is happy with just CXX, the oldest supported setuptools version (70) also requires setting CC in order not to mix the (apparent new default) clang compiler with g++ as C and C++ compilers respectively. From reading

setting compilers is a bit fragile and subject to active discussions/development.

Tested by also running the "Daily CI" job temporarily on this PR.

Requirements

  • All fixes and/or new features come with corresponding tests. N/A
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder. N/A

let's see if it also occurrs in case we use the frozen uv.lock file
@romanc romanc changed the title do not merge[cartesian]: debugging cartesian daily CI failure do not merge[cartesian]: debugging cartesian CI failure Apr 22, 2025
@romanc romanc changed the title do not merge[cartesian]: debugging cartesian CI failure WIP[cartesian]: debugging cartesian CI failure Apr 23, 2025
@romanc romanc changed the title WIP[cartesian]: debugging cartesian CI failure ci: set CC and CXX to force compiler used in setuptools / distutils Apr 23, 2025
@romanc romanc marked this pull request as ready for review April 23, 2025 08:13
@romanc romanc requested a review from havogt April 23, 2025 08:13
@romanc
Copy link
Copy Markdown
Contributor Author

romanc commented Apr 23, 2025

/cc @FlorianDeconinck FYI what I was blabbering on yesterday in standup

Copy link
Copy Markdown
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating!

@romanc
Copy link
Copy Markdown
Contributor Author

romanc commented Apr 23, 2025

Thanks for investigating!

Always happy to help :)

@romanc romanc merged commit f6a795b into GridTools:main Apr 23, 2025
31 checks passed
@romanc romanc deleted the romanc/test-cartesian-ci branch April 23, 2025 11:32
@romanc romanc mentioned this pull request Apr 23, 2025
2 tasks
stubbiali pushed a commit to stubbiali/gt4py that referenced this pull request Aug 19, 2025
…utils` (GridTools#1995)

## Description

`gt4py.cartesian` uses `setuptools` / `distutils` to compiler sources.
For some unknown reason, the default compiler changed in the GHA runners
over the last weekend. Daily CI started to fail as a consequence. This
PR forces the GNU compiler suite by setting `CC` and `CXX` environment
variable to `gcc` and `g++` respectively.

While `setuptools` version 75 is happy with just `CXX`, the oldest
supported `setuptools` version (70) also requires setting `CC` in order
not to mix the (apparent new default) `clang` compiler with `g++` as `C`
and `C++` compilers respectively. From reading

- pypa/setuptools#1732
- pypa/distutils#228 (scroll all the way down to
get to comments as recent as 2024)

setting compilers is a bit fragile and subject to active
discussions/development.

Tested by also running the "Daily CI" job temporarily on this PR.

## Requirements

- [ ] All fixes and/or new features come with corresponding tests. N/A
- [ ] Important design decisions have been documented in the appropriate
ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md)
folder. N/A

---------

Co-authored-by: Roman Cattaneo <1116746+romanc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants