bazelbuild / bazelbuild/bazel

Issue in Toolchain

Open
#20,687 1 comment 0 reactions 0 assignees View on GitHub
more data needed team-Rules-CPP type: support / not a bug (process) untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 18h
Merged PRs (30d)
75

Description

### Page link:

_No response_

### Problem description (include actual vs expected text, if applicable):

I am encountering an issue with toolchain where it fails to correctly pick the specified compiler path within the provided tool path. Instead, it picks the default '/usr/bin/gcc' for it's compilation.

Error:
gcc failed: error executing CppCompile command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
gcc: error: unrecognized command line option '-std=c++14'.

### Where do you see this issue? (include link to specific section of the page, if applicable)

_No response_

### Any other information you'd like to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the toolchain configuration that invokes the CppCompile command, then run with --sandbox_debug to inspect the sandbox build root and compiler selection. Trace why the specified tool path resolves to /usr/bin/gcc; done means the configured compiler path is used and the compilation no longer fails on -std=c++14.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.