Re: [patch] Fix some errors building with clang++ trunk.

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 13 Aug 2011 04:24:44 +1200

On 13/08/11 03:39, Pawel Worach wrote:
> On Aug 12, 2011, at 15:08, Amos Jeffries wrote:
>> On 12/08/11 23:34, Kinkie wrote:
>>> Hi,
>>> Gnu++0x looks good, but then what about non-gnu compilers? Oh WHY do
>>> they have to be strict ANSI? I curse thee, standards committee!
>>>
>>
>> One of the benefits we gain is eyeballs on all these problems and a reason to document all the weirdness.
>>
>> FWIW; I skipped gnu++0x after reading the list of features they supported which are still experimental or were rejected from the spec.
>>
>> The tests detect both of them properly, but so far only enables the -std set so we only get the pieces which are officially accepted.
>>
>> Amos
>
> Also I was wrong regarding the configure test for strtoll() but I have no idea what it actually tests because it seems to succeed.
>

Tests whether whatever stdlib and compiler options are being built make
it available for use. It is autoconf AC_REPLACE_FUNCS()

> configure:29430: checking for strtoll
> configure:29430: clang++ -o conftest -g -O2 -std=c++0x -I/usr/local/include -I/usr/include -I/usr/include -g -L/usr/local/lib -Wl,-R/usr/local/lib -pthread c
> onftest.cpp -lm>&5
> configure:29430: $? = 0
> configure:29430: result: yes
>
> There are also a lot of configure tests that fail for reasons not even remotely related to what they are testing for...

Yes we need someone to go through and find+fix as many as possible. On
as many OS as possible (we have build farm logs available). Interested?

>
> configure:25717: checking for struct rusage
> configure:25717: clang++ -c -g -O2 -std=c++0x -I/usr/local/include -I/usr/include -I/usr/include conftest.cpp>&5
> configure:25717: $? = 0
> configure:25717: clang++ -c -g -O2 -std=c++0x -I/usr/local/include -I/usr/include -I/usr/include conftest.cpp>&5
> conftest.cpp:215:28: error: expected expression
> if (sizeof ((struct rusage)))
> ^
> 1 error generated.
>
> Where the double parentheses come from I have no idea.

Maybe lack of [] wrapper in configure.ac, there is a similar struct test
later that has [] and no such output.

Maybe two tests performed in a row. The output of that rusage test
appears to be "yes" here despite logging fail with the same error as you
see directly above the yes verdict.

>
> You can find a full config.log with CC=clang CXX=clang++ here: http://pes.vlakno.cz/~pwo/squid3-clang-config.log
>

Thank you. I'm not sure if any of us will have time to read it at
present. But thank you for the help anyway.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Fri Aug 12 2011 - 16:24:50 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 12 2011 - 12:00:02 MDT