Problem with Android Build

Cyd Haselton chaselton at gmail.com
Tue Oct 21 14:12:58 EDT 2014


On Tue, Oct 21, 2014 at 12:36 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Wed, Oct 22, 2014 at 2:32 AM, Cyd Haselton <chaselton at gmail.com> 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
> --
> https://mail.python.org/mailman/listinfo/python-list

Thanks!

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/os.py", 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
--enable-shared
and
./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
RUNSHARED=  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/Python/src
which prevents the fakechroot environment from breaking

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

Any help would be appreciated!



More information about the Python-list mailing list