Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deoplete-clang shuts deoplete down. #13

Closed
PabloCOVES opened this issue Mar 11, 2016 · 39 comments
Closed

deoplete-clang shuts deoplete down. #13

PabloCOVES opened this issue Mar 11, 2016 · 39 comments

Comments

@PabloCOVES
Copy link

Hi.

I try to make deoplate work with deoplete-clang:

https://github.com/Shougo/deoplete.nvim
https://github.com/zchee/deoplete-clang

Here is the config file I use:

`call plug#begin()
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-clang'
call plug#end()

let g:deoplete#enable_at_startup = 1
let g:deoplete#auto_complete_start_length = 1
let g:deoplete#sources#clang#libclang_path = '/usr/lib/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/include/lib/clang'
let g:deoplete#sources#clang#std#cpp = 'c++11'
let g:deoplete#sources#clang#sort_algo = 'priority'
let g:deoplete#sources#clang#clang_complete_database = '/home/user/code/build'`

If I delete all the let g:[...] lines deoplete starts working as I type but nothing happen if I keep the config lines.

Do you have any hint about the possible error?

Many thanks in advance.

@Shougo
Copy link
Collaborator

Shougo commented Mar 12, 2016

Hm. deoplete-clang freezes.

@zchee
Copy link
Member

zchee commented Mar 12, 2016

@PabloCOVES I understand your state.
but Because I have a question, I reply later.

@zchee
Copy link
Member

zchee commented Mar 14, 2016

@PabloCOVES Sorry for a late reply.

What exists files in let g:deoplete#sources#clang#clang_complete_database = '/home/user/code/build'?

If you use it for temporarily build directory also exists compile_commands.json, it seems to not a problem.
But if there is a build file of a different project or its a parent of the directory, is incorrect setting.

e.g. Incorrect directory structure.

/home/user/code/build
│
│ # not exists compile_commands.json in /home/user/code/build
│
├── clang
│   └── compile_commands.json
├── cern-root
│   └── compile_commands.json
└── llvm
    └── compile_commands.json

Correct,

/home/user/code/build
│
│ # some build result of llvm
│
├── compile_commands.json
│
    .
    .
    .

Or, build result very large, maybe deoplete-clang freezes.
Did you try to completion of any project?

@PabloCOVES
Copy link
Author

Hi.

I have only one .json file in my build directory.
Btw, it's not a temporary one, it's my build directory in any circumstance for all my code projects.

At the moment it's only two very little project and the YouCompleteMe plugin works great with it.

@zchee
Copy link
Member

zchee commented Mar 14, 2016

@PabloCOVES I understand.
YCM may work, but in the current state, deoplete-clang is not a YCM compatible.
I do not yet grasp how YCM parse code multi-project. (ycmd C++ side? use .ycm_extra_conf?)

However, I was planned support .ycm_extra_conf and automatically search build directory.
see also

It is very difficult to realize the YCM equivalent a speed of only pure Python. Therefore, the function has been reduced now.

but I have the goal of exceeding completion speed with while retaining the same as the function of the YCM. and more.
Please wait a while until the realization.

@PabloCOVES
Copy link
Author

Hi.

Sorry for the comparison with YCM. I just wanted to say it's the same file generated in the good place by the same CMake process.

Here it's not a matter of performances.
It just does no start... but I feel like I missed something.
Don't know if it changes anything but I'm running ArchLinux with the latest updates.

@tony
Copy link

tony commented Mar 20, 2016

I also have a similar problem

I'm banging my head across the wall. I don't know if my problem is with my local environment, with my python-client setup, deoplete, my neovim build. There are too many things happening to know WTF is going on when an autocomplete bug happens. Is it not finding my clang? Wrong clang version? Etc.

Also the minimal vim thing is a lot to ask for bug reports. A lot of us have spent a lot of time building up a vim config. This is not a pleasant thing to do repeatedly.

Neovim really needs a way to output a dump/diagnostic easily. Maybe even an official concept of semver and not breaking API's.

@zchee
Copy link
Member

zchee commented Mar 20, 2016

