On Tue, Oct 11, 2005 at 11:20:57PM -0400, Jeff Squyres wrote:
> On Oct 11, 2005, at 11:01 PM, Brooks Davis wrote:
> 
> >> Of course, the 1.0 nightly for tomorrow morning will not have the fix
> >> just yet.
> >
> > Thanks.  With the following patchs and passing
> > --disable-pretty-print-stacktrace to configure I was able to get truck
> > at rev 7709 to build.  I haven't done any testing yet, but that's a 
> > good
> > first step.
> 
> Can you elaborate on why you needed that?  If there's a problem with 
> the stacktrace stuff on BSD, I'd like to make it either disable by 
> default or fix whatever is required to work properly on BSD.

There were a bunch of undefined symbols that I didn't track down.
Hopefully there's just a missing header file.  I need to dig into it
more.  I just disabled it because I was hoping that would be the only
issue.  It wasn't but, I had stop working before I could try again
with stack traces enabled.

> > The f77_get_fortran_handle_max.m4 change is because FreeBSD's eval
> > appears to use ints internally so they overflow to negative numbers and
> > cause problems.  Fortunatly, they roll back over once properly escaped.
> 
> I don't quite understand this -- are you saying that $ompi_fint_max 
> becomes a negative number after all the *2's, and then when we escape 
> it and subtract one, it becomes positive?  (ditto for ompi_cint_max)

On FreeBSD, eval is using 32-bit signed numbers internally on i386 (it
looks like it uses longs in general, but I haven't tested on a 64-bit
machine yet).  This means that when you compute 2^31 you get INT_MAX + 1
which is negative.  Subtracting one gives INT_MAX so you get the right
value despite the sign weirdness.  Assuming I'm correct about longs
being used, we'll also be OK on 64-bit machines even if this code is
used to compute the maximum value of a 64-bit signed integer.  It won't
work for unsigned numbers on either system though.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

Attachment: pgpwUqirJqYGs.pgp
Description: PGP signature

Reply via email to