[cfe-dev] Can't recompile clang using clang, fatal error: 'cmath' file not found

Csaba Raduly rcsaba at gmail.com
Thu Dec 16 04:36:34 PST 2010


2010/12/16 Marcin Mirosław <marcin at mejor.pl>:
> Hello!
> I hope i choosed proper mailing list.
> I'm using gentoo, i've got installed llvm and clang. Now i'd like to
> recompile clang with CC=clang. I get error:"
> In file included from APFloat.cpp:15:
> In file included from
> /var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/ADT/APFloat.h:104:
> In file included from
> /var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/ADT/APInt.h:18:
> In file included from
> /var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/MathExtras.h:17:
> In file included from
> /var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/SwapByteOrder.h:18:
> /var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/DataTypes.h:35:10:
> fatal error: 'cmath' file not found
> #include <cmath>
>         ^
> 1 error generated.
>                     "
>

Compile with the -v flag. That will tell you which directories did
clang++ search for cmath.

Section 5 in http://clang.llvm.org/get_started.html might offer some help.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds




More information about the cfe-dev mailing list