# Re: Python errors running flowgraph - first attempt

**URL:** <https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126>\
**Category:** GNU Radio\
**Created:** [February 8, 2015, 8:18pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126 "2015-02-08T20:18:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [February 8, 2015, 8:18pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/1 "2015-02-08T20:18:16Z")

</div>

Hello:

Just chiming in with the fact that I am struggling with this identical  
issue using a “Dizzy” build for an Ettus E310 running on the device.

I have tried a number of different example flowgraphs that utilize QT  
GUI  
and have come up with the exact same error

File "/usr/lib/pyhon2.7/site-packages/PyQt4/Qt.py, line 3, in   
from  
pyQt4.QTDeclarativeImport \*  
ImportError : /usr/lib/python2.7/site-packages/PyQt4/QtDEclarative.so:  
undefined symbol: \_ZTI16QTDeclarativeView

Any insights are always welcomed.

---

<div class="post-metadata">

**Author:** ![larryj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e480ec/32.png) [@larryj](https://www.ruby-forum.com/u/larryj)\
**Post date:** [February 9, 2015, 11:01am UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/2 "2015-02-09T11:01:30Z")

</div>

On Sun, Feb 8, 2015 at 2:17 PM, Larry Van Der J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ImportError : /usr/lib/python2.7/site-packages/PyQt4/QtDEclarative.so:  
> undefined symbol: \_ZTI16QTDeclarativeView
> 
> Any insights are always welcomed.

I’ve done some further investigating on this issue, though I do not  
know it’s root cause. I worked around the issue by loading the  
library(s) containing the missing symbols using LD\_PRELOAD. It might  
be because you simply don’t have the package containing  
QTDeclarativeView installed. It comes from the QtDeclarative module  
of Qt, and you should have a library named something like:  
“libQtDeclarative.so\*”

You can find those symbols using readelf on your system. If you are  
on an embedded system, you’ll need to use your embedded version of  
readelf:

$ readelf -s /usr/lib64/libQtDeclarative.so.4.8.5 (change names/paths  
to match your system)

In my case, I have the modules but my python app is not finding them.  
Much more work ahead of me! 😉

Regards,

Chris

---

<div class="post-metadata">

**Author:** ![larryj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e480ec/32.png) [@larryj](https://www.ruby-forum.com/u/larryj)\
**Post date:** [February 27, 2015, 6:13pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/3 "2015-02-27T18:13:20Z")

</div>

Sorry that I have no insight into this right now, but I wanted to follow  
up  
and see if there was any progress made on this problem?

Tom

On Mon, Feb 9, 2015 at 11:28 AM, Larry Van Der J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![larryj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e480ec/32.png) [@larryj](https://www.ruby-forum.com/u/larryj)\
**Post date:** [February 27, 2015, 9:08pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/4 "2015-02-27T21:08:24Z")

</div>

Hi …

If you run GRC on the E310 with:

LD\_PRELOAD="/usr/lib/libQtDeclarative.so.4.8.6  
/usr/lib/libQtSvg.so.4.8.6  
/usr/lib/libQtXml.so.4.8.6 /usr/lib/libQtWebKit.so.4.9.4"  
gnuradio-companion

You are able to get to the point where the problem is an unavailablity  
of  
PYQty4.Qwt5 as Qwt  
ImportError: no module named Qwt5 …

As we speak I am trying to examine if I can cross compile The missing  
module and install it on the target device to get things to proceed  
further.

Thanks for your interest.

LVDJ

---

<div class="post-metadata">

**Author:** ![larryj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e480ec/32.png) [@larryj](https://www.ruby-forum.com/u/larryj)\
**Post date:** [February 9, 2015, 5:30pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/5 "2015-02-09T17:30:04Z")

</div>

Thanks:

The info Chris sent along has helped to move this along although at this  
point I still don’t have a solution or a root cause.

The library that issues the error message is  
/usr/lib/python2.7/site-packages/PyQt4/QtDeclarative.so and the symbol  
it  
complains about is \_ZTI16QDeclarativeView

When you Readelf this file you find:

Dynamic section at offset 0x40728 contains 29 entries:  
Tag Type Name/Value  
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]  
0x00000001 (NEEDED) Shared library:  
[libQtCore.so.4]  
0x00000001 (NEEDED) Shared library:  
[libstdc++.so.6]  
0x00000001 (NEEDED) Shared library: [libgcc\_s.so.1]  
0x00000001 (NEEDED) Shared library: [libc.so.6]  
0x0000000e (SONAME) Library soname:  
[libQtDeclarative.so.1]

and

00040128 0000b202 R\_ARM\_ABS32 00000000 \_ZTI16QDeclarativeView

and

178: 00000000 0 NOTYPE GLOBAL DEFAULT UND  
\_ZTI16QDeclarativeView

There is also a library in /usr/lib that is libQtDeclarative.so.4.8.6  
that  
has symbolic links to it named libQtDeclarative.so, .so.4 and .so.4.8.  
I  
though that if I added one for libQtDeclarative.so.1 this might fix the  
issue, but it did not.

When you readelf libQtDeclarative.so.4.8.6 you find:

Dynamic section at offset 0x2ce040 contains 34 entries:  
Tag Type Name/Value  
0x00000001 (NEEDED) Shared library:  
[libQtScript.so.4]  
0x00000001 (NEEDED) Shared library: [libQtSql.so.4]  
0x00000001 (NEEDED) Shared library:  
[libQtXmlPatterns.so.4]  
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]  
0x00000001 (NEEDED) Shared library:  
[libQtNetwork.so.4]  
0x00000001 (NEEDED) Shared library: [libQtCore.so.4]  
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]  
0x00000001 (NEEDED) Shared library: [libm.so.6]  
0x00000001 (NEEDED) Shared library: [libgcc\_s.so.1]  
0x00000001 (NEEDED) Shared library: [libc.so.6]  
0x0000000e (SONAME) Library soname:  
[libQtDeclarative.so.4]

and

002d0c94 0009ef02 R\_ARM\_ABS32 002d0c80 \_ZTI16QDeclarativeView  
002d0d8c 0009ef02 R\_ARM\_ABS32 002d0c80 \_ZTI16QDeclarativeView

and

2543: 002d0c80 12 OBJECT GLOBAL DEFAULT 20 \_ZTI16QDeclarativeView

I also tried copying /usr/lib/libQtDeclarative.so.4.8.6 to the  
/usr/lib/python2.7/site-packages/pyQt4 directory as  
libQtDeclarative.so.1  
to no avail.

I tried calling gnuradio-companion with  
LD\_PRELOAD=/usr/lib/libQtDeclarative.so.4.8.6  
gnuradio-companion and this let the process proceed a little further  
this  
time the undefined symbol is in line 11 of QT.py in QTSvg.so and is  
\_ZTI10QSvgWidget.

I will keep drilling down on this, but thought I might post first just  
in  
case someone recognizes the real issue and perhaps it can be fixed with  
a  
simple adjustment to the environment.

With respect to the concept that GRC is not really something to run on  
the  
embedded processor, that’s surely valid, but unless I do not understand  
how  
these pieces work, if the QT GUI can run you can’t get graphical  
elements  
to work even in the produced Python code and that seriously reduces the  
utility of the embedded device.

All comments and direction are appreciated.

LVDJ

---

<div class="post-metadata">

**Author:** ![larryj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e480ec/32.png) [@larryj](https://www.ruby-forum.com/u/larryj)\
**Post date:** [March 1, 2015, 4:15pm UTC](https://www.ruby-forum.com/t/re-python-errors-running-flowgraph-first-attempt/234126/6 "2015-03-01T16:15:03Z")

</div>

I never had time to make progress on Qwt so I just removed the Qwt  
widgets from my flow graph and used other ones. Hoping to find time  
this week to work on a PyQwt recipe for OE, not sure what other things  
on my schedule might thwart those plans 😉

No guarantees that even if I manage to get Qwt built, it won’t have  
runtime issues. I’m a python newbie, too!

I built a dizzy-based image and I now have gqrx and my FM broadcast  
tutorial running on my embedded x86\_64 target. Need to find time to  
make more progress on the project soon!

-Chris

On Fri, Feb 27, 2015 at 12:11 PM, Tom R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Tag Type Name/Value  
> > 00040128 0000b202 R\_ARM\_ABS32 00000000 \_ZTI16QDeclarativeView  
> > When you readelf libQtDeclarative.so.4.8.6 you find:  
> > 0x00000001 (NEEDED) Shared library: [libQtCore.so.4]  
> > 002d0d8c 0009ef02 R\_ARM\_ABS32 002d0c80 \_ZTI16QDeclarativeView  
> > LD\_PRELOAD=/usr/lib/libQtDeclarative.so.4.8.6 gnuradio-companion and this  
> > work even in the produced Python code and that seriously reduces the utility
> > 
> > * * *
> > 
> > Discuss-gnuradio mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
Life is like Linux - it never stands still.
