Python 2.3C1 Fails to build ?

Tim Peters tim.one at comcast.net
Fri Jul 25 08:01:10 CEST 2003


[Holden Caulfield]
> I am trying to build Python 2.3 RC1 (2.3c1) on Cray SV1 running
> UNICOS 10.0. And I am difficulty building it on this architecture.

Please open a bug report on SourceForge.

> Background
> --------------
>
> . Python 2.2.3 builds withs no problem. (without any changes).
> . This architecture has all C-datatypes as 8 bytes.
>
> Try 1:
> -------
>
> I got this error message first time around.
>
> ~~~~ Cut ~~
> cc -h nomessage=450 -h nostdc -h noconform -c  -DNDEBUG -h scalar0 -h
> vector0 -I. -I./Include  -DPy_BUILD_CORE -o Parser/grammar.o
> Parser/grammar.c
> CC-513 cc: ERROR File = Parser/grammar.c, Line = 45
>   A value of type "int" cannot be assigned to an entity of type "char
> *".
>
>    d->d_name = strdup(name);
>              ^
>
> CC-513 cc: ERROR File = Parser/grammar.c, Line = 105
>   A value of type "int" cannot be assigned to an entity of type "char
> *".
>
>    lb->lb_str = strdup(str);
>               ^
>
> Total errors detected in Parser/grammar.c: 2
> make: *** [Parser/grammar.o] Error 1
>
> ~~~~~~
>
> - For some reason the strdup prototype does not get picked by the
> python build.

strdup isn't a standard C function, so there's no header file that can be
counted on to contain its prototype across platforms.


> Anyways, since strdup is there in libc, I just #ifdef'ed the
> prototype for _CRAY and proceeded.

Please open that bug report <wink> and identify the header file this system
wants you to include for strdup, and a preprocessor symbol we can use to
conditionalize the include of that header file.

> It went further this time around, but now I get this error in
> obmalloc.c, which seems more problematic to fix.
>
> ~~~ Error message cut ~~~
> cc -h nomessage=450 -h nostdc -h noconform -c  -DNDEBUG -h scalar0 -h
> vector0 -I. -I./Include  -DPy_BUILD_CORE -o Objects/obmalloc.o
> Objects/obmalloc.c
> CC-61 cc: ERROR File = Objects/obmalloc.c, Line = 371
>   The integer operation result is out of range.
>
>    PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
>    ^
>
> CC-61 cc: ERROR File = Objects/obmalloc.c, Line = 371
>   The integer operation result is out of range.
>
>    PT(0), PT(1), PT(2), PT(3), PT(4), PT(5), PT(6), PT(7)
>    ^
>
> Total errors detected in Objects/obmalloc.c: 2
> make: *** [Objects/obmalloc.o] Error 1
> ~~~~~~~~~~~~~~
>
> Any ideas what is going on?

I'm surprised this hasn't triggered a (bogus) error on some other platform
before!  Those macros expand to a pretty hairy initializer.  But I don't
think there's anything wrong with it, so you should file a bug report
against the Cray compiler.

obmalloc was present in 2.2.3 but not enabled by default.  That's why you
didn't see this problem before.  In 2.3 obmalloc is enabled by default.  You
can get unstuck by disabling it again (I don't know how to disable it on
your platform -- file the Python bug report and someone will be able to
respond to you there).  While obmalloc is a big win on most platforms, I
wouldn't enable it on a Cray of this sort before doing serious
with-and-without performance testing.






More information about the Python-list mailing list