EasyClangComplete: error while compiling: Error parsing translation unit.

I get this error when displaying the console (ubuntu x64 + clang version 4 from default repos ). Tried to use latest libclang upstream with the same results. I even tried with the default clang (also version 4.0) that ycmd downloads when compiling its server +played endlessly with path parameters to no avail…

Any suggestions?

ClangComplete.plugin.tools: Getting version from command: `clang -v`
INFO:EasyClangComplete.plugin.tools: Found clang version: 4.0.0
INFO:EasyClangComplete.plugin.view_config: init completer based on libclang
INFO:EasyClangComplete.plugin.clang.utils: found libclang library file: '/usr/lib/x86_64-linux-gnu/libclang-4.0.so'
ERROR:concurrent.futures:exception calling callback for <Future at 0x7ffa04b3ded0 state=finished raised IndexError>
Traceback (most recent call last):
  File "./python3.3/concurrent/futures/_base.py", line 296, in _invoke_callbacks
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/EasyClangComplete.py", line 260, in config_updated
    log.debug(" updated config: %s", future.result())
  File "./python3.3/concurrent/futures/_base.py", line 394, in result
  File "./python3.3/concurrent/futures/_base.py", line 353, in __get_result
  File "./python3.3/concurrent/futures/thread.py", line 54, in run
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/view_config.py", line 349, in load_for_view
    config = ViewConfig(view, settings)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/view_config.py", line 58, in __init__
    completer, flags = ViewConfig.__generate_essentials(view, settings)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/view_config.py", line 174, in __generate_essentials
    flags += ViewConfig.__load_source_flags(view, settings, prefixes)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/view_config.py", line 219, in __load_source_flags
    flags = flag_source.get_flags(view.file_name(), search_scope)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/flags_sources/compilation_db.py", line 88, in get_flags
    db = self._parse_database(File(current_db_path))
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/flags_sources/compilation_db.py", line 128, in _parse_database
    self._include_prefixes)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/flags_sources/flags_source.py", line 63, in parse_flags
    local_flags = Flag.tokenize_list(chunks)
  File "/home/gep/.config/sublime-text-3/Packages/EasyClangComplete/plugin/utils/flag.py", line 81, in tokenize_list
    flags.append(Flag(all_split_line[i], all_split_line[i + 1]))
IndexError: list index out of range
<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27 (15 by maintainers)

Commits related to this issue

Most upvoted comments

thanks;) it is working again!

Ok, @directorscut82 so as described in the pull request, I have implemented proper parsing of compilation database with “arguments” entry as generated by Bear. It should work now, but please reopen if it doesn’t.