[Python-Dev] ctypes and powerpc (original) (raw)
Thomas Heller theller at ctypes.org
Fri Nov 24 20:19:54 CET 2006
- Previous message: [Python-Dev] DRAFT: python-dev summary for 2006-11-01 to 2006-11-15
- Next message: [Python-Dev] ctypes and powerpc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'd like to ask for help with an issue which I do not know how to solve.
Please see this bug http://python.org/sf/1563807 "ctypes built with GCC on AIX 5.3 fails with ld ffi error"
Apparently this is a powerpc machine, ctypes builds but cannot be imported because of undefined symbols like 'ffi_call', 'ffi_prep_closure'.
These symbols are defined in file Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c. The whole contents of this file is enclosed within a
#ifdef ppc ... #endif
block. IIRC, this block has been added by Ronald for the Mac universal build. Now, it seems that on the AIX machine the ppc symbols is not defined; removing the #ifdef/#endif makes the built successful.
We have asked (in the SF bug tracker) for the symbols that are defined; one guy has executed 'gcc -v -c empty.c' and posted the output, as far as I see these are the symbols defined in gcc:
-D__GNUC__=2 -D__GNUC_MINOR__=9 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_LONG_LONG -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_LONG_LONG -Asystem(unix) -Asystem(aix) -D__CHAR_UNSIGNED__ -D_ARCH_COM
What should we do now? Should the conditional be changed to
#if defined(ppc) || defined(_POWER)
or should we suggest to add '-D__ppc__' to the CFLAGS env var, or what? Any suggestions?
Thanks, Thomas
- Previous message: [Python-Dev] DRAFT: python-dev summary for 2006-11-01 to 2006-11-15
- Next message: [Python-Dev] ctypes and powerpc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]