[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] pyqtdeploy: include C-extension with multiple source files
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2016-07-20 16:26:38
Message-ID: 24B335CF-8764-48D1-B045-4E1608080A16 () riverbankcomputing ! com
[Download RAW message or body]

On 20 Jul 2016, at 3:00 pm, Thijs Triemstra <lists@collab.nl> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 16-07-16 17:26, Phil Thompson wrote:
> > 
> > You need to build it externally and tell pyqtdeploy about the
> > static library.
> > 
> > Phil
> > 
> 
> Thanks for the reply Phil. Finally managed to cross-compile Python for
> ARM so I could built an ARM version of the C-extension. This produced
> an .so file but when I try to load the .so dynamically from my
> application binary it throws errors like:
> 
> File ":/foo/ui/__init__.py", line 100, in main
> File "bootstrap.py", line 969, in _find_and_load
> File "bootstrap.py", line 958, in _find_and_load_unlocked
> File "bootstrap.py", line 664, in _load_unlocked
> File "bootstrap.py", line 634, in _load_backward_compatible
> File ":/RPi/GPIO/__init__.py", line 23, in <module>
> File "bootstrap.py", line 969, in _find_and_load
> File "bootstrap.py", line 958, in _find_and_load_unlocked
> File "bootstrap.py", line 664, in _load_unlocked
> File "bootstrap.py", line 634, in _load_backward_compatible
> File ":/imp.py", line 242, in load_module
> File ":/imp.py", line 342, in load_dynamic
> File "bootstrap.py", line 693, in _load
> File "bootstrap.py", line 666, in _load_unlocked
> File "bootstrap.py", line 577, in module_from_spec
> File "bootstrap_external.py", line 903, in create_module
> File "bootstrap.py", line 222, in _call_with_frames_removed
> Uncaught exception <class 'ImportError'>: /opt/foo-pi/RPi._GPIO.so:
> undefined symbol: PyArg_ParseTupleAndKeywords
> 
> Any idea? How do I tell pyqtdeploy about the static library?

You've compiled the C extension as a dynamically loaded module, not a static library. \
Your Python build needs to support the loading of dynamic modules and make the \
symbols visble to those modules.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic