Python extensions build on AIX 5.3 with GCC 4.2 fails. The configure command was as follows ./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I /opt/freeware/include -I /opt/freeware/include/readline -I /opt/freeware/include/ncurses" LDFLAGS="-L. -L/usr/local/lib" The error during the make step was as follows running build running build_ext ldd: /lib/libreadline.a: File is an archive. building dbm using ndbm INFO: Can't locate Tcl/Tk libs and/or headers building '_struct' extension creating build creating build/temp.aix-5.3-2.7 creating build/temp.aix-5.3-2.7/u01 creating build/temp.aix-5.3-2.7/u01/home creating build/temp.aix-5.3-2.7/u01/home/apli creating build/temp.aix-5.3-2.7/u01/home/apli/wm creating build/temp.aix-5.3-2.7/u01/home/apli/wm/GDD creating build/temp.aix-5.3-2.7/u01/home/apli/wm/GDD/Python-2.7 creating build/temp.aix-5.3-2.7/u01/home/apli/wm/GDD/Python-2.7/Modules gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/opt/freeware/include -I/opt/freeware/include/readline -I/opt/freeware/include/ncurses -I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.7/Include -I/u01/home/apli/wm/GDD/Python-2.7 -c /u01/home/apli/wm/GDD/Python-2.7/Modules/_struct.c -o build/temp.aix-5.3-2.7/u01/home/apli/wm/GDD/Python-2.7/Modules/_struct.o creating build/lib.aix-5.3-2.7 ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp -L. -L/usr/local/lib build/temp.aix-5.3-2.7/u01/home/apli/wm/GDD/Python-2.7/Modules/_struct.o -L. -L/usr/local/lib -lpython2.7 -o build/lib.aix-5.3-2.7/_struct.so Fatal Python error: Interpreter not initialized (version mismatch?) make: 1254-059 The signal code from the last command is 6. The file build/lib.aix-5.3-2.7/_struct.so is present after this error. The error seems to be in importing the module that was just built. Here is the error message from the python executable that was built. root [zibal]% pwd /u01/home/apli/wm/GDD/Python-2.7 root [zibal]% which python ./python root [zibal]% python Python 2.7 (r27:82500, Nov 27 2010, 18:33:21) [GCC 4.2.4] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import struct Fatal Python error: Interpreter not initialized (version mismatch?) IOT/Abort trap(coredump) This is also an error in Version 2.6.6 I don't have any other conflicting python library that might cause this.
Hi Stefen, I looked at http://bugs.python.org/issue941346 and I believe it might help my case, but, the changes made against that issue are not clear to me. It appears that for Python 2.7, the changes were made in the following 5 files 1. configure.in 2. Lib/distutils/command/build_ext.py 3. Makefile.pre.in 4. Modules/ld_so_aix.in 5. Modules/ld_so_aix The changes done in the file 5 are not clear to me....the source code that I downloaded from python.org still does not contain those changes. I am not sure if the changes were accepted to be in the release version but if someone could send me the changes then I am willing to try those out on my AIX Machine in question and share the results. Please guide.
Just received a message from Benjamin Peterson informing the release of 2.7.1. I will now download that tar ball and it should have sebastian's changes as well. I will update the results of my build process shortly.
Hi All, Thanks again for all your support. I can confirm that this works fine with the AIX Shared Library build support added in Python 2.7.1 (and 3.x which I have not tested but my tests with 2.7.1 were absolutely fine)
History
Date
User
Action
Args
2022-04-11 14:57:09
admin
set
github: 54764
2010-12-02 13:55:18
Anurag.Chourasia
set
status: open -> closedresolution: fixedmessages: +