[PATCH] Linux header search on Ubuntu 13.04 multiarch

Sanne Wouda sanne.wouda at gmail.com
Fri Feb 15 11:50:03 PST 2013


Hi,

I recently ran into a bug where Clang (svn) could not find some system
header files (specifically <bits/*.h>). I am running Ubuntu 12.10 with
some 13.04 (libstdc++ amongst others) packages to support Clang-3.2.

The root cause seems to be Ubuntu/Debian moving around the header
files for multiarch support. E.g. on my system, <bits/predefs.h> is
located in /usr/include/x86_64-linux-gnu/bits/predefs.h, which isn't
searched by Clang.

Attached is a patch which fixes the problems on my system. A unittest
(with the directory structure attached seperately) illustrates the
problem and shows that it is fixed by the changes in the patch.

If there are any comments on the patch, or if this should be fixed in
some different way, I will be happy to update it.

Cheers.
- Sanne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubuntu_13.04_multiarch_tree.tar.gz
Type: application/x-gzip
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130215/3525e844/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-header-search.patch
Type: application/octet-stream
Size: 4669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130215/3525e844/attachment.obj>


More information about the cfe-commits mailing list