Problem with Android Build

Cyd Haselton chaselton at
Tue Oct 21 20:12:58 CEST 2014

On Tue, Oct 21, 2014 at 12:36 PM, Chris Angelico <rosuav at> wrote:
> On Wed, Oct 22, 2014 at 2:32 AM, Cyd Haselton <chaselton at> wrote:
>> Hello,
>> If I have a problem with building Python on an Android device, would
>> this be the list to post it to, or should I post it to python-help or
>> python-dev?
> Hi!
> Start here. If we can't help, python-dev might be the next place to
> ask, but this is the best first option.
> ChrisA
> --


I'm building Python v2.7.8 on my Android device in a fakechroot
environment with GCC 4.8.0 and make fails with the following error

Could not import runpy module

Running the Makefile command (minus the LD_LIBRARY_PATH prepend)
produces the same error, but running the same command minus the -S
returns a
File "..Lib/", line 117, in <module>
raise ImportError, 'no os specific module found'

I've configured with
./configure --prefix=/usr/python --build=arm-linux-androideabi
--host=arm-linux-androideabi --target=arm-linux-androideabi
./configure --prefix=/usr/python
with the same results.

The two post-configure makefile edits I've added are:
LDFLAGS=    -Wl,--allow-shlib-undefined
which allows make to continue past an 'undefined reference to sincos' and
which prevents the fakechroot environment from breaking

I've also commented out the initpwd references in
Android doesn't do passwords per se.

Any help would be appreciated!

More information about the Python-list mailing list