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

Cyd Haselton chaselton at gmail.com
Thu Feb 5 20:46:04 CET 2015


Also, if I've got the wrong list, please let me know.  Links to the
correct list/lists are optional; I just want to know if this is the
right place to get help so that I can keep searching if it isn't.

On Thu, Feb 5, 2015 at 5:40 AM, Cyd Haselton <chaselton at gmail.com> wrote:
> Since i'm working on an Android tablet, I am forwarding the original message
> I sent to python-dev instead of re-typing the entire thing.
>
> To summarize: I'm building in a fakechroot environment on Android that
> supports dynamic calls to libc only. Something in the importlib._bootstrap
> process is not linking to...or has not been linked to...the necessary
> libraries (I've checked the module...it is being linked to -lc -ldl) but I
> can't figure out what...as there's not a lot in the python docs on it.
>
> I'm currently reading through the importlib docs but any help would be
> greatly appreciated.
>
> ________________________________
> From: Eric Snow <ericsnowcurrently at gmail.com>
> Sent: February 3, 2015 12:10:54 AM CST
> To: Cyd Haselton <chaselton at gmail.com>
> Cc: Python-Dev <python-dev at python.org>
> Subject: Re: [Python-Dev] Import Fails in setup.py On Android
>
> On Mon, Feb 2, 2015 at 12:36 PM, Cyd Haselton <chaselton at gmail.com> wrote:
>>
>>  After fixing a segfault issue (many thanks Ryan) I'm back to the same
>> issue
>>  I was having with Python 2.7.8; the newly built python throws an
>> undefined
>>  reference to dlopen when running setup.py...specifically when importing
>>  just-built extensions
>>
>>  I've managed to narrow the problem down to the following line:
>>
>>  importlib._bootstrap._SpecMethods(spec).load()
>
>
> That call is where modules are created (and executed) via the loader
> designated for the module by the import machinery.  So a problem here
> may simply reflect a problem with the loader.  Which module is being
> imported when you run into trouble?  Is it a C-extension module?
>
> Also keep in mind that
> basically everything in importlib._bootstrap is
> frozen into your Python binary when you build Python (or should be).
> So if you are seeing any errors related to something missing or broken
> in importlib._bootstrap, it could be related to the build step where
> importlib gets frozen.
>
> Either way, more info (e.g. a traceback) would be great if you need more
> help.
>
> -eric
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the Mobile-sig mailing list