@PabloCOVES Sorry for a late reply :(
and, @tony, OK. I understand your worries.

I'm planned significantly rewrite the deoplete-clang.
But before that, I will do my best for you can work perfectly.

I will create a checklist for deoplete-clang.
Wait a moment, please.

@zchee
Copy link
Member

zchee commented Mar 20, 2016

@PabloCOVES also,

Sorry for the comparison with YCM. I just wanted to say it's the same file generated in the good place by the same CMake process.
Here it's not a matter of performances.
It just does no start... but I feel like I missed something.
Don't know if it changes anything but I'm running ArchLinux with the latest updates.

It seems deoplete-clang's bug. Maybe your settings are no problem.

For investigation of the cause, I want to see some of C files and compile_commands.json file that you wrote (or generated by CMake)
Could you upload them?

@SageEx
Copy link

SageEx commented Mar 20, 2016

I'm having the same problem.
@zchee Could you give a sample compile_commands.json ?

@zchee
Copy link
Member

zchee commented Mar 20, 2016

@SageEx OK.

I set

let g:deoplete#sources#clang#libclang_path = "/opt/llvm/lib/libclang.dylib"
let g:deoplete#sources#clang#clang_header = '/opt/llvm/lib/clang'
" clang default include flags
"   - echo | clang -v -E -x c -
let g:deoplete#sources#clang#flags = [
      \ "-cc1",
      \ "-triple", "x86_64-apple-macosx10.11.0",
      \ "-emit-obj",
      \ "-mrelax-all",
      \ "-disable-free",
      \ "-disable-llvm-verifier",
      \ "-mrelocation-model", "pic",
      \ "-pic-level", "2",
      \ "-mthread-model", "posix",
      \ "-mdisable-fp-elim",
      \ "-munwind-tables",
      \ "-target-cpu", "core2",
      \ "-target-linker-version", "264.3",
      \ "-dwarf-column-info",
      \ "-debugger-tuning=lldb",
      \ "-resource-dir", "/opt/llvm/lib/clang/3.9.0",
      \ "-isysroot", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk",
      \ "-ferror-limit", "19",
      \ "-fmessage-length", "213",
      \ "-stack-protector", "1",
      \ "-fblocks",
      \ "-fobjc-runtime=macosx-10.11.0",
      \ "-fencode-extended-block-signature",
      \ "-fmax-type-align=16",
      \ ]
let g:deoplete#sources#clang#sort_algo = 'priority'
let g:deoplete#sources#clang#clang_complete_database = '/Users/zchee/src/github.com/neovim/neovim/build'

In /opt/llvm/lib/clang,

