Bug#644975: clang looks at both versions 4.5 and 4.6 of libstdc++ headers
Marc Glisse
marc.glisse at normalesup.org
Tue Oct 11 10:20:10 UTC 2011
Package: clang
Version: 2.9-14
Severity: normal
Hello,
this is mostly a dup of 594820 (that I reported last year), but I was
asked to report it as a separate bug:
$ cat f.cc
#include <fenv.h>
$ clang++ -P -E f.cc
namespace std
{
typedef long unsigned int size_t;
typedef long int ptrdiff_t;
}
$
(compare with g++ which outputs the real content)
This happens because the include path contains /usr/include/c++/4.6
then /usr/include/c++/4.5 and later /usr/include, which breaks the
#include_next mechanism of fenv.h. clang needs to decide (either at
build-time or runtime) on one of 4.5 or 4.6 but it shouldn't have both.
ignoring nonexistent directory "/usr/include/c++/4.6//x86_64-linux-gnu/64"
ignoring nonexistent directory "/usr/bin/../lib/clang/2.9/include"
ignoring duplicate directory "/usr/include/c++/4.6"
ignoring duplicate directory "/usr/include/c++/4.6//backward"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.6
/usr/include/c++/4.6//backward
/usr/include/c++/4.6//x86_64-linux-gnu
/usr/include/c++/4.5
/usr/include/c++/4.5/x86_64-linux-gnu
/usr/include/c++/4.5/backward
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/4.6/include
/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed
/usr/lib/gcc/x86_64-linux-gnu/4.5/include
/usr/lib/gcc/x86_64-linux-gnu/4.5/include-fixed
/usr/include
(it is a bit surprising that /usr/include/x86_64-linux-gnu ends up
before /usr/lib/gcc/x86_64-linux-gnu/*/*, but that shouldn't matter)
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages clang depends on:
ii libc6 2.13-21
ii libffi5 3.0.10-1
ii libgcc1 1:4.6.1-15
ii libllvm2.9 2.9+dfsg-3
ii libstdc++6 4.6.1-15
ii libstdc++6-4.6-dev 4.6.1-15
Versions of packages clang recommends:
ii llvm-2.9-dev 2.9+dfsg-3
ii python 2.7.2-8
clang suggests no packages.
-- no debconf information
More information about the Pkg-llvm-team
mailing list