actions / actions/runner

a different CXX compiler might be randomly chosen on `macos-*`

Open
#4,034 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
On the same unmodified workflow a different CXX compiler is chosen.

This appears to happen extremely rarely. It is the first time I have ever encountered this.

To Reproduce
Steps to reproduce the behavior:

  1. Add a step with a CMake build

Expected behavior
The same compiler is chosen all of the time.

Runner Version and Platform

2.328.0 - macos-15

What's not working?

A different CXX compiler is chosen.

Job Log Output

https://github.com/danmar/simplecpp/actions/runs/17610432219/job/50030955686

-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped

https://github.com/danmar/simplecpp/actions/runs/17609753077/job/50028719042

-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped

Using the latter causes the following unexpected compiler warning:

error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two linked job logs and compare compiler resolution during the CMake step on macos-15, using the reported runner version 2.328.0 as context. Determine why the same workflow selects /usr/bin/clang++ in one run and the Xcode toolchain clang++ in another; done means the compiler selection is consistent and the reported cross-compilation warning is no longer triggered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, github-actions, macos
Domain
build-system, ci-cd, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.