[Numpy-discussion] Casting Errors in AIX

Trevor Antczak tantczak at operasolutions.com
Wed Jul 24 11:36:53 EDT 2013


Hello Numpy Discussion List,

So I'm trying to get numpy working on an AIX 6.1 system.  Initially I had a lot of problems trying to compile the package because the xlc compiler weren't installed on this machine, but apparently the Python package we installed had been built with them.  Once we got xlc installed the process seemed to work pretty well until we got to compiling heapsort.c.  At this point I began to get a huge number of errors in the form:

compile options: '-Inumpy/core/include -Ibuild/src.aix-6.1-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/freeware/include/python2.7 -Ibuild/src.aix-6.1-2.7/numpy/core/src/multiarray -Ibuild/src.aix-6.1-2.7/numpy/core/src/umath -c'
xlc_r: build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.c
"/usr/include/stdio.h", line 528.12: 1506-343 (S) Redeclaration of fgetpos64 differs from previous declaration on line 323 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 528.12: 1506-377 (I) The type "long long*" of parameter 2 differs from the previous type "long* restrict".
"/usr/include/stdio.h", line 531.12: 1506-343 (S) Redeclaration of fseeko64 differs from previous declaration on line 471 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 531.12: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/stdio.h", line 532.12: 1506-343 (S) Redeclaration of fsetpos64 differs from previous declaration on line 325 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 532.12: 1506-377 (I) The type "const long long*" of parameter 2 differs from the previous type "const long*".
"/usr/include/stdio.h", line 533.16: 1506-343 (S) Redeclaration of ftello64 differs from previous declaration on line 472 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 533.16: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 171.17: 1506-343 (S) Redeclaration of lseek64 differs from previous declaration on line 169 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 171.17: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 171.17: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64 differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".

...................................................

"/usr/include/unistd.h", line 942.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 942.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 943.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 940 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 943.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
error: Command "/usr/vac/bin/xlc_r -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -q32 -qbitfields=signed -qmaxmem=70000 -qalloca -bmaxdata:0x80000000 -Wl,-brtl -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DNDEBUG -O2 -Inumpy/core/include -Ibuild/src.aix-6.1-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/freeware/include/python2.7 -Ibuild/src.aix-6.1-2.7/numpy/core/src/multiarray -Ibuild/src.aix-6.1-2.7/numpy/core/src/umath -c build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.c -o build/temp.aix-6.1-2.7/build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.o" failed with exit status 1


There are a lot more than this.  Probably in neighborhood of 40 lines all told.  I spent some time doing research and this appears to be something not terribly uncommon when compiling F/OSS on AIX.  Most of the instances appeared to involve either sshd or smb.  Unfortunately the most commonly cited solution (using the --disable-largefile to configure) won't work for compiling a Python module.  One suggestion I found that did help was to explicitly include some of the standard libraries in the .c file.  So I added:

#include<unistd.h>

#include<stdarg.h>

To heapsort.c.  That dramatically reduced the error messages.  Now I get:

compile options: '-Inumpy/core/include -Ibuild/src.aix-6.1-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/freeware/include/python2.7 -Ibuild/src.aix-6.1-2.7/numpy/core/src/multiarray -Ibuild/src.aix-6.1-2.7/numpy/core/src/umath -c'
xlc_r: build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.c
"/usr/include/stdio.h", line 528.12: 1506-343 (S) Redeclaration of fgetpos64 differs from previous declaration on line 323 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 528.12: 1506-377 (I) The type "long long*" of parameter 2 differs from the previous type "long* restrict".
"/usr/include/stdio.h", line 531.12: 1506-343 (S) Redeclaration of fseeko64 differs from previous declaration on line 471 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 531.12: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/stdio.h", line 532.12: 1506-343 (S) Redeclaration of fsetpos64 differs from previous declaration on line 325 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 532.12: 1506-377 (I) The type "const long long*" of parameter 2 differs from the previous type "const long*".
"/usr/include/stdio.h", line 533.16: 1506-343 (S) Redeclaration of ftello64 differs from previous declaration on line 472 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 533.16: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/stdio.h", line 528.12: 1506-343 (S) Redeclaration of fgetpos64 differs from previous declaration on line 323 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 528.12: 1506-377 (I) The type "long long*" of parameter 2 differs from the previous type "long* restrict".
"/usr/include/stdio.h", line 531.12: 1506-343 (S) Redeclaration of fseeko64 differs from previous declaration on line 471 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 531.12: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/stdio.h", line 532.12: 1506-343 (S) Redeclaration of fsetpos64 differs from previous declaration on line 325 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 532.12: 1506-377 (I) The type "const long long*" of parameter 2 differs from the previous type "const long*".
"/usr/include/stdio.h", line 533.16: 1506-343 (S) Redeclaration of ftello64 differs from previous declaration on line 472 of "/usr/include/stdio.h".
"/usr/include/stdio.h", line 533.16: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
error: Command "/usr/vac/bin/xlc_r -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -q32 -qbitfields=signed -qmaxmem=70000 -qalloca -bmaxdata:0x80000000 -Wl,-brtl -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DNDEBUG -O2 -Inumpy/core/include -Ibuild/src.aix-6.1-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/freeware/include/python2.7 -Ibuild/src.aix-6.1-2.7/numpy/core/src/multiarray -Ibuild/src.aix-6.1-2.7/numpy/core/src/umath -c build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.c -o build/temp.aix-6.1-2.7/build/src.aix-6.1-2.7/numpy/core/src/npysort/heapsort.o" failed with exit status 1

And that's all of them, and all related to stdio.h.  Unfortunately the obvious solution of explicitly including stdio.h didn't help.  It also seems really odd that I would have to explicitly include standard system libraries.  I'm hoping there some sort of solution to this that doesn't involve a massive amount of recoding.  Thanks in advance for your help!

Trevor



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130724/d8d78d28/attachment.html>


More information about the NumPy-Discussion mailing list