[cfe-dev] Clang tooling with compilation databases problem "Compile command not found"

Frederico Araujo araujof at gmail.com
Tue Oct 7 09:19:30 PDT 2014


Dear list,

I used Clang tooling to build a source code rewriter for a project I'm
working on. I notice that some compile commands are not found in my
compilation database (while others are). I couldn't figure out any
particular differences between them. For example, the below test case does
not work:

./mytool /home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c

It returns the message "Skipping
/home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c. Compile
command not found."

Inside my compile_commands.json, I have the entry:

{
  "directory": "/home/frederico/dev/tests/llvm/httpd/modules/http",
  "command": "clang -fsanitize=dataflow -mllvm
-dfsan-combine-pointer-labels-on-store
-I/usr/local/llvm/cmakebuild/lib/clang/3.5.0/include/ -DLINUX -D_REENTRANT
-D_GNU_SOURCE -I. -I/home/frederico/dev/tests/llvm/httpd/os/unix
-I/home/frederico/dev/tests/llvm/httpd/include
-I/home/frederico/dev/tests/llvm/httpd/srclib/apr/include
-I/home/frederico/dev/tests/llvm/httpd/srclib/apr-util/include
-I/home/frederico/dev/tests/llvm/httpd/srclib/apr-util/xml/expat/lib
-I/usr/local/pcre/include
-I/home/frederico/dev/tests/llvm/httpd/modules/aaa
-I/home/frederico/dev/tests/llvm/httpd/modules/cache
-I/home/frederico/dev/tests/llvm/httpd/modules/core
-I/home/frederico/dev/tests/llvm/httpd/modules/database
-I/home/frederico/dev/tests/llvm/httpd/modules/filters
-I/home/frederico/dev/tests/llvm/httpd/modules/ldap
-I/home/frederico/dev/tests/llvm/httpd/modules/loggers
-I/home/frederico/dev/tests/llvm/httpd/modules/lua
-I/home/frederico/dev/tests/llvm/httpd/modules/proxy
-I/home/frederico/dev/tests/llvm/httpd/modules/session
-I/home/frederico/dev/tests/llvm/httpd/modules/ssl
-I/home/frederico/dev/tests/llvm/httpd/modules/test
-I/home/frederico/dev/tests/llvm/httpd/server
-I/home/frederico/dev/tests/llvm/httpd/modules/arch/unix
-I/home/frederico/dev/tests/llvm/httpd/modules/dav/main
-I/home/frederico/dev/tests/llvm/httpd/modules/generators
-I/home/frederico/dev/tests/llvm/httpd/modules/mappers -c http_protocol.c
-o http_protocol.o",
  "file":
"/home/frederico/dev/tests/llvm/httpd/modules/http/http_protocol.c"
}

Any ideas? Could this be a bug in my version (3.5) of clang?

Thanks!
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141007/fa85a212/attachment.html>


More information about the cfe-dev mailing list