FS#19289 - [llvm/clang] clang++ looks for C++ includes in the wrong place

Attached to Project: Community Packages
Opened by Rémy Oudompheng (remyoudompheng) - Thursday, 29 April 2010, 14:14 GMT
Last edited by Evangelos Foutras (foutrelis) - Friday, 30 April 2010, 16:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
clang++ uses old, hardcoded search paths for C++ includes.

A simple C++ Hello World using <iostream> cannot be compiled.

$ clang++ -o hello hello.cpp
hello.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 diagnostic generated.

clang-svn from AUR uses the following patch:
http://aur.archlinux.org/packages/clang-svn/clang-svn/cppheaders.patch

Additional info:
* clang and llvm 2.7
* strace -f clang++ -o hello hello.cpp
at http://pastebin.com/21Uzi46p

Steps to reproduce:
* install gcc 4.5.0 and clang/llvm 2.7
* try to compile a C++ file using C++ headers with clang++ without specifying -I/usr/include/c++...
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Friday, 30 April 2010, 16:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  Thanks for the report. I've fixed this in clang 2.7-2.

Loading...