[cfe-dev] libc++ and const expr.
Christopher Jefferson
chris at bubblescope.net
Sun Feb 5 12:07:55 PST 2012
On 4 Feb 2012, at 17:08, Richard Pennington wrote:
> On Saturday, February 04, 2012 04:25:07 AM Jean-Daniel Dupas wrote:
>> Hi,
>>
>> Am I the only one having trouble compiling libc++ with clang TOT.
>> For sometime now, clang refuse to compile (and use it) because of the
>> following issue:
>>
>> ../include/ratio:193:19: error: static_assert expression is not an integral
>> ../include/ratio:189:27: note: declared here
>> static const intmax_t max = -min;
>>
>> -- Jean-Daniel
>
> I got the same thing.
A number of things seem to have broken all at once. Commenting out that static_assert leads to a bug in src/locale.cpp about switching on '-1' on a switch on size_t in two places. Fixing that bug (by replacing -1 and -2 with (size_t)-1 and (size_t)-2, which is hopefully right.
Fixing that leads to lining producing:
ld: bad codegen, pointer diff in __ZSt17__throw_bad_allocv to global weak symbol __ZTISt9bad_alloc for architecture i386
Rather than try to debug this myself, I'm tempted to leave it to more experienced people.
One problem that this has shown me is that the recommended way of building libcxx (symlinking the svn directories into /usr/include and /usr/lib) means that if you svn update the library and it won't build, you are left with a totally non-functional library.
Chris
More information about the cfe-dev
mailing list