[ python-Bugs-1563807 ] _ctypes built with GCC on AIX 5.3 fails with ld ffi error
SourceForge.net
noreply at sourceforge.net
Thu Nov 16 20:22:08 CET 2006
Bugs item #1563807, was opened at 2006-09-22 20:07
Message generated for change (Comment added) made by memotype
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1563807&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Clark (djbclark)
Assigned to: Thomas Heller (theller)
Summary: _ctypes built with GCC on AIX 5.3 fails with ld ffi error
Initial Comment:
Build of Python 2.5 on AIX 5.3 with GCC (tried
multiple versions: 3.3.2 from Bull Freeware, 4.1.0 and
4.1.1 from UCLA) fails with the below error message.
Tried various configure lines, which all get to the
same error, the most simple being:
./configure --disable-ipv6 --with-gcc --with-cxx=g++
(With gcc 3.3.2 I also needed --without-threads)
[...]
building '_ctypes' extension
./Modules/ld_so_aix gcc -pthread -bI:Modules/
python.exp build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/_ctypes.o build/
temp.aix-5.3-2.5/usr/local/src/python-2.5/Python-2.5/
Modules/_ctypes/callbacks.o build/temp.aix-5.3-2.5/usr/
local/src/python-2.5/Python-2.5/Modules/_ctypes/
callproc.o build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/stgdict.o build/
temp.aix-5.3-2.5/usr/local/src/python-2.5/Python-2.5/
Modules/_ctypes/cfield.o build/temp.aix-5.3-2.5/usr/
local/src/python-2.5/Python-2.5/Modules/_ctypes/
malloc_closure.o build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modules/_ctypes/libffi/src/
prep_cif.o build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/libffi/src/powerpc/
ffi_darwin.o build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modules/_ctypes/libffi/src/
powerpc/aix.o build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modules/_ctypes/libffi/src/
powerpc/aix_closure.o -L/usr/local/lib -o build/
lib.aix-5.3-2.5/_ctypes.so
ld: 0711-317 ERROR: Undefined
symbol: .ffi_prep_cif_machdep
ld: 0711-317 ERROR: Undefined symbol: .ffi_call
ld: 0711-317 ERROR: Undefined symbol: .ffi_prep_closure
ld: 0711-317 ERROR: Undefined
symbol: .ffi_closure_helper_DARWIN
ld: 0711-345 Use the -bloadmap or -bnoquiet option to
obtain more information.
collect2: ld returned 8 exit status
*** WARNING: renaming "_ctypes" since importing it
failed: Could not load module build/lib.aix-5.3-2.5.
System error: No such file or directory
error: No such file or directory
gmake: *** [sharedmods] Error 1
Re-running the failing stanza with -Wl,-bnoquiet gives:
(ld): halt 4
(ld): setopt r/o->w
(ld): setopt nodelcsect
(ld): setfflag 4
(ld): savename build/lib.aix-5.3-2.5/_ctypes.so
(ld): filelist 17 3
(ld): setopt noprogram
(ld): entry init_ctypes
ENTRY: Entry point set to init_ctypes
(ld): i /lib/crt0_r.o
(ld): i /tmp//ccigrpfq.o
(ld): lib /usr/lib/libm.a
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/_ctypes.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/callbacks.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/callproc.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/stgdict.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/cfield.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/malloc_closure.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/libffi/src/prep_cif.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/libffi/src/powerpc/
ffi_darwin.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/libffi/src/powerpc/aix.o
(ld): i build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Modules/_ctypes/libffi/src/powerpc/
aix_closure.o
(ld): i /usr/local/encap/gcc-4.1.1/bin/../lib/gcc/
powerpc-ibm-aix5.3.0.0/4.1.1/pthread/libgcc.a
(ld): i /usr/local/encap/gcc-4.1.1/bin/../lib/gcc/
powerpc-ibm-aix5.3.0.0/4.1.1/pthread/libgcc_eh.a
(ld): lib /usr/lib/libpthreads.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libpthreads.a[shr_comm.o]: 173
symbols imported.
LIBRARY: Shared object libpthreads.a[shr_xpg5.o]: 161
symbols imported.
LIBRARY: Shared object libc.a[shr.o]: 2820 symbols
imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols
imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 20 symbols
imported.
LIBRARY: Shared object libc.a[aio.o]: 14 symbols
imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols
imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols
imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols
imported.
FILELIST: Number of previously inserted files
processed: 17
(ld): imports Modules/python.exp
IMPORTS: Symbols imported from import file Modules/
python.exp: 1034
(ld): exports _ctypes.exp
EXPORTS: Symbols exported: 57
(ld): initfini _GLOBAL__FI__ctypes_so
_GLOBAL__FD__ctypes_so
(ld): resolve
RESOLVE: 895 of 7035 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 125 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-
File(Object-File) OR Import-File{Shared-object}
RLD: Address Section
Rld-type Referencing Symbol
------------------------------------------------------
----------------------------------------
.ffi_prep_cif_machdep [8] ER PR /usr/local/
src/python-2.5/Python-2.5/Modules/_ctypes/libffi/src/
prep_cif.c(build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python
-2.5/Modules/_ctypes/libffi/src/prep_cif.o)
00000a44 .text
R_RBR [556] .ffi_prep_cif
.ffi_call [140] ER PR /usr/local/
src/python-2.5/Python-2.5/Modules/_ctypes/
callproc.c(build/temp.aix-5.3-2.5/usr/local/src/python-
2.5/Python-2.5/Module
s/_ctypes/callproc.o)
00001888 .text
R_RBR [913] ._CallProc
00001980 .text
R_RBR [913] ._CallProc
.ffi_prep_closure [36] ER PR /usr/local/
src/python-2.5/Python-2.5/Modules/_ctypes/
callbacks.c(build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modul
es/_ctypes/callbacks.o)
00000274 .text
R_RBR [621] .AllocFunctionCallback
.ffi_closure_helper_DARWIN [2] ER PR
aix_closure.S(build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modules/_ctypes/libffi/src/
powerpc/aix_closure.o)
00000070 .text
R_RBR [6] .ffi_closure_ASM
ER: The return code is 8.ld: 0711-317 ERROR: Undefined
symbol: .ffi_prep_cif_machdep
ld: 0711-317 ERROR: Undefined symbol: .ffi_call
ld: 0711-317 ERROR: Undefined symbol: .ffi_prep_closure
ld: 0711-317 ERROR: Undefined
symbol: .ffi_closure_helper_DARWIN
collect2: ld returned 8 exit status
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-16 14:22
Message:
Logged In: YES
user_id=1645242
Originator: NO
/home/rvjif00 $ gcc --version
2.9-aix51-020209
/home/rvjif00 $ gcc -v -c empty.c
Reading specs from
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/specs
gcc version 2.9-aix51-020209
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/cpp
-lang-c -v -iprefix
/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/ -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 empty.c /tmp/ccTtoObS.i
GNU CPP version 2.9-aix51-020209
#include "..." search starts here:
#include <...> search starts here:
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/../../../../include/g++-3
/opt/freeware/GNUPro/include
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/../../../../powerpc-ibm-aix5.1.0.0/include
End of omitted list.
/opt/freeware/GNUPro/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/cc1
/tmp/ccTtoObS.i -quiet -dumpbase empty.c -version -o /tmp/cc28GcTD.s
GNU C version 2.9-aix51-020209 (powerpc-ibm-aix5.1.0.0) compiled by GNU C
version 2.9-aix51-020209.
as -u -mcom -o empty.o /tmp/cc28GcTD.s
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-11-15 15:59
Message:
Logged In: YES
user_id=21627
Originator: NO
What gcc version is this? In older versions, you have to do
gcc -v -c empty.c
and watch the verbose output.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2006-11-15 08:36
Message:
Logged In: YES
user_id=11105
Originator: NO
Yes ;-), although I would have expected that 'gcc -E -dD empty.c' would
have printed something.
Does 'touch empty.c; cpp -dM empty.c' print something?
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-15 08:00
Message:
Logged In: YES
user_id=1645242
Originator: NO
Something like this?
~ $ touch empty.c
~ $ gcc -E -dD empty.c
# 1 "empty.c"
~ $ cat empty.c
~ $
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2006-11-15 05:05
Message:
Logged In: YES
user_id=11105
Originator: NO
memotype, can you please do what loewis suggested and report back:
> Please compile an empty file with "gcc -E -dD empty.c" to find out what
> defines are builtin.
It is very likely that the symbol we need is a builtin symbol of the
compiler, and not a symbol defined in some of the header files.
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 14:29
Message:
Logged In: YES
user_id=1645242
Originator: NO
Ohh, and before you ask (I forgot to mention): grepping for "ppc" (with
-i) doesn't yield any more results.
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 14:25
Message:
Logged In: YES
user_id=1645242
Originator: NO
I'm sorry, I meant __ppc__, it was the __ppc__ lines that I removed. As
for PPC specific defines, I can't find any that work, but grepping around
in /usr/include shows:
/usr/include $ grep -i powerpc *
aouthdr.h: * Defines for the POWER and PowerPC CPU Types
aouthdr.h:#define TCPU_PPC 1 /* PowerPC common architecture 32
bit mode */
aouthdr.h:#define TCPU_PPC64 2 /* PowerPC common architecture 64
bit mode */
aouthdr.h:#define TCPU_COM 3 /* POWER and PowerPC architecture
common */
aouthdr.h: /* and PowerPC architecture
implementations */
aouthdr.h:#define TCPU_601 6 /* 601 implementation of PowerPC
architecture */
aouthdr.h:#define TCPU_603 7 /* 603 implementation of PowerPC
architecture */
aouthdr.h:#define TCPU_604 8 /* 604 implementation of PowerPC
architecture */
aouthdr.h:#define TCPU_620 16 /* 620 implementation of PowerPC
64-bit architecture */
aouthdr.h:#define TCPU_A35 17 /* A35 implementation of PowerPC
64-bit architecture */
filehdr.h:/* IBM POWER and PowerPC */
frs.h:| - rom_scan_R2_6002_block_t (PowerPC devices)
frs.h:| - rom_scan_R2_6003_block_t (60x PowerPC devices)
frs.h:| The PowerPC 601 Bus has such characteristics.
frs.h:| that matches the PowerPC 60X Bus and PowerPC System Architecture
frs_60x.h: | as defined by PowerPC System ARch and
unique
frs_60x.h:| PowerPC Feature/VPD Header
reloc.h: * POWER and PowerPC - relocation types
I would love to send you a copy of the aouthdr.h, but I'm not sure if that
would violate any licenses, so I will have to leave the rest to you guys to
look for some definitive documentation as to how to detect ppc from
defines.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-11-14 14:08
Message:
Logged In: YES
user_id=21627
Originator: NO
Please compile an empty file with "gcc -E -dD empty.c" to find out what
defines are builtin.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2006-11-14 13:47
Message:
Logged In: YES
user_id=11105
Originator: NO
Hm, I was asking for '__ppc__', not '__aix__'. Can you look for processor
specific defines, please?
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 13:35
Message:
Logged In: YES
user_id=1645242
Originator: NO
_AIX however, /is/ defined, so maybe s/__aix__/_AIX/g?
~/Python-2.5 $ cat <<. > test.c
> int main() {
> #ifdef _AIX
> return 0;
> #endif
> #ifndef _AIX
> return 1;
> #endif
> }
> .
~/Python-2.5 $ gcc -o test test.c
~/Python-2.5 $ ./test
~/Python-2.5 $ echo $?
0
~/Python-2.5 $
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 13:28
Message:
Logged In: YES
user_id=1645242
Originator: NO
That seems to have done the trick actually. __aix__ is in fact not defined
on AIX 5.2 (cannot varify on 5.3) and removing the #ifdefs in the suggested
file allows for a clean build:
~/Python-2.5 $ ./python
Python 2.5 (r25:51908, Nov 14 2006, 13:19:33)
[GCC 2.9-aix51-020209] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> dir (ctypes)
['ARRAY', 'ArgumentError', 'Array', 'BigEndianStructure', 'CDLL',
'CFUNCTYPE', 'DEFAULT_MODE', 'LibraryLoader', 'LittleEndianStructure',
'POINTER', 'PYFUNCTYPE', 'PyDLL', 'RTLD_GLOBAL', 'RTLD_LOCAL',
'SetPointerType', 'Structure', 'Union', '_CFuncPtr', '_FUNCFLAG_CDECL',
'_FUNCFLAG_PYTHONAPI', '_Pointer', '_SimpleCData', '__builtins__',
'__doc__', '__file__', '__name__', '__path__', '__version__',
'__warningregistry__', '_c_functype_cache', '_calcsize', '_cast',
'_cast_addr', '_ctypes_version', '_dlopen', '_endian', '_memmove_addr',
'_memset_addr', '_os', '_pointer_type_cache', '_string_at',
'_string_at_addr', '_sys', '_wstring_at', '_wstring_at_addr', 'addressof',
'alignment', 'byref', 'c_buffer', 'c_byte', 'c_char', 'c_char_p',
'c_double', 'c_float', 'c_int', 'c_int16', 'c_int32', 'c_int64', 'c_int8',
'c_long', 'c_longlong', 'c_short', 'c_size_t', 'c_ubyte', 'c_uint',
'c_uint16', 'c_uint32', 'c_uint64', 'c_uint8', 'c_ulong', 'c_ulonglong',
'c_ushort', 'c_void_p', 'c_voidp', 'c_wchar', 'c_wchar_p', 'cast', 'cdll',
'create_string_buffer', 'create_unicode_buffer', 'memmove', 'memset',
'pointer', 'py_object', 'pydll', 'pythonapi', 'resize',
'set_conversion_mode', 'sizeof', 'string_at', 'wstring_at']
>>>
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 13:28
Message:
Logged In: YES
user_id=1645242
Originator: NO
That seems to have done the trick actually. __aix__ is in fact not defined
on AIX 5.2 (cannot varify on 5.3) and removing the #ifdefs in the suggested
file allows for a clean build:
~/Python-2.5 $ ./python
Python 2.5 (r25:51908, Nov 14 2006, 13:19:33)
[GCC 2.9-aix51-020209] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> dir (ctypes)
['ARRAY', 'ArgumentError', 'Array', 'BigEndianStructure', 'CDLL',
'CFUNCTYPE', 'DEFAULT_MODE', 'LibraryLoader', 'LittleEndianStructure',
'POINTER', 'PYFUNCTYPE', 'PyDLL', 'RTLD_GLOBAL', 'RTLD_LOCAL',
'SetPointerType', 'Structure', 'Union', '_CFuncPtr', '_FUNCFLAG_CDECL',
'_FUNCFLAG_PYTHONAPI', '_Pointer', '_SimpleCData', '__builtins__',
'__doc__', '__file__', '__name__', '__path__', '__version__',
'__warningregistry__', '_c_functype_cache', '_calcsize', '_cast',
'_cast_addr', '_ctypes_version', '_dlopen', '_endian', '_memmove_addr',
'_memset_addr', '_os', '_pointer_type_cache', '_string_at',
'_string_at_addr', '_sys', '_wstring_at', '_wstring_at_addr', 'addressof',
'alignment', 'byref', 'c_buffer', 'c_byte', 'c_char', 'c_char_p',
'c_double', 'c_float', 'c_int', 'c_int16', 'c_int32', 'c_int64', 'c_int8',
'c_long', 'c_longlong', 'c_short', 'c_size_t', 'c_ubyte', 'c_uint',
'c_uint16', 'c_uint32', 'c_uint64', 'c_uint8', 'c_ulong', 'c_ulonglong',
'c_ushort', 'c_void_p', 'c_voidp', 'c_wchar', 'c_wchar_p', 'cast', 'cdll',
'create_string_buffer', 'create_unicode_buffer', 'memmove', 'memset',
'pointer', 'py_object', 'pydll', 'pythonapi', 'resize',
'set_conversion_mode', 'sizeof', 'string_at', 'wstring_at']
>>>
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2006-11-14 12:05
Message:
Logged In: YES
user_id=11105
Well, there is certainly a diff in noctypes.diff. If your
patch program cannot handle it, you may want to apply it
manually (basically you have to remove/comment out two
sections of code in setup.py).
It seems that there are actually two bugs:
1. setup.py doesn't continue after trying to import the
_ctypes extension. No idea why, but somewhere something
exists the process.
2. _ctypes.so does not build (or better fails to load)
because of missing symbols:
ld: 0711-317 ERROR: Undefined symbol: .ffi_prep_cif_machdep
ld: 0711-317 ERROR: Undefined symbol: .ffi_call
ld: 0711-317 ERROR: Undefined symbol: .ffi_prep_closure
ld: 0711-317 ERROR: Undefined symbol: .ffi_closure_helper_DARWIN
I have no access to an AIX system, do I cannot try this out
myself. One thing that comes to mind:
These functions are implemented in the file
Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c. This file
is compiled, without errors. One problem could be that the
whole file contents are included in an #ifdef block like this:
#ifdef __ppc__
...
#endif
Can it be that __ppc__ is not defined on this system? Can
someone try out to build with these two lines removed?
Thanks.
----------------------------------------------------------------------
Comment By: Memotype (memotype)
Date: 2006-11-14 10:55
Message:
Logged In: YES
user_id=1645242
What is the status on this bug? I tried the work around, but
patch doesn't like the diff file provided, says
"Processing... I cannot find a patch in there anywhere."
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-23 08:55
Message:
Logged In: YES
user_id=129055
Build finished running; full log attached as python-2.5-
ctypes.log.gz. Relevent lines are:
ld: 0711-317 ERROR: Undefined symbol: .ffi_prep_cif_machdep
[... more ld errors ...]
collect2: ld returned 8 exit status
*** WARNING: renaming "_ctypes" since importing it failed:
Could not load module build/lib.aix-5.3-2.5.
System error: No such file or directory
error: No such file or directory
gmake: *** [sharedmods] Error 1
And at this point gmake exits and the build stops. Running
gmake again just causes the same error to pop up.
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-23 08:29
Message:
Logged In: YES
user_id=129055
Ah, well there is a bug then... setup.py does not continue
on its own. I've added an attachement of a successful full
build log (built with the noctypes patch), and will attach
a second full build log that shows the build failing on the
error when it finishes running in 10-20 minutes...
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-09-23 08:14
Message:
Logged In: YES
user_id=21627
No; setup.py should continue on its own. If it doesn't,
that's a bug.
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-23 08:06
Message:
Logged In: YES
user_id=129055
loewis: No, the ctypes error messages cause the build to
fail. Are you saying to use "gmake -k" or something like that?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-09-23 07:15
Message:
Logged In: YES
user_id=21627
You don't need to disable it. It will print error messages,
but you can just ignore them if you don't need the ctypes
module.
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-22 23:44
Message:
Logged In: YES
user_id=129055
The only way I could figure out to disable ctypes was via a
patch to setup.py (included as noctypes.diff). With this
patch applied, Python 2.5 compiles without issues on AIX
5.3 / GCC 4.1.1, and seems to work fine (except for ctypes
of course, and probably some things that depend on ctypes
are also broken). (For the exact build paramaters used, see
attached python-2.5.ep)
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-22 22:07
Message:
Logged In: YES
user_id=129055
As a temporary workaround, is there any way to just disable
building of the ctypes module?
----------------------------------------------------------------------
Comment By: Daniel Clark (djbclark)
Date: 2006-09-22 20:48
Message:
Logged In: YES
user_id=129055
Did a search of the bug database, and found some simular
bugs:
http://python.org/sf/1530448
http://python.org/sf/1544339
http://python.org/sf/1529269
Also tried with --with-system-ffi and some other options,
but got same error:
./configure --disable-ipv6 --with-gcc --with-cxx=g++ --
disable-universalsdk --disable-framework --disable-toolbox-
glue --with-system-ffi --without-threads
Tried adding -Wl,-mimpure-text as in r51113, but that just
caused an error (I might be doing it wrong or something,
specifics below)
# ./Modules/ld_so_aix gcc -Wl,-mimpure-text -bI:Modules/
python.exp build/temp.aix-5.3-2.5/usr/local/src/python-2.5/
Python-2.5/Modules/_ctypes/_ctypes.o build/temp.aix-5.3-2.5/
usr/local/src/python-2.5/Python-2.5/Modules/_ctypes/
callbacks.o build/temp.aix-5.3-2.5/usr/local/src/python-2.5/
Python-2.5/Modules/_ctypes/callproc.o build/temp.aix-5.3-
2.5/usr/local/src/python-2.5/Python-2.5/Modules/_ctypes/
stgdict.o build/temp.aix-5.3-2.5/usr/local/src/python-2.5/
Python-2.5/Modules/_ctypes/cfield.o build/temp.aix-5.3-2.5/
usr/local/src/python-2.5/Python-2.5/Modules/_ctypes/
malloc_closure.o build/temp.aix-5.3-2.5/usr/local/src/
python-2.5/Python-2.5/Modules/_ctypes/libffi/src/prep_cif.o
build/temp.aix-5.3-2.5/usr/local/src/python-2.5/Python-2.5/
Modules/_ctypes/libffi/src/powerpc/ffi_darwin.o build/
temp.aix-5.3-2.5/usr/local/src/python-2.5/Python-2.5/
Modules/_ctypes/libffi/src/powerpc/aix.o build/temp.aix-5.3-
2.5/usr/local/src/python-2.5/Python-2.5/Modules/_ctypes/
libffi/src/powerpc/aix_closure.o -L/usr/local/lib -o build/
lib.aix-5.3-2.5/_ctypes.so
ld: 0706-027 The -i flag is ignored.
ld: 0706-012 The -p flag is not recognized.
collect2: ld returned 255 exit status
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1563807&group_id=5470
More information about the Python-bugs-list
mailing list