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
IWYU fails to compile hpp file, with error unable to handle compilation, expected exactly one compiler job in #1247
Comments
|
I tried debugging
invocations.command returns exactly one command to execute. Same is sent to execute function, during execution somehow its not doing it right. Just to add this runs fine if I use cpp file, instead of hpp file, I see only one iwyu executable path. |
Does it make any difference if you leave out Could you show the entry from the compilation database for |
Hi Kim, Without -j option also it didn't work. I was manually creating a compile_commands.json by fetching compiler options, filename and directory. (This works for *.cpp file) I now used a compdb to genreate compile_commands .json for hpp file, it runs but still it doesn't give proper output Compile_commands.json
CMake
Source Filefoo.cxx
foo.hpp
|
What does this mean? Can you show the output you get? |
ya sorry I missed the output
|
This turned into a duplicate of #100. Closing. |
While trying to run IWYU on hpp file, its giving above issue "unable to handle compilation, expected exactly one compiler job in"
The problem is it copies duplicate command, In log I can see it has two path for iwyu copied twice
Below is snippet for output
"/path/iwyu/iwyu-0.16/install/glnxa64/bin/include-what-you-use" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-fsyntax-only" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "foo.hpp" "some_other_compiler_options" "c++header" "foo.cpp" ; "/path/iwyu/iwyu-0.16/install/glnxa64/bin/include-what-you-use" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-fsyntax-only" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "foo.hpp" "some_other_compiler_options" "c++header" "foo.cpp" ;
Reproduction steps
foo.hpp
`#include
#include
int prettyprint();
void foo();`
Command used
python iwyu_tool.py -j12 -o iwyu -p compile_commands.json foo.hpp
Compiler
clang -12
OS: Debian 11
Include-what-you-use
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@MX32
Selected multilib: .;@m64
The text was updated successfully, but these errors were encountered: