rizsotto / scan-build

Clang's scan-build re-implementation in python
Other
362 stars 34 forks source link

Intercept-builds fails for multithreaded buil #109

Closed GordianDziwis closed 6 years ago

GordianDziwis commented 6 years ago

When building Godot.

intercept-build scons -j 4 platform=x11 use_llvm=yes fails randomly with

Traceback (most recent call last):
  File "/home/beavis/.local/bin/intercept-build", line 11, in <module>
    sys.exit(intercept_build())
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/__init__.py", line 126, in wrapper
    return function()
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/intercept.py", line 55, in intercept_build
    exit_code, current = capture(args)
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/intercept.py", line 84, in capture
    return exit_code, iter(set(current))
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/intercept.py", line 98, in compilations
    for call in exec_calls:
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/intercept.py", line 81, in <genexpr>
    calls = (parse_exec_trace(file) for file in exec_trace_files(tmp_dir))
  File "/home/beavis/.local/lib/python3.6/site-packages/libscanbuild/intercept.py", line 226, in parse_exec_trace
    entry = json.load(handler)
  File "/usr/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 36 (char 35)

but intercept-build scons -j 1 platform=x11 use_llvm=yes works.

GordianDziwis commented 6 years ago

https://github.com/rizsotto/Bear/issues/209

lucmann commented 2 years ago

rizsotto/Bear#209

Hi,

this issue is still right here (I tested on 2.0.20 release). BTW, this project has not been maintained any more? @rizsotto

rizsotto commented 2 years ago

@lucmann it's hard to answer, I got no reply to my questions... it would be a minimal thing to know: what tool and what version of it we are talking? I am happy to help, but things like: "it fails on my machine" is difficult to address from my end, because all I can reply: "it works on my machine". :smile:

The scan-build tool is still here. Not totally abandoned. (Will archive the repo, and will put a message about it into the README file.) The tool provides two things: run the static analyzer, and generates compilation database.

lucmann commented 2 years ago

@rizsotto I think I see the situation now. Bear is great. I will try it on my CentOS 7 machine. thanks a lot!