rizsotto / scan-build

Clang's scan-build re-implementation in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSError: [Errno 2] No such file or directory

zh794390558 opened this issue · comments

analyze-cc: Problem occured during analyzis.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 96, in run
return arch_check(opts)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 61, in wrapper
return function(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 274, in arch_check
return continuation(opts)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 61, in wrapper
return function(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 246, in language_check
return continuation(opts)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 61, in wrapper
return function(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 216, in set_file_path_relative
return continuation(opts)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 61, in wrapper
return function(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 205, in filter_debug_flags
return continuation(opts)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 61, in wrapper
return function(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/runner.py", line 174, in run_analyzer
cwd)
File "/usr/local/lib/python2.7/dist-packages/libscanbuild/clang.py", line 43, in get_arguments
output = subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Thanks for the report. Can you confirm that you had Clang installed and in your path?

@rizsotto This my env:

root@ubuntu:/usr/bin/X11# locate clang-3.5
/usr/bin/clang-3.5
/usr/lib/llvm-3.5/lib/libclang-3.5.so.1
/usr/lib/x86_64-linux-gnu/libclang-3.5.so.1
/usr/share/doc/clang-3.5
/usr/share/doc/clang-3.5/NEWS.Debian.gz
/usr/share/doc/clang-3.5/TODO.Debian
/usr/share/doc/clang-3.5/changelog.Debian.gz
/usr/share/doc/clang-3.5/copyright
/usr/share/lintian/overrides/clang-3.5
/usr/share/man/man1/clang-3.5.1.gz
/var/cache/apt/archives/clang-3.5_1%3a3.5-4ubuntu2~trusty2_amd64.deb
/var/lib/dpkg/info/clang-3.5.list
/var/lib/dpkg/info/clang-3.5.md5sums
root@ubuntu:/usr/bin/X11#
root@ubuntu:/usr/bin/X11# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

thanks. can you confirm that you don't have an executable named clangin your PATH environment? (not sure that locate would have listed the soft link with that name if that's exists.) you can use --use-analyzer to specify clang-3.5 if that's the compiler name on your system.

please reopen this ticket if you still have the issue.