/opt/llvm/lib/clang
> tree -L 3
/opt/llvm/lib/clang
└── 3.9.0
    ├── asan_blacklist.txt
    ├── include
    │   ├── Intrin.h
    │   ├── __clang_cuda_cmath.h
    │   ├── __clang_cuda_runtime_wrapper.h
    │   ├── __stddef_max_align_t.h
    │   ├── __wmmintrin_aes.h
    │   ├── __wmmintrin_pclmul.h
    │   ├── adxintrin.h
    │   ├── altivec.h
    │   ├── ammintrin.h
    │   ├── arm_acle.h
    │   ├── arm_neon.h
    │   ├── avx2intrin.h
    │   ├── avx512bwintrin.h
    │   ├── avx512cdintrin.h
    │   ├── avx512dqintrin.h
    │   ├── avx512erintrin.h
    │   ├── avx512fintrin.h
    │   ├── avx512ifmaintrin.h
    │   ├── avx512ifmavlintrin.h
    │   ├── avx512vbmiintrin.h
    │   ├── avx512vbmivlintrin.h
    │   ├── avx512vlbwintrin.h
    │   ├── avx512vldqintrin.h
    │   ├── avx512vlintrin.h
    │   ├── avxintrin.h
    │   ├── bmi2intrin.h
    │   ├── bmiintrin.h
    │   ├── cpuid.h
    │   ├── cuda_builtin_vars.h
    │   ├── emmintrin.h
    │   ├── f16cintrin.h
    │   ├── float.h
    │   ├── fma4intrin.h
    │   ├── fmaintrin.h
    │   ├── fxsrintrin.h
    │   ├── htmintrin.h
    │   ├── htmxlintrin.h
    │   ├── ia32intrin.h
    │   ├── immintrin.h
    │   ├── inttypes.h
    │   ├── iso646.h
    │   ├── limits.h
    │   ├── lzcntintrin.h
    │   ├── mm3dnow.h
    │   ├── mm_malloc.h
    │   ├── mmintrin.h
    │   ├── module.modulemap
    │   ├── nmmintrin.h
    │   ├── omp.h
    │   ├── pkuintrin.h
    │   ├── pmmintrin.h
    │   ├── popcntintrin.h
    │   ├── prfchwintrin.h
    │   ├── rdseedintrin.h
    │   ├── rtmintrin.h
    │   ├── s390intrin.h
    │   ├── sanitizer
    │   ├── shaintrin.h
    │   ├── smmintrin.h
    │   ├── stdalign.h
    │   ├── stdarg.h
    │   ├── stdatomic.h
    │   ├── stdbool.h
    │   ├── stddef.h
    │   ├── stdint.h
    │   ├── stdnoreturn.h
    │   ├── tbmintrin.h
    │   ├── tgmath.h
    │   ├── tmmintrin.h
    │   ├── unwind.h
    │   ├── vadefs.h
    │   ├── varargs.h
    │   ├── vecintrin.h
    │   ├── wmmintrin.h
    │   ├── x86intrin.h
    │   ├── xmmintrin.h
    │   ├── xopintrin.h
    │   ├── xsavecintrin.h
    │   ├── xsaveintrin.h
    │   ├── xsaveoptintrin.h
    │   ├── xsavesintrin.h
    │   └── xtestintrin.h
    ├── lib
    │   └── darwin
    └── vtables_blacklist.txt

5 directories, 83 files

In /Users/zchee/src/github.com/neovim/neovim/build,

~/src/github.com/neovim/neovim/build
> tree -L 1
.
├── CMakeCache.txt
├── CMakeFiles
├── bin
├── build.ninja
├── cmake_install.cmake
├── compile_commands.json
├── config
├── doxygen
├── include
├── install_manifest.txt
├── lib
├── rules.ninja
├── runtime
├── src
└── test

9 directories, 6 files

and, compile_commands.json is here.

https://gist.github.com/zchee/8f746eec4748532257e5

@zchee
Copy link
Member

zchee commented Mar 20, 2016

Also, local.mk,

# Copy this to 'local.mk' in the repository root.
# Individual entries must be uncommented to take effect.

# By default, the installation prefix is '/usr/local'.
# CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=/usr/local/nvim-latest

# These CFLAGS can be used in addition to those specified in CMakeLists.txt:
# CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op"

ifeq ($(DEBUG),true)
    CMAKE_BUILD_TYPE  := Debug
    DEPS_CMAKE_FLAGS  += -DCMAKE_BUILD_TYPE=Debug
    CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=$(HOME)/tmp/nvim-debug
    CMAKE_EXTRA_FLAGS += "-DCMAKE_C_FLAGS_DEBUG=-O0 -march=native"
    DEPS_CMAKE_FLAGS  += "-DCMAKE_C_FLAGS_DEBUG=-O0 -march=native"
else
    CMAKE_BUILD_TYPE  := Release
    DEPS_CMAKE_FLAGS  += -DCMAKE_BUILD_TYPE=Release
    CMAKE_EXTRA_FLAGS += "-DCMAKE_C_FLAGS_RELEASE=-Ofast -flto -march=native"
    DEPS_CMAKE_FLAGS  += "-DCMAKE_C_FLAGS_RELEASE=-Ofast -flto -march=native"
endif

CMAKE_EXTRA_FLAGS += "-DCMAKE_SHARED_LINKER_FLAGS=-framework CoreFoundation"
DEPS_CMAKE_FLAGS  += "-DCMAKE_SHARED_LINKER_FLAGS=-framework CoreFoundation"

