Comment 5 for bug 261380

Revision history for this message
Martin von Gagern (gagern) wrote :

The crc32 sum seems to be wrong as well. Therefore simply moving/renaming the files won't solve the issue.

To use the libQtGui.so.4.4.3 from 4.4.3-0ubuntu1 on i386 as an example: here /usr/lib/libQtGui.so.4.4.3.debug has a crc32 value of 0x61598269, computed using the algorithm given in the gdb manual and compared against one calculated using objcopy. The .gnu_debuglink section of /usr/lib/libQtGui.so.4.4.3 states 0x18743161. I manually converted endianess; objdump displayed reverse byte order in both cases.

As to the cause of this issue: I just had a look at the build log from https://launchpad.net/ubuntu/+source/qt4-x11/4.4.3-0ubuntu1/+build/729722 and found the following line:

(test -z "../../lib/" || cd "../../lib/" ;
targ=`basename libQtGui.so.4.4.3`;
objcopy --only-keep-debug "$targ" "$targ.debug" &&
objcopy --strip-debug "$targ" &&
objcopy --add-gnu-debuglink="$targ.debug" "$targ" &&
chmod -x "$targ.debug" ) ;

So there the link seems to get set correctly, according to the Fedora scheme, including the .debug extension and presumably with the correct checksum as well. Something seems to modify the installed so file later on, or perhaps the file modified by above command isn't even the one installed later on. I couldn't find any likely command actually naming libQtGui, but it might be a command using a glob, or I might have overlooked something. Strange.

Generating separate debug files according to Fedora naming scheme seems to be the default configuration of the qt4 build process. A viable solution to both solve the broken links and also get the package to follow the preferred Ubuntu naming scheme would be to disable both debug symbol separation and stripping from the Qt build process, and instead do the debug symbol separation later on the Ubuntu way, with whatever tools other packages might use.

Looking at Gentoo, the way to achieve this seems to be to pass -no-separate-debug-info to configure and CONFIG+=nostrip to qmake. As Ubuntu, in contrast to Gentoo, doesn't seem to invoke qmake directly, I don't know how to achieve this. A viable solution would probably to include it in the default value of QMAKE_VARS in the configure script. See also http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4-build.eclass?view=markup for how Gentoo builds its qt4 packages.