I was asked to assist with some problems with a "pip install numpy" and - maybe I am barking up the wrong tree. However, in the thread https://github.com/numpy/numpy/issues/8118
in short, if "python" is responsible for providing the -D flags "extensions" receive during the pip build process - the -D_LARGE_FILES also needs to be provided for AIX.
DETAILS...
you can see the complete command "pip build|install" reports as creating an error at the URL above - here is the critical part.
xlc_r -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/buildaix/includes -DNDEBUG -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ...
The key error is several of this form:
"/usr/include/unistd.h", line 921.25: 1506-343 (S) Redeclaration of fclear64 differs from previous declaration on line 918 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 921.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 921.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 922.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 919 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 922.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
with the include file:
Excerpt:
+914 #ifdef _LARGE_FILES
+915 #define fclear fclear64
+916 #define fsync_range fsync_range64
+917 #endif
+918 extern off_t fclear(int, off_t);
+919 extern int fsync_range(int, int, off_t, off_t);
+920 #ifdef _LARGE_FILE_API
+921 extern off64_t fclear64(int, off64_t);
+922 extern int fsync_range64(int, int, off64_t, off64_t);
+923 #endif
After adding
# export CFLAGS="-D_LARGE_FILES"
pip install completes without any error messages
(the command becomes):
xlc_r -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/buildaix/includes -DNDEBUG -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ...
|