Project

General

Profile

Qub wiki subpage

Added by Savko, Martin over 9 years ago

Hi all,

I have put together a brief description of problems (and solutions) encountered while trying to get working qttools.so from Qub/CTools/qttools.

The page is linked from the Wiki general page, section "Documentation (How-Tos, Manuals, Specs)"

direct link is https://forge.epn-campus.eu/projects/mxcube/wiki/Qub_problems

Cheers,
Martin


Replies (2)

RE: Qub wiki subpage - Added by Guijarro, Matias over 9 years ago

Hi all,

Hopefully the Qub qttools compilation problem Martin experienced is
solved now :)

qttools will now compile directly with setup.py, too.

I updated the git repository on the two main branches (master and v2),
feel free to give it a try.

Please report any problem you might have, so we can react on it and
give some help :)

Cheers,
Matias.

RE: Qub wiki subpage - Added by Savko, Martin over 9 years ago

Hi Matias,

nice solution to the qvariant.h problem!

There is still a little problem with compilation of qttools using setup.py though. Everything compiles fine but, resulting library misses some essential symbols

$ ldd -r qttools.so
    linux-gate.so.1 =>  (0xb7758000)
    libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0xb6fae000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6ec9000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6eaa000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb6e8f000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6ce5000)
    libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb6cb1000)
    libaudio.so.2 => /usr/lib/i386-linux-gnu/libaudio.so.2 (0xb6c98000)
    libjpeg.so.8 => /usr/lib/i386-linux-gnu/libjpeg.so.8 (0xb6c40000)
    libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb6c16000)
    libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6c00000)
    libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb6bf0000)
    libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb6be6000)
    libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xb6bdc000)
    libXcursor.so.1 => /usr/lib/i386-linux-gnu/libXcursor.so.1 (0xb6bd1000)
    libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xb6bcd000)
    libXft.so.2 => /usr/lib/i386-linux-gnu/libXft.so.2 (0xb6bb7000)
    libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb6b1d000)
    libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb6b0a000)
    libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb69d6000)
    libSM.so.6 => /usr/lib/i386-linux-gnu/libSM.so.6 (0xb69cd000)
    libICE.so.6 => /usr/lib/i386-linux-gnu/libICE.so.6 (0xb69b3000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb69ae000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6981000)
    /lib/ld-linux.so.2 (0xb7759000)
    libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb6957000)
    libXt.so.6 => /usr/lib/i386-linux-gnu/libXt.so.6 (0xb68fb000)
    libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb68f7000)
    libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb68f0000)
    libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb68cf000)
    libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xb68c9000)
    libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb68c2000)
undefined symbol: _ZTI17QtXEmbedContainer    (./qttools.so)
undefined symbol: _ZNK17QtXEmbedContainer9classNameEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer7qt_castEPKc    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer9qt_invokeEiP8QUObject    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer7qt_emitEiP8QUObject    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer11qt_propertyEiiP8QVariant    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer8x11EventEP7_XEvent    (./qttools.so)
undefined symbol: _ZTI14QtXEmbedClient    (./qttools.so)
undefined symbol: _ZNK14QtXEmbedClient9classNameEv    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient7qt_castEPKc    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient9qt_invokeEiP8QUObject    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient7qt_emitEiP8QUObject    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient11qt_propertyEiiP8QVariant    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient8x11EventEP7_XEvent    (./qttools.so)
undefined symbol: PyCapsule_Type    (./qttools.so)
undefined symbol: _Py_NoneStruct    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient16staticMetaObjectEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer9checkGrabEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer16moveInputToProxyEv    (./qttools.so)
undefined symbol: _ZNK8QubImage4copyERK5QRect    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient8embeddedEv    (./qttools.so)
undefined symbol: PyDict_GetItemString    (./qttools.so)
undefined symbol: _ZNK8QubImage4copyEiiiii    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainerC2EP7QWidgetPKc    (./qttools.so)
undefined symbol: PyModule_GetDict    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient15containerClosedEv    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient11setEmbeddedEv    (./qttools.so)
undefined symbol: Py_InitModule4    (./qttools.so)
undefined symbol: _ZNK17QtXEmbedContainer15minimumSizeHintEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer12acceptClientEm    (./qttools.so)
undefined symbol: _ZN8QubImage7setGrayEiiii    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient9embedIntoEm    (./qttools.so)
undefined symbol: PyImport_ImportModule    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer11eventFilterEP7QObjectP6QEvent    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClientD2Ev    (./qttools.so)
undefined symbol: _ZN8QubImageC1ENS_7rawTypeEiiPKc    (./qttools.so)
undefined symbol: _ZNK17QtXEmbedContainer10isEmbeddedEv    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient5errorEi    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer5errorEi    (./qttools.so)
undefined symbol: _ZN8QubImage14highlightImageEiiii    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer9showEventEP10QShowEvent    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer12rejectClientEm    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainerD2Ev    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer13discardClientEv    (./qttools.so)
undefined symbol: _ZNK8QubImage4copyEv    (./qttools.so)
undefined symbol: PyCapsule_GetPointer    (./qttools.so)
undefined symbol: _ZNK14QtXEmbedClient14containerWinIdEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer5embedEmb    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClient11eventFilterEP7QObjectP6QEvent    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer9hideEventEP10QHideEvent    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer11resizeEventEP12QResizeEvent    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer16staticMetaObjectEv    (./qttools.so)
undefined symbol: _ZNK17QtXEmbedContainer19topLevelParentWinIdEv    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer16clientIsEmbeddedEv    (./qttools.so)
undefined symbol: _ZN8QubImage5eraseEiiii    (./qttools.so)
undefined symbol: _ZN8QubImage16unhighlightImageEiiii    (./qttools.so)
undefined symbol: _ZNK17QtXEmbedContainer11clientWinIdEv    (./qttools.so)
undefined symbol: PyLong_FromUnsignedLong    (./qttools.so)
undefined symbol: PyInt_FromLong    (./qttools.so)
undefined symbol: _ZN17QtXEmbedContainer12clientClosedEv    (./qttools.so)
undefined symbol: _ZN14QtXEmbedClientC2EP7QWidgetPKc    (./qttools.so)
undefined symbol: PyBool_FromLong    (./qttools.so)

first there is problem with python linking ( I wonder wether it's just my problem, or it is really necessary to explicitly add -lpython2.x to appropriate variable in setup.py ), but the more important problem are other missing symbols: _ZTI17QtXEmbedContainer et al.

That problem is due to one missing file, namely moc_qtxembed.cpp. That file is not present by default in CTools/qttools subdirectory. It has to be generated on the fly. How it is done can be seen in the configure.py in the CTools/qttools.

Please find three patches in the attachment that should take care of the remaining problems. Patch no 1. updates qttools' configure.py and clean.py to be aware of changes from qttools.sip to two new files qttools_qt3.sip and qttools_qt4.sip. Patch no 2. takes care of building moc_qtxembed.cpp file during build and patch no 3. solves my problem with missing python symbols.

For the patch no. 3, I suspect there might be a more elegant solution but I did not find one yet.

Cheers,
Martin

    (1-2/2)