64 bit python

E. McKay Hyde hyde at math.umn.edu
Thu Jun 5 22:04:08 CEST 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 

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;; \
running build
running build_ext
building 'struct' extension
(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 
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 

Thanks for your help,


More information about the Python-list mailing list