On Sep 5, 11:08 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> First, does the file stdint.h exist on your machine?  If so
> does the following program compile and run or not, and
> if so, what does it output:
>
> #include <stdio.h>
> #include <stdint.h>
> main() {
>
>    printf("%d",LONG_BIT);
>
> }
>
It does not compile. I don't get an error from line 2, but LONG_BIT
does not appear to be defined.

> Second, could you try commenting the error out of
>    local/include/python2.5/pyport.h
> then trying to finish the SAGE build and see what happens?
> Just comment out line 737 (or thereabouts) that looks like this:
> #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc 
> config?)."
>
> then do "sage -br" (or make) to get going again.
>
I got a bunch of linking errors involving 4-byte vs. 8-byte alignment.
But that was after removing spkg/installed/sage-2.8.3.x and remaking;
I'm not sure whether this was a sufficiently "clean" remake.

Looking at pyport.h, the offending lines are:
-----
#ifndef LONG_BIT
#define LONG_BIT (8 * SIZEOF_LONG)
#endif

#if LONG_BIT != 8 * SIZEOF_LONG
/* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some
recent
 * 32-bit platforms using gcc.  We try to catch that here at compile-
time
 * rather than waiting for integer multiplication to trigger
bogus
 *
overflows.
 */
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
#endif
-----
Interesting experiment: suppose I add the following lines to pyport.h
just before this:
-----
#ifdef LONG_BIT
#error "LONG_BIT already defined"
#endif
-----
Then the compile breaks earlier, at gdmodule-0.56p4.

So it seems like LONG_BIT is correctly defined (as 64, in this case)
at that stage of the compilation, but somewhere along the way it gets
redefined incorrectly. Maybe in scons somewhere?

Kiran


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to