[Python-Dev] Cross compiling Python (for Android)
Stefan Krah
stefankrah at freenet.de
Sun Oct 26 12:37:54 CET 2014
Frank, Matthew I <matthew.i.frank <at> intel.com> writes:
> 4. Module _decimal is failing to compile. The problem is that it has
> a header called memory.h. Android's libc has the problem that
> /usr/include/stdlib.h includes <memory.h>. But the build system
> puts -I. on the include path before the system dirs (as it should)
> so when compiling _decimal, Modules/_decimal/libmpdec/memory.h gets
> found instead of /usr/include/memory.h. Shiz has a patch here:
>
https://github.com/rave-engine/python3-android/blob/master/mk/python/3.3.5/p\
> ython-3.3.5-android-libmpdec.patch
> (which renames memory.h -> mpmemory.h) but I don't know
>
> a. Is there a tracker for this yet? and
> b. Is Shiz's fix the desired one or should I be looking for
> another approach? (Maybe modifying the -I flags for the build
> of just the build of _decimal or something?)
I think using "memory.h" in an application is standard conforming.
Since _decimal compiles on all other Linux platforms, it may be worth
reporting this to the Android developers and see if they can fix it
(possibly by not including memory.h in stdlib.h).
FWIW, OCaml also has a "memory.h" header.
Stefan Krah
More information about the Python-Dev
mailing list