# By default, the jemalloc family of memory allocation functions are used.
# Uncomment the following to instead use libc memory allocation functions.
# CMAKE_EXTRA_FLAGS += -DENABLE_JEMALLOC=OFF

# Sets the build type; defaults to Debug. Valid values:
#
# - Debug:          Disables optimizations (-O0), enables debug information and logging.
#
# - Dev:            Enables all optimizations that do not interfere with
#                   debugging (-Og if available, -O2 and -g if not).
#                   Enables debug information and logging.
#
# - RelWithDebInfo: Enables optimizations (-O2) and debug information.
#                   Disables logging.
#
# - MinSizeRel:     Enables all -O2 optimization that do not typically
#                   increase code size, and performs further optimizations
#                   designed to reduce code size (-Os).
#                   Disables debug information and logging.
#
# - Release:        Same as RelWithDebInfo, but disables debug information.

# CMAKE_BUILD_TYPE := Debug

# By default, nvim uses bundled versions of its required third-party
# dependencies.
# Uncomment these entries to instead use system-wide installations of
# them.
#
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_DEPS=OFF
DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_BUSTED=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_JEMALLOC=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBTERMKEY=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAJIT=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAROCKS=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF

# By default, bundled libraries are statically linked to nvim.
# This has no effect for non-bundled deps, which are always dynamically linked.
# Uncomment these entries to instead use dynamic linking.
#
# CMAKE_EXTRA_FLAGS += -DLIBTERMKEY_USE_STATIC=OFF
# CMAKE_EXTRA_FLAGS += -DLIBUNIBILIUM_USE_STATIC=OFF
# CMAKE_EXTRA_FLAGS += -DLIBUV_USE_STATIC=OFF
# CMAKE_EXTRA_FLAGS += -DLIBVTERM_USE_STATIC=OFF
# CMAKE_EXTRA_FLAGS += -DLUAJIT_USE_STATIC=OFF
# CMAKE_EXTRA_FLAGS += -DMSGPACK_USE_STATIC=OFF


# Build architectures for OSX
CMAKE_EXTRA_FLAGS += CMAKE_OSX_ARCHITECTURES=x86_64
# Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.
CMAKE_EXTRA_FLAGS += CMAKE_OSX_DEPLOYMENT_TARGET=10.11
# The product will be built against the headers and libraries located inside the indicated SDK.
CMAKE_EXTRA_FLAGS += CMAKE_OSX_SYSROOT=$(shell xcrun --show-sdk-path)
# Make compile_commands.json
CMAKE_EXTRA_FLAGS += CMAKE_EXPORT_COMPILE_COMMANDS=ON

# Disable Dev warning
CMAKE_EXTRA_FLAGS += -Wno-dev

# ASAN
# CMAKE_EXTRA_FLAGS += -DCLANG_ASAN_UBSAN=ON
# CMAKE_EXTRA_FLAGS += -DCLANG_MSAN=ON
# CMAKE_EXTRA_FLAGS += -DCLANG_TSAN=ON


all:

rebuild: fetch
    rm -rf build
    make

force-rebuild: fetch
    make distclean
    make

fetch:
    git fetch origin
    git rebase origin/master --autostash

@PabloCOVES
Copy link
Author

Hi!

Here is the .json: http://ix.io/umM
Here is my tree in /usr/lib/clang: http://ix.io/umN
Here is my tree in the code dir: http://ix.io/umO

PS: thanks for your work!

@zchee
Copy link
Member

zchee commented Mar 21, 2016

@PabloCOVES Thanks! I'll check it.

@zchee
Copy link
Member

zchee commented Mar 21, 2016

@PabloCOVES Oh! Sorry for I explanation was not big enough.

Meaning of that I said is, I wanted real files written in C(XX).
I edit them actually, and I thought to try to debug whether clang-completion feature to work.

@PabloCOVES
Copy link
Author

Hi again.

Here is a small archive containing a minimal example: https://transfert.inria.fr/fichiers/088df29eba1fd4c6a7322af4400803c2/deopleteTest.tar

