[Box Backup] LLONG_MAX configure mistake with gcc 4.1.1 (Linux)

Stuart Hickinbottom boxbackup@fluffy.co.uk
Sat, 10 Jun 2006 16:11:07 +0100


Duly encouraged, I've done some more investigation and tracked it down
to the following bit of code in the configure check for LLONG_MAX/MIN:

        /* Sanity check */
        if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
|| llmax - 1 > llmax) {
          fprintf(f, "unknown unknown\n");
          exit(2);
        }

When run on gcc 4.1.1 this fails (ie it logs "unknown unknown"), but
when run on gcc 3.4.6 it works fine. If I comment that out then it works
(llmin/llmax do seem to be correctly determined in that they are the
same between gcc versions), so it's the interpretation of this logic
that differs between gcc versions.

I'll take a look at the differences between those compiler versions to
try to track that down.

Stuart


Martin Ebourne wrote:
> On Sat, 2006-06-10 at 07:50 +0100, Stuart Hickinbottom wrote:
>> I have looked into the configure.log and the relevant lines seem to be
>> as follows:
>>
>> ------ gcc 3.4.6 configure.log fragment
>> configure:12051: result: no
>> configure:12058: checking for max value of long long
>> configure:12112: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl
>> -ldb -lz  >&5
>> configure:12115: $? = 0
>> configure:12117: ./conftest
>> Using system header for LLONG_MIN and LLONG_MAX
>> configure:12120: $? = 0
>> configure:12124: result: 9223372036854775807
>> configure:12131: checking for min value of long long
>> configure:12133: result: -9223372036854775808
>> ------ gcc 4.1.1 configure.log fragment
>> configure:12051: result: no
>> configure:12058: checking for max value of long long
>> configure:12112: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl
>> -ldb -lz  >&5
>> configure:12115: $? = 0
>> configure:12117: ./conftest
>> Using system header for LLONG_MIN and LLONG_MAX
>> configure:12120: $? = 2
>> configure: program exited with status 2
>> configure: failed program was:
>> ------
>>
>> I can look into this some more if someone could give me a couple of
>> pointers - I've never delved too deeply into configure scripts before
>> (and having done a little now I can see why!).
> 
> Take the failed program as reported in the log, then the compile line it
> gives you above. Compile it manually and presumably you'll get the same
> result. Then debug it in the time honoured fasion. :)
> 
> As an aside, I'm sure I recognise your name. You're not another
> ex-Acorner are you?
> 
> Cheers,
> 
> Martin.
> 
> _______________________________________________
> boxbackup mailing list
> boxbackup@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup
>