Chi Hsuan Yen added the comment:

Got the same issue here on building Python for Android. See 
https://circleci.com/gh/yan12125/python3-android/11 for an example build log. 
/usr/include is erroneously included and leads to build failures:

building 'xxlimited' extension
/home/ubuntu/android-ndk-r13/toolchains/llvm/prebuilt/linux-x86_64/bin/clang 
-target aarch64-none-linux-android -gcc-toolchain 
/home/ubuntu/android-ndk-r13/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64
 --sysroot=/home/ubuntu/android-ndk-r13/platforms/android-21/arch-arm64/usr 
-fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes -fPIE -fno-integrated-as -fPIE -fno-integrated-as 
-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -DPy_LIMITED_API=0x03050000 -I../Include 
-I/usr/include -IObjects -IPython -I. 
-I/home/ubuntu/python3-android/build/21-aarch64-linux-android-4.9/usr/include 
-I/home/ubuntu/python3-android/src/cpython/Include 
-I/home/ubuntu/python3-android/src/cpython/build-target -c 
/home/ubuntu/python3-android/src/cpython/Modules/xxlimited.c -o 
build/temp.linux-aarch64-3.7/home/ubuntu/python3-android/src/cpython/Modules/xxlimited.o
In file included from 
/home/ubuntu/python3-android/src/cpython/Modules/xxlimited.c:17:
In file included from ../Include/Python.h:11:
In file included from /usr/include/limits.h:25:
/usr/include/features.h:398:10: fatal error: 'gnu/stubs.h' file not found
#include <gnu/stubs.h>
         ^
1 error generated.

The patch looks reasonable and still applies to the default branch. With this 
patch the build is fine: https://circleci.com/gh/yan12125/python3-android/12

----------
nosy: +Chi Hsuan Yen

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20211>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to