[PyQt] undefined symbol: _ZTI16QDeclarativeView

Chris Hallinan challinan at gmail.com
Mon Feb 9 08:54:50 GMT 2015


I have an embedded target running Qt5.  I've compiled and installed
PyQt4 using an OpenEmbedded-based build system.  Running my
application, I get this error:

Traceback (most recent call last):
  File "./my_gui.py", line 19, in <module>
    from PyQt4 import Qt
  File "/usr/lib64/python2.7/site-packages/PyQt4/Qt.py", line 2, in <module>
    from PyQt4.QtDeclarative import *

ImportError: /usr/lib64/python2.7/site-packages/PyQt4/QtDeclarative.so:
undefined symbol: _ZTI16QDeclarativeView

But the symbol is actually present in the QtDeclarative.so.5.2.1
library as well as the 4.8.5 version:

# readelf -s /usr/lib64/libQtDeclarative.so.5.2.1 | grep -w
_ZTI16QDeclarativeView
  2550: 00000000005956f0    24 OBJECT  WEAK   DEFAULT   19
_ZTI16QDeclarativeView

# readelf -s libQtDeclarative.so.4.8.5 | grep -w _ZTI16QDeclarativeView
  2550: 00000000005956f0    24 OBJECT  WEAK   DEFAULT   19
_ZTI16QDeclarativeView

And I have symlinks as follows:

# ls -l /usr/lib64/libQ*Declarative.so*
lrwxrwxrwx    1 root     root            26 Feb  9 03:15
/usr/lib64/libQt5Declarative.so.5 -> libQt5Declarative.so.5.2.1
lrwxrwxrwx    1 root     root            26 Feb  9 03:15
/usr/lib64/libQt5Declarative.so.5.2 -> libQt5Declarative.so.5.2.1
-rwxr-xr-x    1 root     root       3661096 Sep  5 11:22
/usr/lib64/libQt5Declarative.so.5.2.1
lrwxrwxrwx    1 root     root            25 Feb  9 03:16
/usr/lib64/libQtDeclarative.so -> libQtDeclarative.so.4.8.5
lrwxrwxrwx    1 root     root            25 Feb  9 03:16
/usr/lib64/libQtDeclarative.so.4 -> libQtDeclarative.so.4.8.5
lrwxrwxrwx    1 root     root            25 Feb  9 03:16
/usr/lib64/libQtDeclarative.so.4.8 -> libQtDeclarative.so.4.8.5
-rwxr-xr-x    1 root     root       3824040 Feb  8 10:11
/usr/lib64/libQtDeclarative.so.4.8.5

Can anyone shed some light on the issue I'm having?  Writing this
e-mail, I realize I have two versions of this libQtDeclarative.  Could
this be part of the issue?

Many thanks in advance.

Chris

-- 
Life is like Linux - it never stands still.


More information about the PyQt mailing list