Re: Pg 7.2.3 int8 value out of range - Mailing list pgsql-bugs

From Brian Macy
Subject Re: Pg 7.2.3 int8 value out of range
Date
Msg-id 3DB047B5.60000@macykids.net
Whole thread Raw
In response to Pg 7.2.3 int8 value out of range  (Brian Macy <bmacy@macykids.net>)
List pgsql-bugs
The config.log wasn't very useful but I hacked configure to not send
compile/run errors to /dev/null and got this:

checking whether long long int is 64 bits... ./conftest: relocation
error: ./conftest: undefined symbol: __muldi3

Apparrently something is whacked when running from configure. I can take
the exact code (minus the confdefs.h) and run it from the command-line
and it compiles, links, and executes fine (returns 0).


[] config.log:
configure:7610: checking whether long long int is 64 bits
configure:7648: gcc -o conftest -O2     conftest.c -lssl -lcrypto -lz
-lcrypt -lresolv -lnsl -ldl -lm  1>&5
configure: failed program was:
#line 7619 "configure"
#include "confdefs.h"
typedef long long int int64;

/*
  * These are globals to discourage the compiler from folding all the
  * arithmetic tests down to compile-time constants.
  */
int64 a = 20000001;
int64 b = 40000005;

int does_int64_work()
{
   int64 c,d;

   if (sizeof(int64) != 8)
     return 0;                   /* definitely not the right size */

   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
   c = a * b;
   d = (c + b) / b;
   if (d != a+1)
     return 0;
   return 1;
}
main() {
   exit(! does_int64_work());
}


Tom Lane wrote:
> Brian Macy <bmacy@macykids.net> writes:
>
>>checking whether long int is 64 bits... no
>>checking whether long long int is 64 bits... no
>
>
> Well, that seems to be the problem.  Perhaps the relevant section of
> config.log would offer some hints?
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

pgsql-bugs by date:

Previous
From: Brian Macy
Date:
Subject: Re: Pg 7.2.3 int8 value out of range
Next
From: Casey Allen Shobe
Date:
Subject: Odd random drop sequence failure