There is a simple main and a very simple class in it with the relative cmakes.

Thanks again!

@zchee
Copy link
Member

zchee commented Mar 21, 2016

@PabloCOVES Thanks. downloaded.
Will test it.

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@PabloCOVES I tested.
I will post more details, but I was this commands.

cd ~/src/github.com/PabloCOVES/deopleteTest
mkdir build
cd ~/src/github.com/PabloCOVES/deopleteTest/build
cmake -G Ninja .../
ninja
> tree -L 1
.
├── CMakeCache.txt
├── CMakeFiles
├── bin
├── build.ninja
├── cmake_install.cmake
├── compile_commands.json
├── rules.ninja
└── testing
cd ~/src/github.com/PabloCOVES/deopleteTest
nvim $XDG_CONFIG_HOME/nvim/init.vim
let g:deoplete#sources#clang#clang_complete_database = '/Users/zchee/src/github.com/PabloCOVES/deopleteTest/build'
nvim testing/test/test/class.cpp

| is cursor.

#include "class.hpp"

namespace test
{
  Class::Class(std::string const &string):
    |
    string_(string)

screenshot 2016-03-23 02 19 16

screenshot 2016-03-23 02 19 22

It will work... :(

I will enable debug log and post result.
Just a moments.

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@PabloCOVES FYI, I have occurred error after move deopleteTest directory to another path.
Caused by different build path in compile_commands.json.

So,

cd /Users/zchee/src/github.com/PabloCOVES/deopleteTest
rm -rf build
mkdir build
cd build
cmake -G Ninja
ninja
cd ../
nvim testing/test/test/class.cpp

Will work.

I continue to debug.
But, If you don't mind, Would you the same behavior with me, and post a ~/.nvimlog and $NVIM_PYTHON_LOG_FILE?

export NVIM_PYTHON_LOG_FILE="./python-client.log"
export NVIM_PYTHON_LOG_LEVEL="DEBUG"
nvim testing/test/test/class.cpp

Edit:
Oh, I found you use boost library.
Maybe caused by deoplete-nvim does not parsed Boost library.

I tried git reset --hard because you upload code has a git commit.
cmake -G Ninja did not work. but displayed

-- Boost version: 1.60.0
-- Found the following Boost libraries:

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@SageEx Did it work?

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@PabloCOVES @tony @SageEx
and, I'm twitter ID is
https://twitter.com/_zchee_
Please feel free to bug comment in mention or direct message.

@SageEx
Copy link

SageEx commented Mar 22, 2016

@zchee I do not understand how compile_commands.json is generated.
I created an empty compile_commands.json in /home/arindam/.build directory.
Here is my config for deoplete-clang

    Plug 'zchee/deoplete-clang', { 'for': 'cpp' }
        let g:deoplete#sources#clang#libclang_path = '/usr/lib/libclang.so'
        let g:deoplete#sources#clang#std#cpp = 'c++14'
        let g:deoplete#sources#clang#clang_header = '/usr/lib/clang'
        let g:deoplete#sources#clang#clang_complete_database = '/home/arindam/.build'
        let g:deoplete#sources#clang#flags = [
              \ "-cc1",
              \ "-emit-obj",
              \ "-mrelax-all",
              \ "-disable-free",
              \ "-disable-llvm-verifier",
              \ "-mrelocation-model", "pic",
              \ "-pic-level", "2",
              \ "-mthread-model", "posix",
              \ "-mdisable-fp-elim",
              \ "-munwind-tables",
              \ "-target-cpu", "core2",
              \ "-target-linker-version", "264.3",
              \ "-dwarf-column-info",
              \ "-debugger-tuning=lldb",
              \ "-resource-dir", "/usr/lib/clang/3.7.1",
              \ "-ferror-limit", "19",
              \ "-fmessage-length", "213",
              \ "-stack-protector", "1",
              \ "-fblocks",
              \ "-fencode-extended-block-signature",
              \ "-fmax-type-align=16",
              \ ]

Deoplete does not respond in c++ files, and there is no completion.

I just want standard completion in standalone c++ files (method names and arguments). I am not working in some project. Will deoplete-clang work in this case ?

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@SageEx

I do not understand how compile_commands.json is generated.

Just in case you didn’t know, g:deoplete#sources#clang#clang_complete_database is option.
If not set this value, deoplete-clang will work.

If you want to use a compile_commands.json support, need set this value.

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@SageEx
Copy link

SageEx commented Mar 22, 2016

@zchee Thanks, I removed the database option and I get the completions. Thanks a lot.

Does deoplete-clangdisable other deoplete sources ? I do not see the completions from my buffers or ultisnips.

@zchee
Copy link
Member

zchee commented Mar 22, 2016

@SageEx No. deoplete-clang did not touch the other sources.

but, I interested it.
Could you create new issue threads?

@PabloCOVES
Copy link
Author

Hi!

Sorry for the late reply, didn't have enough time lately.

Anyway, here are the two log files:
http://ix.io/v3i
http://ix.io/v3j

I tried to run neovim from outside my build directory but still nothing.

@zchee
Copy link
Member

zchee commented Mar 30, 2016

@PabloCOVES
Hi :) thanks reply
I'll check log later

