Ubuntu

ImportError: /usr/lib/libQtGui.so.4

Reported by VinsS on 2011-08-21
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Undecided
Unassigned

Bug Description

All applications using PyQt4 fails with the message :

ImportError: /usr/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

Reinstall python-qt4 don't change anything.

Ubuntu natty 11.04
Python 2.7.1-0ubuntu5
python-qt4 4.8.3.2

VinsS (vincent-vandevyvre) wrote :

Hi,

I update libqtcore4 and libqtgui4 from 4:4.7.2-0ubunt6.1 to4:4.7.2-0ubunt6.2 but, that's not solved the problem

Regards

Julian Taylor (jtaylor) wrote :

the symbol should be defined in QtCore:
# nm --dynamic /usr/lib/libQtCore.so.4 | grep heckWin
000000000016afd0 T _ZN14QObjectPrivate15checkWindowRoleEv

try reinstalling that packages:
sudo apt-get install --reinstall libqtcore4

VinsS (vincent-vandevyvre) wrote :

Hi Julian,

vincent@bacoudian:~$ sudo apt-get install --reinstall libqtcore4
[sudo] password for vincent:
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libqscintilla2-5 python-sip-dbg python-sip-dev freeglut3 python-opengl
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 0 o/1806 ko dans les archives.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
(Lecture de la base de données... 186327 fichiers et répertoires déjà installés.)
Préparation du remplacement de libqtcore4 4:4.7.2-0ubuntu6.2 (en utilisant .../libqtcore4_4%3a4.7.2-0ubuntu6.2_amd64.deb) ...
Dépaquetage de la mise à jour de libqtcore4 ...
Paramétrage de libqtcore4 (4:4.7.2-0ubuntu6.2) ...
Traitement des actions différées (« triggers ») pour « libc-bin »...
ldconfig deferred processing now taking place

vincent@bacoudian:~$ /usr/bin/bzr explorer
bzr: ERROR: exceptions.ImportError: /usr/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

I have also installed libqt4-dev, without changes.

Julian Taylor (jtaylor) wrote :

can you please post the output of:
nm --dynamic /usr/lib/libQtCore.so.4 | grep heckWin
and
ldd -r /usr/lib/libQtGui.so.4

VinsS (vincent-vandevyvre) wrote :
Download full text (4.3 KiB)

vincent@bacoudian:~$ nm --dynamic /usr/lib/libQtCore.so.4 | grep heckWin
vincent@bacoudian:~$

vincent@bacoudian:~$ ldd -r /usr/lib/libQtGui.so.4
 linux-vdso.so.1 => (0x00007ffff754f000)
 libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007f8bdabcb000)
 libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f8bda995000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8bda776000)
 libaudio.so.2 => /usr/lib/libaudio.so.2 (0x00007f8bda55d000)
 libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f8bda26e000)
 libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f8bda046000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8bd9e2e000)
 libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f8bd9b95000)
 libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f8bd9943000)
 libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f8bd973b000)
 libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f8bd9520000)
 libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f8bd930f000)
 libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f8bd9104000)
 libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f8bd8ef2000)
 libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8bd8bb7000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8bd88b1000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8bd862c000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8bd8415000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8bd8081000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8bd7e7d000)
 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8bd7c74000)
 libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f8bd7a4a000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f8bdbd2e000)
 libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007f8bd77e4000)
 libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8bd75e0000)
 libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8bd73a4000)
 libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f8bd719f000)
 libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f8bd6f99000)
 libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f8bd6d7d000)
 libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f8bd6b76000)
undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib16staticMetaObjectE (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib16hasPendingEventsEv (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib22registerSocketNotifierEP15QSocketNotifier (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib24unregisterSocketNotifierEP15QSocketNotifier (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib13registerTimerEiiP7QObject (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib15unregisterTimerEi (/usr/lib/libQtGui.so.4)
undefined symbol: _ZN20QEventDispatcherGlib16unregisterTimersEP7QObject (/usr/lib/libQtGui.so.4)
unde...

Read more...

Julian Taylor (jtaylor) wrote :

Strange, are you using the main ubuntu repositories or some other private one providing a broken qt package?
This package is fine:
https://launchpadlibrarian.net/74037884/libqtcore4_4.7.2-0ubuntu6.2_amd64.deb

$ md5sum libqtcore4_4.7.2-0ubuntu6.2_amd64.deb
9316a61423a66497b0b879f88831f80b libqtcore4_4.7.2-0ubuntu6.2_amd64.deb

$ dpkg -x libqtcore4_4.7.2-0ubuntu6.2_amd64.deb /tmp/qtcore4
$ nm --dynamic /tmp/qtcore4/usr/lib/libQtCore.so.4 | grep heckWin
000000000016afd0 T _ZN14QObjectPrivate15checkWindowRoleEv

$ ldd -r usr/lib/libQtCore.so.4 2>&1 | grep undef

please install the ok package:
wget https://launchpadlibrarian.net/74037884/libqtcore4_4.7.2-0ubuntu6.2_amd64.deb
sudo dpkg -i libqtcore4_4.7.2-0ubuntu6.2_amd64.deb
sudo apt-get install -f

VinsS (vincent-vandevyvre) wrote :

Done

2011-08-27 14:48:17 (737 KB/s) - «libqtcore4_4.7.2-0ubuntu6.2_amd64.deb» sauvegardé [1806044/1806044]

vincent@bacoudian:~$ sudo dpkg -i libqtcore4_4.7.2-0ubuntu6.2_amd64.deb
[sudo] password for vincent:
(Lecture de la base de données... 186431 fichiers et répertoires déjà installés.)
Préparation du remplacement de libqtcore4 4:4.7.2-0ubuntu6.2 (en utilisant libqtcore4_4.7.2-0ubuntu6.2_amd64.deb) ...
Dépaquetage de la mise à jour de libqtcore4 ...
Paramétrage de libqtcore4 (4:4.7.2-0ubuntu6.2) ...
Traitement des actions différées (« triggers ») pour « libc-bin »...
ldconfig deferred processing now taking place
vincent@bacoudian:~$ sudo apt-get install -f
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libqscintilla2-5 python-sip-dbg python-sip-dev freeglut3 python-opengl
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 4 non mis à jour.
vincent@bacoudian:~$ ldd -r /usr/lib/libQtCore.so.4 2>&1 | grep undef
vincent@bacoudian:~$ ldd -r /usr/lib/libQtCore.so.4 2>&1
 linux-vdso.so.1 => (0x00007fffbd04b000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff919efb000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff919ce3000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff919ade000)
 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff9198d6000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff9195d0000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff91934a000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff919134000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff918da0000)
 /lib64/ld-linux-x86-64.so.2 (0x00007ff91a5db000)

But don't works ...

vincent@bacoudian:~$ cd ~/oqapy-1-dev/oqapy-1.0/
vincent@bacoudian:~/oqapy-1-dev/oqapy-1.0$ python oqapy.py
Traceback (most recent call last):
  File "oqapy.py", line 44, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: /usr/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv
vincent@bacoudian:~/oqapy-1-dev/oqapy-1.0$

Now I'll remove all Qt packages and I'll reinstall.

VinsS (vincent-vandevyvre) wrote :

Not, a full reinstall don't change anything ...

vincent@bacoudian:~$ ldd -r /usr/lib/libQtCore.so.4 2>&1
 linux-vdso.so.1 => (0x00007fff5e9ff000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcd447d5000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcd445bd000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcd443b8000)
 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fcd441b0000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcd43eaa000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcd43c24000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcd43a0e000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcd4367a000)
 /lib64/ld-linux-x86-64.so.2 (0x00007fcd44eb5000)
vincent@bacoudian:~$ ldd -r /usr/lib/libQtCore.so.4 2>&1 | grep undef
vincent@bacoudian:~$
vincent@bacoudian:~$ bzr explorer
bzr: ERROR: exceptions.ImportError: /usr/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 924, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1124, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 711, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/explorer/lib/commands.py", line 144, in run
    from bzrlib.plugins.qbzr.lib import uifactory
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/qbzr/lib/uifactory.py", line 21, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: /usr/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

You can report this problem to Bazaar's developers by running
    apport-bug /var/crash/bzr.1000.2011-08-27T13:20.crash
if a bug-reporting window does not automatically appear.
vincent@bacoudian:~$

It's really strange, I have also a version 10.10 on this laptop with the package PyQt4 for Natty,
-cause this bug : https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/779371 -
and that's works fine.

Julian Taylor (jtaylor) wrote :

that ldd -r /usr/lib/libQtCore.so.4 shows no undefined symbols anymore means that it was broken before. probably other parts of your system are broken too.
maybe you have changed some library loading configuration and are using a still broken version for bzr explorer.
besides trying LD_LIBRARY_PATH=/usr/lib/libQtCore.so.4 bzr explorer I have no further ideas.

Julian Taylor (jtaylor) wrote :

LD_LIBRARY_PATH=/usr/lib/ bzr explorer I mean

VinsS (vincent-vandevyvre) wrote :

Yes, you're right, I don't know what nor why but it's something bad in my installation.

I've reinstall Ubuntu and that solve the problem.

Thanks Julian for your help

Vincent

IKT (ikt) on 2011-08-31
affects: ubuntu → qt4-x11 (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers