8000 CodeChecker analysis fails on LLVM+Clang build · Issue #3695 · Ericsson/codechecker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CodeChecker analysis fails on LLVM+Clang build #3695
Closed
@rchildre3

Description

@rchildre3

Describe the bug
CodeChecker analysis fails on LLVM+Clang build

CodeChecker version

[INFO 2022-06-24 11:00] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version                                 
---------------------------------------------------------------
Base package version | 6.19.1                                  
Package build date   | 2022-03-18T16:12                        
Git commit ID (hash) | 9fa0f9817f6e91eda2a9202e0a3bf5006accdc8c
Git tag information  | 6.19.1                                  
---------------------------------------------------------------

[INFO 2022-06-24 11:00] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version                                 
------------------------------------------------------------------------------
Base package version                | 6.19.1                                  
Package build date                  | 2022-03-18T16:12                        
Git commit ID (hash)                | 9fa0f9817f6e91eda2a9202e0a3bf5006accdc8c
Git tag information                 | 6.19.1                                  
Server supported Thrift API version | 6.47                                    
Client Thrift API version           | 6.47                                    
------------------------------------------------------------------------------

To Reproduce
Steps to reproduce the behaviour:

  1. Run a standard CMake configure on LLVM+Clang repo (commit 9081d3d) with:
    • LLVM_ENABLE_PROJECTS=clang;compiler-rt;clang-tools-extra;mlir
  2. CodeChecker analyze ~/llvm/build/compile_commands.json --output ~/llvm/.codechecker/reports --verbose debug

Expected behaviour
The analysis succeeds

Desktop (please complete the following information)

  • OS: Ubuntu/WSL2
  • Browser: N/A
  • Version: Ubuntu 20.04/Python 3.8.10

Additional context

> CodeChecker analyze ~/llvm/build/compile_commands.json --output ~/llvm/.codechecker/reports --verbose debug
[DEBUG][2022-06-24 10:35:01] {system} [12384] <140353818871616> - analyze.py:971 main() - args: Namespace(analyzer_config=['clang-tidy:HeaderFilterRegex=.*'], compile_uniqueing='none', config_file=None, func=<function main at 0x7fa6aa2d4940>, func_process_config_file=<function process_config_file at 0x7fa6aa2d44c0>, jobs=8, keep_gcc_include_fixed=False, keep_gcc_intrin=False, logfile='~/llvm/build/compile_commands.json', makefile=False, output_format='plist', output_path='~/llvm/.codechecker/reports', verbose='debug')
[DEBUG][2022-06-24 10:35:01] {system} [12384] <140353818871616> - analyze.py:972 main() - Output will be stored to: '~/llvm/.codechecker/reports'
[DEBUG][2022-06-24 10:35:01] {buildlogger} [12384] <140353818871616> - log_parser.py:418 get_compiler_includes() - Retrieving default includes via /usr/bin/clang++-12 -std=c++14 -E -x c++ - -v
[DEBUG][2022-06-24 10:35:02] {buildlogger} [12384] <140353818871616> - log_parser.py:418 get_compiler_includes() - Retrieving default includes via /usr/bin/clang-12 -E -x c - -v
[DEBUG][2022-06-24 10:35:02] {buildlogger} [12384] <140353818871616> - log_parser.py:418 get_compiler_includes() - Retrieving default includes via /usr/bin/clang-12 -E -x '' - -v
[ERROR][2022-06-24 10:35:02] {buildlogger} [12384] <140353818871616> - log_parser.py:1349 parse_unique_log() - The compile database is not valid.
[DEBUG][2022-06-24 10:35:02] {buildlogger} [12384] <140353818871616> - log_parser.py:1350 parse_unique_log() - Traceback (most recent call last):
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 1287, in parse_unique_log
    action = parse_options(entry,
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 1076, in parse_options
    ImplicitCompilerInfo.set(details, compiler_info_file)
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 573, in set
    'compiler_includes': ICI.get_compiler_includes(
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 422, in get_compiler_includes
    include_dirs = ICI.__parse_compiler_includes(cmd)
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 378, in __parse_compiler_includes
    lines = ImplicitCompilerInfo.__get_compiler_err(compile_cmd)
  File "~/.local/lib/python3.8/site-packages/codechecker_analyzer/buildlog/log_parser.py", line 342, in __get_compiler_err
    proc = subprocess.Popen(
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1639, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType

[DEBUG][2022-06-24 10:35:02] {buildlogger} [12384] <140353818871616> - log_parser.py:1351 parse_unique_log() - expected str, bytes or os.PathLike object, not NoneType
>>> Process 'CodeChecker analyze' exited with code 1

~/llvm/build/compile_commands.json is massive, but here's the compilers invoked

jq '.[].command' ./build/compile_commands.json | cut -d' ' -f1 - | sort -u
# "/usr/bin/clang++-12
# "/usr/bin/clang-12

Looks similar to #3670 when -x ''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0