@zchee
Copy link
Member

zchee commented Mar 30, 2016

@PabloCOVES Hmm, I found this error.

2016-03-29 08:55:38,811 [DEBUG @ msgpack_stream.py:send:36] 2499
    sent [0, 246, 'vim_call_function', ('deoplete#util#print_error', ["FileNotFoundError: [Errno 2] No such file or directory: '/usr/include/lib/clang'"])]
2016-03-29 08:55:38,811 [DEBUG @ base.py:send:113] 2499
    - Sending 'b"\x94\x00\xcc\xf6\xb1vim_call_function\x92\xb9deoplete#util#print_error\x91\xd9PFileNotFoundError: [Errno 2] No such file or directory: '/usr/include/lib/clang'"'

Could you tell me this command result ?

ls -la /usr/include/lib/clang

@zchee
Copy link
Member

zchee commented Mar 30, 2016

@PabloCOVES
Copy link
Author

Hi.

Here is the ls result:

/usr/include/clang _0< ls -la [9:28:00 - 16-03-31]
total 124
drwxr-xr-x 22 root root 4096 7 sept. 2015 .
drwxr-xr-x 356 root root 36864 29 mars 11:25 ..
drwxr-xr-x 6 root root 4096 19 janv. 08:20 Analysis
drwxr-xr-x 2 root root 4096 19 janv. 08:20 ARCMigrate
drwxr-xr-x 2 root root 4096 19 janv. 08:20 AST
drwxr-xr-x 3 root root 4096 19 janv. 08:20 ASTMatchers
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Basic
drwxr-xr-x 2 root root 4096 19 janv. 08:20 CodeGen
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Config
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Driver
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Edit
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Format
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Frontend
drwxr-xr-x 2 root root 4096 19 janv. 08:20 FrontendTool
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Index
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Lex
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Parse
drwxr-xr-x 4 root root 4096 7 sept. 2015 Rewrite
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Sema
drwxr-xr-x 2 root root 4096 19 janv. 08:20 Serialization
drwxr-xr-x 5 root root 4096 7 sept. 2015 StaticAnalyzer
drwxr-xr-x 3 root root 4096 19 janv. 08:20 Tooling

There is no such a file hierarchy as in you last comment.

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES OK, I will try to found clang header directory use Docker container.
What are you use OS? and How did you install clang?

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES FYI, It seems to clang-c directory (In OSX)

@PabloCOVES
Copy link
Author

@zchee I'r running Neovim on an up-to-date Archlinux on both Arm and AMD64 CPUs.

