Bugs item #1563807, was opened at 2006-09-22 20:07 Message generated for change (Comment added) made by djbclark 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 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: 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 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com