64 bit python

E. McKay Hyde hyde at math.umn.edu
Thu Jun 5 16:04:08 EDT 2003


Martin v. Löwis wrote:
> "E. McKay Hyde" <hyde at math.umn.edu> writes:
> 
> 
>>SIZEOF_LONG=4, as defined in pyconfig.h
> 
> 
> That is the core of the problem; this setting is incorrect.
> 

I see; this should be 8.

> 
>>Or perhaps the macro is using a different compiler in determining
>>the size?
> 
> 
> It uses $CC.
> 

This was the problem.  On AIX, the configure script _does not_ use $CC; 
instead it overrides $CC with "cc_r" (or, even worse, with "cc" when one 
specifies "--without-gcc").  Hence, even when I declared CC="cc_r -q64", 
this was replaced with "cc_r".  To get around this, I found that I could 
  declare the environment variable OBJECT_MODE=64 which has the same 
effect as "-q64", and which also selects the proper mode for "ar" and 
"ranlib".

Now, the compilation progresses nicely until the following error:

case $MAKEFLAGS in \
*-s*) CC='cc_r' LDSHARED='./Modules/ld_so_aix cc_r 
-bI:Modules/python.exp' OPT='-DNDEBUG -qmaxmem=-1 -O3 -qstrict 
-qarch=auto -qcache=auto -qtune=auto' ./python -E ./setup.py -q build;; \
*) CC='cc_r' LDSHARED='./Modules/ld_so_aix cc_r -bI:Modules/python.exp' 
OPT='-DNDEBUG -qmaxmem=-1 -O3 -qstrict -qarch=auto -qcache=auto 
-qtune=auto' ./python -E ./setup.py build;; \
esac
running build
running build_ext
building 'struct' extension
skipping 
/homes/sp14/hydem/realRoot64/src/PythonTest/Python-2.2.2/Modules/structmodule.c 
(build/temp.aix-4.3-2.2/structmodule.o up-to-date)
./Modules/ld_so_aix cc_r -bI:Modules/python.exp 
build/temp.aix-4.3-2.2/structmodule.o -L/usr/local/lib -o 
build/lib.aix-4.3-2.2/struct.so
gmake: *** [sharedmods] Segmentation fault


So, struct.so builds without errors and then I get a seg fault.  The 
compiled executable 'python' runs without any obvious problems.  I'm 
going to dig into the Makefile to see if I can find exactly where it is 
crashing.


Thanks for your help,

McKay






More information about the Python-list mailing list