Bug 314218 - Cannot deduce builtin include paths without g++ present
Summary: Cannot deduce builtin include paths without g++ present
Alias: None
Product: kdevelop
Classification: Unclassified
Component: Language Support: CPP (old) (show other bugs)
Version: 4.4.1
Platform: Fedora RPMs Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: kdevelop-bugs-null
Keywords: junior-jobs
Depends on:
Reported: 2013-01-31 23:06 UTC by John
Modified: 2014-05-05 07:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7


Note You need to log in before you can comment on or make changes to this bug.
Description John 2013-01-31 23:06:09 UTC
When g++ is not present on the system, kdevelop fails to deduce the builtin include path for the C++ headers.

Reproducible: Always

Steps to Reproduce:
1. Setup system with an alternative compiler such as clang but do not install g++.
2. Create a C++ project (the default CMake C++ console application template shows this for instance)
3. Open any C++ file with a standard header included.
Actual Results:  
All instances of standard headers are underlined in red because they cannot be found. If you hover over the underlined header you notice that any explicit include directories from the CMake files are listed and possibly /usr/include but the builtin include directories such as /usr/include/c++/4.7.2 are not. Actually building the project is successful though. Installing g++ and restarting causes the builtin include paths to be recognized and all standard headers are found.

Expected Results:  
Headers are found by default.

An easy workaround is of course to install g++ which in most Linux distributions is a simple task.
Comment 1 Kevin Funk 2013-02-01 10:06:00 UTC
Confirmed. Should be simple to fix, though.
Comment 2 Milian Wolff 2013-02-01 13:05:27 UTC
Personally I would welcome if we could ask the project manager for default include paths... Especially for cross-compile projects the include paths are often quite different and currently never correct.
Comment 3 Luis Felipe Domínguez Vega 2014-05-03 21:39:55 UTC
Well you can see this work... https://git.reviewboard.kde.org/r/117938/
Comment 4 Kevin Funk 2014-05-05 07:47:00 UTC
Git commit 520869abe77fe7fa68f8995b8fd38f52217d3209 by Kevin Funk, on behalf of Luis Felipe Dominguez Vega.
Committed on 05/05/2014 at 07:35.
Pushed by kfunk into branch 'master'.

Support for default include path and definitions on CLang compiler.

When I compile Kdevelop using only in my Debian Testing Clang 3.4, the defaults include paths is not recognized. In the code I will see that the functions are only for GCC and MSVC, with this patch now with Clang are recognized both, the include paths, and standard definitions.

REVIEW: 117938

M  +1    -1    languages/cpp/CMakeLists.txt
M  +5    -5    languages/cpp/setuphelpers.cpp
R  +79   -53   languages/cpp/setuphelpers_gcc_like.cpp [from: languages/cpp/setuphelpers_gcc.cpp - 059% similarity]
M  +1    -1    languages/cpp/tests/CMakeLists.txt