YCM-Generator
YCM-Generator copied to clipboard
ERROR: No commands were logged to the build logs
I have compiled clang-6.0.0 on my centos7 system, and this is the log of config_gen.py:
$ ~/.vim/bundle/YCM-Generator/config_gen.py --verbose .
Preparing build directory...
$ make clean
rm -f hello main.o
Running make...
$ make -i -j2
clang -o hello main.c
Build completed in 0.05 sec
Collected 0 relevant entries for C compilation (0 discarded).
Collected 0 relevant entries for C++ compilation (0 discarded).
ERROR: No commands were logged to the build logs (C: /tmp/tmpSHe_Am, C++: /tmp/tmp4YNpNk).
Your build system may not be compatible.
The project is just an simple "helloworld" example, and the Makefile is:
all:
$(CC) -o hello main.c
clean:
rm -f hello main.o
What else do i need to provide?
I also occur this problem, the log of config_gen.py:
Collected 0 relevant entries for C compilation (0 discarded).
Collected 0 relevant entries for C++ compilation (0 discarded).
ERROR: No commands were logged to the build logs (C: /tmp/tmpQU_y38, C++: /tmp/tmpS8d1X7).
Your build system may not be compatible.
I compile my project with makefile in the root of project, and execute config_gen.py successfully but any log is empty.
To collect log of make command, I fix it simply, so not compatible for others(C++, make): code before change:
FNULL = open(os.devnull, "w")
proc_opts = {} if verbose else {
"stdin": FNULL,
"stdout": FNULL,
"stderr": FNULL
}
code after change:
f_build_log_path = open(cxx_build_log_path, "w")
proc_opts = {} if verbose else {
"stdin" : FNULL,
"stdout": f_build_log_path,
"stderr": FNULL
}
after fix, don't use --verbose option, successfully, the log:
Preparing build directory...
$ make clean
Running make...
$ make -i -j4
Build completed in 14.73 sec
Collected 0 relevant entries for C compilation (0 discarded).
Collected 132 relevant entries for C++ compilation (0 discarded).
Created YCM config file with 33 C++ flags