Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177727 - x11-libs/qt-4.2.3-r1 - configure race condition causing .qmake.vars / .qmake.cache garbage
Summary: x11-libs/qt-4.2.3-r1 - configure race condition causing .qmake.vars / .qmake....
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-08 21:31 UTC by Jan Safrata
Modified: 2008-04-07 15:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Safrata 2007-05-08 21:31:26 UTC
Sometimes there's garbage written into qt-x11-opensource-src-4.2.3/.qmake.cache, causing build failure later - see the zeroes in the middle of the file:

<cut>
00000450  20 74 74 79 0a 6d 6f 75  73 65 2d 64 72 69 76 65  | tty.mouse-drive|
00000460  72 73 20 2b 3d 20 70 63  0a 00 00 00 00 00 00 00  |rs += pc........|
00000470  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000500  00 00 00 00 00 00 00 51  54 5f 43 46 4c 41 47 53  |.......QT_CFLAGS|
00000510  5f 44 42 55 53 20 3d 20  2d 49 2f 75 73 72 2f 69  |_DBUS = -I/usr/i|
<cut>

in text form where zeroes are replaced by dots:
<cut>
mouse-drivers += pc
...............................................................................................................................................
...............QT_CFLAGS_DBUS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
QT_LIBS_DBUS = -ldbus-1
<cut>

The zeroes in the middle of the file are effectivelly hidding all the variables below.

That resulted with build failure:
g++ -c -pipe -march=pentium3 -mtune=pentium3 -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC  -DQT_SHARED -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQDBUS_MAKEDLL -DDBUS_API_SUBJECT_TO_CHANGE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtCore -I../../../include/QtXml -I../../../include/QtXml -I../../../include -I. -Itmp-release-shared -I. -o release-shared/qdbuserror.o qdbuserror.cpp
qdbusconnectioninterface.cpp:34:60: error: dbus/dbus.h: No such file or directory
In file included from qdbusconnection.cpp:33:
qdbusconnection_p.h:52:23: error: dbus/dbus.h: No such file or directory

I guess, that the cause of this problem (and it's randomness) is the read of not yet closed file qt-x11-opensource-src-4.2.3/.qmake.vars inside the configure script:
configure file handle 5 is redirected to .qmake.vars via exec on line 35 and variables are written there with echo >&5. The write to .qmake.vars may not be flushed yet, but content of the .qmake.vars file is read with
cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
on line 4936, possibly writing some zeroes there (race condition of read from cat with write buffering of configure process).

Reproducible: Sometimes

Steps to Reproduce:
~ # emerge -av qt

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] x11-libs/qt-4.2.3-r1  USE="dbus gif jpeg opengl png sqlite3 zlib -accessibility -cups -debug -doc -examples -firebird -glib -mng -mysql -nas -nis -odbc -pch -postgres -qt3support -sqlite -xinerama" INPUT_DEVICES="-wacom" 0 kB

Total: 1 package (1 in new slot), Size of downloads: 0 kB
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2007-05-10 15:31:52 UTC
Can you file this bug here:

http://www.trolltech.com/developer/task-tracker/index_html

That way the trolls can get a proper fix in for it.

Thanks!
Comment 2 Jan Safrata 2007-05-16 08:26:33 UTC
I posted the bug to trolltech there as suggested on 2007-05-12, got following answer on 2007-05-14:
--
Re: [Issue N162474] configure race condition causing .qmake.vars / .qmake.c ache garbage
Thank you for your report. I have not been able to reproduce this, but I
have passed the information on to the developers for consideration.
They may get in touch with you if they need more information.
Thank you for bringing this to our attention. Have a nice day!
--
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2007-08-09 11:47:10 UTC
I haven't been able to recreate this either.  Cna you confirm it's still an issue in 4.3.1 ?
Comment 4 Ingmar Vanhassel (RETIRED) gentoo-dev 2008-03-19 04:44:59 UTC
Are you still seeing this problem with ~arch Qt?