ls -la /usr/includeclang-c
total 232K
-rw-r--r-- 1 root root 5,4K 9 juil. 2015 BuildSystem.h
-rw-r--r-- 1 root root 5,1K 13 août 2014 CXCompilationDatabase.h
-rw-r--r-- 1 root root 2,0K 13 août 2014 CXErrorCode.h
-rw-r--r-- 1 root root 1,9K 13 août 2014 CXString.h
-rw-r--r-- 1 root root 16K 13 août 2014 Documentation.h
-rw-r--r-- 1 root root 188K 2 juil. 2015 Index.h
-rw-r--r-- 1 root root 1,6K 13 août 2014 Platform.h

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES OK :)
Wait a little...

and, sorry, I missed.
not clang-c directory

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES Oh! I understand!

[root@71e2d391e2f9 lib]# pacman -Syy clang
.
.
.
[root@71e2d391e2f9 lib]# ls -la /usr/lib/clang/3.7.1/include
total 3876
drwxr-xr-x 3 root root    4096 Jan 15 16:26 .
drwxr-xr-x 4 root root    4096 Jan 15 16:26 ..
-rw-r--r-- 1 root root   38720 Jul 13  2015 Intrin.h
-rw-r--r-- 1 root root    1770 Feb 24  2015 __stddef_max_align_t.h
-rw-r--r-- 1 root root    2419 Aug  4  2015 __wmmintrin_aes.h
-rw-r--r-- 1 root root    1606 Aug  4  2015 __wmmintrin_pclmul.h
-rw-r--r-- 1 root root    3173 Aug  4  2015 adxintrin.h
-rw-r--r-- 1 root root  497001 Jul 17  2015 altivec.h
-rw-r--r-- 1 root root    8692 Aug  4  2015 ammintrin.h
-rw-r--r-- 1 root root    8730 Jun 15  2015 arm_acle.h
-rw-r--r-- 1 root root 2246718 Jan 15 15:56 arm_neon.h
-rw-r--r-- 1 root root   39757 Aug  4  2015 avx2intrin.h
-rw-r--r-- 1 root root   42803 Aug  4  2015 avx512bwintrin.h
-rw-r--r-- 1 root root    4709 Jun 30  2015 avx512cdintrin.h
-rw-r--r-- 1 root root    8185 Aug  4  2015 avx512dqintrin.h
-rw-r--r-- 1 root root   13039 Jun 17  2015 avx512erintrin.h
-rw-r--r-- 1 root root   93443 Aug  4  2015 avx512fintrin.h
-rw-r--r-- 1 root root   67186 Aug  4  2015 avx512vlbwintrin.h
-rw-r--r-- 1 root root   11883 Aug  4  2015 avx512vldqintrin.h
-rw-r--r-- 1 root root   76967 Aug  4  2015 avx512vlintrin.h
-rw-r--r-- 1 root root   38268 Aug  4  2015 avxintrin.h
-rw-r--r-- 1 root root    3240 Aug  4  2015 bmi2intrin.h
-rw-r--r-- 1 root root    4645 Aug  4  2015 bmiintrin.h
-rw-r--r-- 1 root root    7494 Oct  1  2014 cpuid.h
-rw-r--r-- 1 root root    4668 Apr 21  2015 cuda_builtin_vars.h
-rw-r--r-- 1 root root   37857 Aug  4  2015 emmintrin.h
-rw-r--r-- 1 root root    2360 Aug  4  2015 f16cintrin.h
-rw-r--r-- 1 root root    3881 Oct 22  2014 float.h
-rw-r--r-- 1 root root    6863 Aug  4  2015 fma4intrin.h
-rw-r--r-- 1 root root    6864 Aug  4  2015 fmaintrin.h
-rw-r--r-- 1 root root    1929 Jun 30  2015 fxsrintrin.h
-rw-r--r-- 1 root root    7130 Apr  1  2015 htmintrin.h
-rw-r--r-- 1 root root    9955 Apr  1  2015 htmxlintrin.h
-rw-r--r-- 1 root root    3265 Jun 30  2014 ia32intrin.h
-rw-r--r-- 1 root root    4640 Aug  4  2015 immintrin.h
-rw-r--r-- 1 root root    2825 Jun 26  2015 inttypes.h
-rw-r--r-- 1 root root    1565 May 21  2008 iso646.h
-rw-r--r-- 1 root root    3734 Feb 19  2014 limits.h
-rw-r--r-- 1 root root    2389 Aug  4  2015 lzcntintrin.h
-rw-r--r-- 1 root root    5185 Aug  4  2015 mm3dnow.h
-rw-r--r-- 1 root root    2611 Jan 16  2013 mm_malloc.h
-rw-r--r-- 1 root root   13705 Aug  4  2015 mmintrin.h
-rw-r--r-- 1 root root    3367 Aug  4  2015 module.modulemap
-rw-r--r-- 1 root root    1542 Aug  4  2015 nmmintrin.h
-rw-r--r-- 1 root root    3607 Aug  4  2015 pmmintrin.h
-rw-r--r-- 1 root root    1845 Aug  4  2015 popcntintrin.h
-rw-r--r-- 1 root root    1690 May  9  2013 prfchwintrin.h
-rw-r--r-- 1 root root    2050 Aug  4  2015 rdseedintrin.h
-rw-r--r-- 1 root root    2118 Aug  4  2015 rtmintrin.h
-rw-r--r-- 1 root root    1475 Jul 30  2015 s390intrin.h
drwxr-xr-x 2 root root    4096 Jan 15 16:26 sanitizer
-rw-r--r-- 1 root root    2794 Aug  4  2015 shaintrin.h
-rw-r--r-- 1 root root   17468 Aug  4  2015 smmintrin.h
-rw-r--r-- 1 root root    1454 Feb 21  2013 stdalign.h
-rw-r--r-- 1 root root    2094 Jul  2  2014 stdarg.h
-rw-r--r-- 1 root root    8162 Jan 29  2015 stdatomic.h
-rw-r--r-- 1 root root    1730 Sep 29  2010 stdbool.h
-rw-r--r-- 1 root root    4498 Oct  3  2014 stddef.h
-rw-r--r-- 1 root root   23617 Jul 28  2014 stdint.h
-rw-r--r-- 1 root root    1381 Jan 17  2013 stdnoreturn.h
-rw-r--r-- 1 root root    3836 Aug  4  2015 tbmintrin.h
-rw-r--r-- 1 root root   30928 May  9  2013 tgmath.h
-rw-r--r-- 1 root root    6520 Aug  4  2015 tmmintrin.h
-rw-r--r-- 1 root root    9582 Feb  4  2015 unwind.h
-rw-r--r-- 1 root root    2291 Nov 20  2014 vadefs.h
-rw-r--r-- 1 root root    1334 Mar 20  2010 varargs.h
-rw-r--r-- 1 root root  291982 Jul 30  2015 vecintrin.h
-rw-r--r-- 1 root root    1612 Aug  4  2015 wmmintrin.h
-rw-r--r-- 1 root root    1964 Aug  4  2015 x86intrin.h
-rw-r--r-- 1 root root   24209 Aug  4  2015 xmmintrin.h
-rw-r--r-- 1 root root   21474 Aug  4  2015 xopintrin.h
-rw-r--r-- 1 root root    1743 Jun 17  2015 xtestintrin.h

So, Need

let g:deoplete#sources#clang#clang_header = '/usr/lib/clang'

clang default header in /usr/lib/clang, not /usr/include/clang/.

Could you test it? :)

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES and, libclang-python3 will be auto-parse /usr and /usr/local.
So, If you not set all let ..., will work.
but, clang default header does not exists /usr/include/clang/..., so
let g:deoplete#sources#clang#clang_header = '/usr/include/lib/clang'
will not work.

This is the reason.

@PabloCOVES
Copy link
Author

Hi!

Everything now works perfectly fine!!!
I'm looking forward to make it work on my Arm computer as well.

Thanks a lot!!!

@zchee
Copy link
Member

zchee commented Mar 31, 2016

@PabloCOVES

PS: I would love to see an automatic .json detection so that I can work on multiple projects without changing the clang_complete_database by hand.

OK :) I'm planned.
Maybe, use ujson or written in Go.
Anyway, Look forward to it :)

Close!

@zchee zchee closed this as completed Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants