Skip to content

compile_command.json is empty #660

@SilverGreen93

Description

@SilverGreen93

Describe the bug
After upgrading bear from 3.1.6 to 4.0.2, I get an empty compile_commands.json after running my build system with Bear:

bear -- build_all
[...]
❯ cat compile_commands.json
[]%

Running with 3.1.6 generates the compile_commands.json just fine.

Expected behavior
Version 4.0.2 should work the same as 3.1.6

Environment:

  • OS name: Ubuntu
  • OS version: 24.04
  • OS architecture: x86_64
  • Bear version: 4.0.2
  • Bear install method: compiled from source following the instructions in INSTALL.md

Additional context

  • My project is using gcc 11.4.0
  • My build with Bear 3.1.6 takes about 2h to complete, but with Bear 4.0.2 seems it takes only 50min (the same time as if it was run without Bear), which might indicate that Bear does not do anything as it should.
[...]
[2026-01-19T10:45:20Z DEBUG bear::semantic::interpreters::combinators] coreutils_to_ignore : None
[2026-01-19T10:45:20Z DEBUG bear::intercept::supervise] Child process exited: ExitStatus(unix_wait_status(0))
[2026-01-19T10:45:20Z INFO  bear::output] Output pipeline:
      semantic events: 0
      current entries: 0
      previous entries: 0
      filtered entries by duplicate: 0
      filtered entries by source: 0
      total entries written: 0
[2026-01-19T10:45:20Z DEBUG bear] Exit code: ExitCode(unix_exit_status(0))

Let me know if I can share any more useful logs or what lines to look for in the debug log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions