Compiling an Extension on AIX!!!

Martin Franklin martin.franklin at westerngeco.com
Thu May 31 12:20:30 CEST 2001


All,


Recently I have been creating and compiling 'c' extensions 
on my *nix platforms (Linux, Solaris, IRIX and yes AIX!)

The extensions make some calls to some legacy code we have
lying around.  I make them by hacking the Python make system

On al other platforms it compiles first time every time;-)
on AIX however I was getting the following message from make:-


[compo:bpse:/SRC/python/Extending/NewFileInfo/aix4]                                                                 
14 % make
        xlc   -DIBMRS   -O -I/usr/local/include/python2.0
-I/usr/local/include/python2.0 -I/legacy/code/src/include
-DHAVE_CONFIG_H -c -q32 ./NewFileInfo.c
"/usr/include/sys/socket.h", line 76.21: 1506-247 (S) Incompatible type
specifier "int".
make: 1254-004 The error code from the last command is 1.


Stop.


So i looked in /usr/include/sys/socket.h and at line 76:-


typedef __ulong32_t socklen_t;


Then I tracked where it was being defined as an int........


/usr/local/include/python2.0/config.h

Around line 147 

/* Define to `int' if <sys/types.h> doesn't define.  */
#define socklen_t int


The wired thing is socklen_t is not defined in sys/types.h but 
in socket.h so the comment makes no sense.

So I removed the offending #define and it compiles without error.....



Is this a bug and as such should I report it to the bug tracker 
at sourceforge?



Thanks for your time,
Martin.



More information about the Python-list mailing list