[Mobile-sig] [Python-Dev] Import Fails in setup.py On Android

Cyd Haselton chaselton at gmail.com
Thu Feb 19 01:56:13 CET 2015


Update:
After several edits to Setup and make clean && make, I've finally got the interactive help() mostly working.

The keywords, topics and symbols work.  The modules <string> segfaults python but addr2line has narrowed it down to unicodemodule.c:9052, so I have an idea of where to start.

On February 18, 2015 6:12:47 AM CST, Cyd Haselton <chaselton at gmail.com> wrote:
>
>
>*snip*
>
>>>If I'm correct, the problem here is with Android's broken dlopen(). 
>>On
>>>Linux (and every other Unix I'm aware of) when Executable A links B
>>>then tries to dlopen C, if C needs to access symbols from B it just
>>>succeeds (whether or not you linked C with "-lB".)  On Android you
>>>_must_ link C against "-lB" for this to work.  This is a known bug in
>>>Android's loader and won't be fixed, because the supposed security
>>>advantages of not accidentally linking something you didn't mean to
>>>link supposedly outweigh the disadvantages of not being able to
>>>correctly compile linux packages for Android.
>>
>>I can vaguely understand this rational, given Android is not Linux and
>>wasn't really designed to be used in the way I'm attempting, but it
>>doesn't make it any less annoying.
>>>
>>>I ran into only a few instances of these when getting Python 3.4 to
>>>cross compile to Android, and none with missing -lpython3 flags (most
>>>were missing -lm flags).  But I'm not running setup.py on the Android
>>>side.  I'm running on it the Linux host (using the Python interpreter
>>>on the Linux host.)
>>>
>>>-Matt
>
>Same error again, but I think I know what the problem was this time.
>I've added 'python3.4m' to sys_libs in setup.py...which should link it
>to the extension modules built by setup.py.
>
>I'll report back after this build is complete.
>
>Regarding the comments about Android's broken dlopen...I'm beginning to
>wonder if an Android device can really be a development/learning
>platform...even in a simulated Linux filesystem app like the one I am
>using.
>
>I've seen a few things about bootstrapping(?) other Linux distros from
>an Android device...it may be time to investigate further in that area.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the Mobile-sig mailing list