Skip to content

Confusing error “Could not execute scan-build ""” #9744

@jtojnar

Description

@jtojnar

Describe the bug

When I pass an executable on PATH to SCANBUILD environment variable it fails:

Could not execute scan-build ""

To reproduce

Run SCANBUILD=scan-build ninja -C _build/ scan-build in a random Meson project.

Expected behaviour

It should either fail with a clear error like File scan-build not found in the current working directory or use PATH to look up the executable.

Other observations

I also noticed that the code silently strips any args even when absolute path is passed:

if exelist:
tool = exelist[0]
if os.path.isfile(tool) and os.access(tool, os.X_OK):
return [tool]
return []

System parameters

  • Native build
  • Operating system: NixOS
  • Python version: 3.9.6
  • Meson: 0.57.1
  • Ninja: 1.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions