This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: -D_LARGE_FILES not exported to modules (for AIX)
Type: behavior Stage:
Components: Extension Modules Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt
Priority: normal Keywords:

Created on 2016-10-05 13:19 by Michael.Felt, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg278124 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-10-05 13:19
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 ...
msg278144 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-10-05 18:52
Now they notice the defines are coming from their project.

closing...
History
Date User Action Args
2022-04-11 14:58:37adminsetgithub: 72549
2016-10-05 18:52:24Michael.Feltsetstatus: open -> closed
resolution: third party
messages: + msg278144
2016-10-05 13:19:07Michael.Feltcreate