This is a follow up of #36141, I'm trying to build python for android armv7a. The problem was the configure script fails to find pthread_create in the android headers. Now after getting past the configuration, I get a build error: armv7a-linux-androideabi16-clang -c -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -DPy_BUILD_CORE -o Python/pytime.oPython/pytime.cPython/pytime.c:911:9: error: implicit declaration of function 'pytime_fromtimespec' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pytime_fromtimespec(tp, &ts, raise) < 0) { ^ Python/pytime.c:911:9: note: did you mean 'pytime_fromtimeval'? Python/pytime.c:336:1: note: 'pytime_fromtimeval' declared here pytime_fromtimeval(_PyTime_t *tp, struct timeval *tv, int raise) ^ Python/pytime.c:911:9: warning: this function declaration is not a prototype [-Wstrict-prototypes] if (pytime_fromtimespec(tp, &ts, raise) < 0) { ^ The declaration for pytime_fromtimespec needs the token HAVE_CLOCK_GETTIME to be defined to 1, which isn't the case (as per pyconfig.h). I checked the android headers and time.h seems to have the necessary function for this token. I uploaded pyconfig.h for reference (attached).
There is a bug in the implementation of pymonotonic() in Python/pytime.c: The call to pytime_fromtimespec() is not encapsulated by an #ifdef HAVE_CLOCK_GETTIME. @muhzi It seems that your pyconfig.h is generated with configure failing to find the NDK headers.