[PyQt] PyQt snapshot debug info
Phil Thompson
phil at riverbankcomputing.com
Tue Dec 7 17:21:16 GMT 2010
On Mon, 6 Dec 2010 21:57:15 +0100, "Hans-Peter Jansen" <hpj at urpla.net>
wrote:
> Phil,
>
> sorry for being such a pest. This is the third time, I started with
> creating a bug report against rpm, but each time I noticed something
> that points in your direction.
>
> On Monday 06 December 2010, 18:01:27 Phil Thompson wrote:
>> On Mon, 6 Dec 2010 14:59:11 +0100, "Hans-Peter Jansen"
>> <hpj at urpla.net>
>>
>> >> >
>> >> > Before I start to dig, do you have any idea, what might have
>> >> > changed to result in this behavior?
>> >>
>> >> I can't think of any changes in the build system that might have
>> >> caused it.
>> >>
>> >> The only thing related to source files that has changed is that
>> >> SIP now generates full pathnames for #line.
>> >
>> > Hmm, that's probably the problem, as you don't always use absolute
>> > names.
>> >
>> > QtCore/sipQtCoreQAbstractAnimation.cpp:
>> >
>> > #line 38
>>
>> "/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip
>>/QtCore/qabstractanimation.sip"
>>
>> > #include <qabstractanimation.h>
>> > #line 39 "QtCore/sipQtCoreQAbstractAnimation.cpp"
>> > ^^^^^^
>> > #line 39
>>
>> "/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip
>>/QtCore/qobject.sip"
>>
>> > #include <qobject.h>
>> > #line 43 "QtCore/sipQtCoreQAbstractAnimation.cpp"
>> > #line 36
>>
>> "/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip
>>/QtCore/qcoreevent.sip"
>>
>> > #include <qcoreevent.h>
>> > #line 46 "QtCore/sipQtCoreQAbstractAnimation.cpp"
>> > #line 38
>>
>> "/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip
>>/QtCore/qanimationgroup.sip"
>>
>> > #include <qanimationgroup.h>
>> > #line 49 "QtCore/sipQtCoreQAbstractAnimation.cpp"
>> > #line 315
>>
>> "/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip
>>/QtCore/qcoreevent.sip"
>>
>> > #include <qcoreevent.h>
>> > #line 52 "QtCore/sipQtCoreQAbstractAnimation.cpp"
>> >
>> >
>> > Checking:
>> > $ objdump -g QtCore/sipQtCoreQAbstractAnimation.o
>> > [...]
>> > The section .debug_info contains:
>> >
>> > Compilation Unit @ offset 0x0:
>> > Length: 0x13f0d (32-bit)
>> > Version: 2
>> > Abbrev Offset: 0
>> > Pointer Size: 4
>> > <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
>> > < c> DW_AT_producer : (indirect string, offset: 0xd552):
>> > GNU
>>
>> C++
>>
>> > 4.3.2 [gcc-4_3-branch revision 141291]
>> > <10> DW_AT_language : 4 (C++)
>> > <11> DW_AT_name : (indirect string, offset: 0xa879):
>> > sipQtCoreQAbstractAnimation.cpp
>> > <15> DW_AT_comp_dir : (indirect string, offset: 0xd601):
>>
>> /usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtCo
>>re
>>
>> > <19> DW_AT_low_pc : 0x0
>> > <1d> DW_AT_high_pc : 0x1ed0
>> > <21> DW_AT_stmt_list : 0x0
>> > [...]
>> >
>> > These do not match, resulting in the effects shown above.
>> >
>> > Always using absolute paths probably solves this. What do you
>> > think?
>>
>> Why is using a relative filename (ie. no path) ok, but not a relative
>> pathname?
>
> The problem here is, that you compile inside QtCore (e.g. without
paths):
>
> g++ -c -pipe -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall
> -D_FORTIFY_SOURCE=2
> -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
-g
> -Wall
> -W -D_REENTRANT -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public
-DQT_CORE_LIB
> -I.
>
-I/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/qpy/QtCore
> -I/usr/include/python2.6 -I/usr/mkspecs/linux-g++ -I/usr/include/QtCore
> -I/usr/include
> -o sipQtCoreQAbstractAnimation.o sipQtCoreQAbstractAnimation.cpp
>
> while the source contain them, hence they get doubled. This time,
> I proved my claim here by using:
>
> find Qt* phonon -name \*.cpp -exec sed -i 's/^\#line \([0-9]\+\)
> "\([^\/].*\)\/\(.*\)"/#line \1 "\3"/g' {} \;
>
> e.g. removing the first relative path argument.
>
> QtCore/sipQtCoreQAbstractAnimation.cpp excerpt:
>
> #include "sipAPIQtCore.h"
>
> #line 38
>
"/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip/QtCore/qabstractanimation.sip"
> #include <qabstractanimation.h>
> #line 39 "sipQtCoreQAbstractAnimation.cpp"
> ^^^: no QtCore/
> #line 39
>
"/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip/QtCore/qobject.sip"
> #include <qobject.h>
> #line 43 "sipQtCoreQAbstractAnimation.cpp"
> #line 36
>
"/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip/QtCore/qcoreevent.sip"
> #include <qcoreevent.h>
> #line 46 "sipQtCoreQAbstractAnimation.cpp"
> #line 38
>
"/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip/QtCore/qanimationgroup.sip"
> #include <qanimationgroup.h>
> #line 49 "sipQtCoreQAbstractAnimation.cpp"
> #line 315
>
"/usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/sip/QtCore/qcoreevent.sip"
> #include <qcoreevent.h>
> #line 52 "sipQtCoreQAbstractAnimation.cpp"
>
> é voila:
>
> + /usr/lib/rpm/find-debuginfo.sh
> /usr/src/packages/BUILD/PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f
> extracting debug info from
/var/tmp/python-qt4-4.8.2-build/usr/bin/pyrcc4
> extracting debug info from
> /var/tmp/python-qt4-4.8.2-build/usr/bin/pylupdate4
> WARNING: /usr/lib/qt4/plugins/designer/libpythonplugin.so is already
> stripped!
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/dbus/mainloop/qt.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/Qt.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtDesigner.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/phonon.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtXmlPatterns.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtXml.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtWebKit.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtTest.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtSvg.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtSql.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtScriptTools.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtScript.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtOpenGL.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtDeclarative.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtNetwork.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtMultimedia.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtHelp.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtGui.so
> extracting debug info from
>
/var/tmp/python-qt4-4.8.2-build/usr/lib/python2.6/site-packages/PyQt4/QtCore.so
> cpio: PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtCore/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
> PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtCore/QtCore/sipAPIQtCore.h:
> Cannot stat: No such file or directory
> cpio:
> PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtDeclarative/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
>
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtDeclarative/QtDeclarative/sipAPIQtDeclarative.h:
> Cannot stat: No such file or directory
> cpio:
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtDesigner/Auto-generated:
> Cannot stat: No such file or directory
> cpio: PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtGui/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtGui/QtGui/sipAPIQtGui.h:
> Cannot stat: No such file or directory
> cpio: PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtSql/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtSvg/QtSvg/sipAPIQtSvg.h:
> Cannot stat: No such file or directory
> cpio: PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtWebKit/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
>
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtWebKit/QtWebKit/sipAPIQtWebKit.h:
> Cannot stat: No such file or directory
> cpio: PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/QtXml/Auto-generated:
> Cannot stat: No such file or directory
> cpio:
>
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/qpy/QtCore/QtCore/sipAPIQtCore.h:
> Cannot stat: No such file or directory
> cpio:
>
PyQt-x11-gpl-snapshot-4.8.2-24a6ba5f4f0f/qpy/QtDeclarative/QtDeclarative/sipAPIQtDeclarative.h:
> Cannot stat: No such file or directory
>
> Okay, I missed the *.h files, but that nicely shows the difference :-)
>
> Convinced?
Try tonight's snapshots which ensure that all #lines have absolute
pathnames.
Phil
More information about the PyQt
mailing list