[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added CC||kf...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added Ever confirmed|0 |1 Status|RESOLVED|REOPENED Resolution|WAITINGFORINFO |--- --- Comment #5 from Kevin Funk --- Thanks. I'll check again. -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 --- Comment #4 from Bernhard Scheirle--- KDevelop: 5.0.4 from KDE Neon Clang: 3.8.0 After importing the project KDevelop found the header file with no errors/warnings. But then after pruning the project the header file can't be found anymore. After importing the project: compile_commands.json: [ { "directory": "/path with spaces/build", "command": "/usr/bin/c++-I. -I../ -g -o CMakeFiles/space.dir/main.cpp.o -c \"/path with spaces/main.cpp\"", "file": "/path with spaces/main.cpp" }, { "directory": "/path with spaces/build", "command": "/usr/bin/c++-I. -I../ -g -o CMakeFiles/space.dir/folder/header.cpp.o -c \"/path with spaces/folder/header.cpp\"", "file": "/path with spaces/folder/header.cpp" } ] Log: Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++ -isystem/usr/include/c++/5 -isystem/usr/include/x86_64-linux-gnu/c++/5 -isystem/usr/include/c++/5/backward -isystem/usr/local/include -isystem/usr/lib/llvm-3.8/lib/clang/3.8.0/include -isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/path with spaces/build -I/path with spaces -imacros /tmp/kdevelop.XM8558 /path with spaces/folder/header.cpp Every (especially quoting) looks right. Now prune the project (Project->Prune Selection) and reload header.cpp (Hit F5): compile_commands.json: [ { "directory": "/path with spaces/build", "command": "/usr/bin/c++-I\"/path with spaces/build\" -I\"/path with spaces\" -g -o CMakeFiles/space.dir/main.cpp.o -c \"/path with spaces/main.cpp\"", "file": "/path with spaces/main.cpp" }, { "directory": "/path with spaces/build", "command": "/usr/bin/c++-I\"/path with spaces/build\" -I\"/path with spaces\" -g -o CMakeFiles/space.dir/folder/header.cpp.o -c \"/path with spaces/folder/header.cpp\"", "file": "/path with spaces/folder/header.cpp" } ] Log: Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++ -isystem/usr/include/c++/5 -isystem/usr/include/x86_64-linux-gnu/c++/5 -isystem/usr/include/c++/5/backward -isystem/usr/local/include -isystem/usr/lib/llvm-3.8/lib/clang/3.8.0/include -isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/path with spaces/build" -I"/path with spaces -imacros /tmp/kdevelop.UJ9631 /path with spaces/folder/header.cpp Note: * compile_commands.json uses absolute paths after pruning the project for the build and project root directory. * After pruning the quoting is wrong (build" -I"/path) * The KDevelop-5.0.4-x86_64.AppImage behaves exactly the same. -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |WAITINGFORINFO --- Comment #3 from Kevin Funk --- I can't reproduce your problem, using latest KDevelop with Clang 3.9. All works fine for me. This is what I get: ``` Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++ -isystem/home/kfunk/Downloads/path with spaces build -isystem/usr/include/c++/6 -isystem/usr/include/x86_64-linux-gnu/c++/6 -isystem/usr/include/c++/6/backward -isystem/usr/local/include -isystem/usr/lib/llvm-3.9/lib/clang/3.9.0/include -isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/home/kfunk/Downloads/path with spaces -imacros /tmp/kdevelop.U27790 /home/kfunk/Downloads/path with spaces/folder/header.cpp ``` Note that the output here is slightly misleading, there are no '"' around the include paths. Internally, the arguments are passed as a list of arguments, thus spacing in one argument is not a problem. Anyhow, in your case, the quoting indeed looks wrong: ``` -I/path with spaces/build" -I"/path with spaces ``` That's either because CMake creates a bogus compile_commands.json file or we fail to parse it properly. Could you please a) Check out the newest AppImage on https://www.kdevelop.org/download and try to reproduce? b) Post the contents of the compile_commands.json in the build directory? -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added Target Milestone|5.0.3 |5.0.4 -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added Target Milestone|--- |5.0.3 Priority|NOR |HI -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 Kevin Funkchanged: What|Removed |Added CC||aleix...@kde.org Component|general |Build tools: CMake -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 --- Comment #2 from Bernhard Scheirle--- Running kdevelop with KDEV_CLANG_DISPLAY_ARGS=1 outputs: Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++ -xc++ -isystem/usr/include/c++/5 -isystem/usr/include/x86_64-linux-gnu/c++/5 -isystem/usr/include/c++/5/backward -isystem/usr/local/include -isystem/usr/lib/llvm-3.8/lib/clang/3.8.0/include -isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/path with spaces/build" -I"/path with spaces -imacros /tmp/kdevelop.J31470 /path with spaces/folder/header.cpp As you can see some paths are not escaped properly! -- You are receiving this mail because: You are watching all bug changes.
[kdevelop] [Bug 371565] KDevelop can't find header files if the project path contains spaces
https://bugs.kde.org/show_bug.cgi?id=371565 --- Comment #1 from Bernhard Scheirle--- Created attachment 101737 --> https://bugs.kde.org/attachment.cgi?id=101737=edit Example project -- You are receiving this mail because: You are watching all bug changes.