[PyQt] pyqtdeploy, Android and extensions

Robert Kent rob at gulon.co.uk
Mon Apr 11 12:38:55 BST 2016


If I run 'nm' on my applications output .so file then I can see that 
'PyMem_Free' is exported as an unmangled symbol, so why can the numpy 
.so being imported not find it during dlopen()?

Any one got any experience with this?

All help and suggestions appreciated.

Thanks, Rob

On 11/04/2016 11:45, Robert Kent wrote:
> Ok, so a kind of success! If I add HAVE_DYNAMIC_LOADING to pyconfig.h 
> then it loads the .so file... finally!
>
> However, it now complains that it can't find a symbol...
>
> ImportError:
>   dlopen failed: cannot locate symbol "PyMem_Free" referenced by 
> numpy.core.multiarray.so
>
> Any thoughts anyone?
>
> On 11/04/2016 10:41, Phil Thompson wrote:
>> On 11 Apr 2016, at 10:31 am, Robert Kent <rob at gulon.co.uk> wrote:
>>> I definitely went back and re-compiled Python on Friday to ensure I 
>>> had used this switch... Which defines etc. should be set by this 
>>> flag to allow C extension loading?
>> It should define HAVE_DYNAMIC_LOADING and also cause dynload_shlib.c 
>> to be compiled and linked.
>>
>> Phil
>>
>>> On 11/04/2016 10:28, Phil Thompson wrote:
>>>> On 11 Apr 2016, at 10:22 am, Robert Kent <rob at gulon.co.uk> wrote:
>>>>> Hi Phil,
>>>>>
>>>>> Sorry to bump a thread, but anyone got any more ideas re. cause or 
>>>>> anything else I can attempt? Why would it be that python (imp) 
>>>>> doesn't know how to load C extensions as the traceback implies? 
>>>>> Are there any defines that need changing in pyconfig for example 
>>>>> to allow this?
>>>> Yes, but this should be taken care of when using 
>>>> --enable-dynamic-loading with pyqtdeploycli.
>>>>
>>>> Phil
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list