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.

Author muhzi
Recipients Alex.Willmer, muhzi, xdegaye
Date 2019-03-01.22:00:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551477618.88.0.818331245279.issue36162@roundup.psfhosted.org>
In-reply-to
Content
I encountered yet another issue with cross compilation on android, it so happens that these errors occur only when I cross compile for non 64-bit archs. i.e. I could cross compile just fine for arm64 & x86_64 but the 32-bit version of these archs produces the following error during compilation:

./Modules/posixmodule.c:8457:19: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            ret = sendfile(out, in, NULL, count);
                  ^
./Modules/posixmodule.c:8457:19: warning: this function declaration is not a prototype [-Wstrict-prototypes]
./Modules/posixmodule.c:8470:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(out, in, &offset, count);
              ^
./Modules/posixmodule.c:9057:14: error: implicit declaration of function 'truncate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    result = truncate(path->narrow, length);
             ^
./Modules/posixmodule.c:9057:14: note: did you mean 'ftruncate'?
/home/muhzi/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/unistd.h:220:5: note: 'ftruncate' declared here
int ftruncate(int __fd, off_t __length) __RENAME(ftruncate64) __INTRODUCED_IN(12);
    ^
./Modules/posixmodule.c:9057:14: warning: this function declaration is not a prototype [-Wstrict-prototypes]
    result = truncate(path->narrow, length);


I attached pyconfig.h for reference, it seems that the configuration step went fine. I checked that these missing functions are able to have their corresponding headers included. Also figured after misplacing some include lines in posixmodule.c that when the preprocessor includes Python.h it fails to include definitions from successively included headers.
History
Date User Action Args
2019-03-01 22:00:18muhzisetrecipients: + muhzi, xdegaye, Alex.Willmer
2019-03-01 22:00:18muhzisetmessageid: <1551477618.88.0.818331245279.issue36162@roundup.psfhosted.org>
2019-03-01 22:00:18muhzilinkissue36162 messages
2019-03-01 22:00:18muhzicreate