Bug 67799 - [Qt][Mac] Build system can't handle dependencies for mm files
Summary: [Qt][Mac] Build system can't handle dependencies for mm files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Blocker
Assignee: Csaba Osztrogonác
URL:
Keywords: Qt, QtTriaged
Depends on: 67839
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-08 13:31 PDT by Csaba Osztrogonác
Modified: 2012-02-02 10:12 PST (History)
6 users (show)

See Also:


Attachments
preprocessed WebVideoFullscreenController (6.52 MB, application/octet-stream)
2011-09-14 05:24 PDT, Balazs Kelemen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2011-09-08 13:31:11 PDT
http://trac.webkit.org/changeset/94774 broke the build on Qt-Mac platform:

Undefined symbols:
  "JSC::JSCell::getUInt32(unsigned int&) const", referenced from:
      vtable for JSC::JSCellin libwebcore.a(WebVideoFullscreenController.o)
      vtable for JSC::JSCellin libwebcore.a(WebVideoFullscreenHUDWindowController.o)
      vtable for JSC::JSCellin libwebcore.a(MediaPlayerPrivateQTKit.o)
ld: symbol(s) not found
Comment 1 Mark Hahnenberg 2011-09-08 13:32:25 PDT
Any idea why this is happening?
Comment 2 Csaba Osztrogonác 2011-09-08 13:33:41 PDT
I don't know anything about QtWebKit on Mac. Maybe Dihan or Alexis can check it.
Comment 3 Mark Hahnenberg 2011-09-08 13:52:49 PDT
Since this didn't break any of the other Qt bots, my guess would have to be that the bot is having an issue cleaning the build directory.  getUInt32 was removed from JSCell entirely and therefore should not be in the vtable for any class anywhere.
Comment 4 Csaba Osztrogonác 2011-09-09 04:58:15 PDT
Touching the folowing files solved the problem: 
platform/graphics/mac/MediaPlayerPrivateQTKit.mm
platform/mac/WebVideoFullscreenController.mm
platform/mac/WebVideoFullscreenHUDWindowController.mm

I touched them with r94845 and then I rolled out this hack with r94846.

It means that r94774 is correct, but our build system has a serious bug.
(I'm afraid it is a qmake bug, not bug in WebKit pro files.) Alexis or Dihan, could you check the dependencies for these files in the Makefile?
Comment 5 Csaba Osztrogonác 2011-09-12 03:01:53 PDT
One more build broke the build because of this bug http://trac.webkit.org/changeset/94930
Comment 6 Balazs Kelemen 2011-09-14 02:31:17 PDT
It seems like the dependency set of some mm files are really broken like these:

obj/release/WebVideoFullscreenController.o: ../../../Source/WebCore/platform/mac/WebVideoFullscreenController.mm
	$(CCACHE) /usr/bin/gcc-4.2 -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ../../../Source/WebCore/platform/mac/WebVideoFullscreenController.mm -o obj/release/WebVideoFullscreenController.o

obj/release/WebVideoFullscreenHUDWindowController.o: ../../../Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
	$(CCACHE) /usr/bin/gcc-4.2 -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ../../../Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm -o obj/release/WebVideoFullscreenHUDWindowController.o

obj/release/WebWindowAnimation.o: ../../../Source/WebCore/platform/mac/WebWindowAnimation.mm
	$(CCACHE) /usr/bin/gcc-4.2 -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ../../../Source/WebCore/platform/mac/WebWindowAnimation.mm -o obj/release/WebWindowAnimation.o

However other mm files have correct dependencies like that:

obj/release/MediaPlayerPrivateQTKit.o: ../../../Source/WebCore/platform/graphics/GraphicsLayer.h \
		../../../Source/WebCore/platform/animation/Animation.h \
		../../../Source/WebCore/platform/text/PlatformString.h \
		../../../Source/JavaScriptCore/wtf/text/WTFString.h \
		../../../Source/JavaScriptCore/wtf/text/StringImpl.h \
		../../../Source/JavaScriptCore/wtf/ASCIICType.h \
		../../../Source/JavaScriptCore/wtf/Assertions.h \
		../../../Source/JavaScriptCore/wtf/Platform.h \
		../../../Source/JavaScriptCore/wtf/Compiler.h \
		../../../Source/JavaScriptCore/wtf/gobject/GTypedefs.h \
		../../../Source/JavaScriptCore/wtf/CrossThreadRefCounted.h \
		../../../Source/JavaScriptCore/wtf/PassRefPtr.h \
		../../../Source/JavaScriptCore/wtf/AlwaysInline.h \
		../../../Source/JavaScriptCore/wtf/NullPtr.h \
		../../../Source/JavaScriptCore/wtf/RefCounted.h \
		../../../Source/JavaScriptCore/wtf/FastAllocBase.h \
		../../../Source/JavaScriptCore/wtf/FastMalloc.h \
		../../../Source/JavaScriptCore/wtf/PossiblyNull.h \
		../../../Source/JavaScriptCore/wtf/TypeTraits.h \
		../../../Source/JavaScriptCore/wtf/ThreadRestrictionVerifier.h \
		../../../Source/JavaScriptCore/wtf/Threading.h \
		../../../Source/JavaScriptCore/wtf/Atomics.h \
		../../../Source/JavaScriptCore/wtf/Locker.h \
		../../../Source/JavaScriptCore/wtf/Noncopyable.h \
		../../../Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h \
		../../../Source/JavaScriptCore/wtf/DynamicAnnotations.h \
		../../../Source/JavaScriptCore/wtf/ThreadingPrimitives.h \
		../../../Source/JavaScriptCore/wtf/gobject/GOwnPtr.h \
		/opt/local/include/QtCore/qglobal.h \
		/opt/local/include/QtCore/qconfig.h \
		/opt/local/include/QtCore/qfeatures.h \
		../../../Source/JavaScriptCore/wtf/OwnPtr.h \
		../../../Source/JavaScriptCore/wtf/OwnPtrCommon.h \
		../../../Source/JavaScriptCore/wtf/UnusedParam.h \
		../../../Source/JavaScriptCore/wtf/Forward.h \
		../../../Source/JavaScriptCore/wtf/OwnFastMallocPtr.h \
		../../../Source/JavaScriptCore/wtf/StdLibExtras.h \
		../../../Source/JavaScriptCore/wtf/StringHasher.h \
		../../../Source/JavaScriptCore/wtf/unicode/Unicode.h \
		../../../Source/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h \
		../../../Source/JavaScriptCore/wtf/unicode/ScriptCodesFromICU.h \
		../../../Source/JavaScriptCore/wtf/unicode/UnicodeMacrosFromICU.h \
		/opt/local/include/QtCore/QChar \
		/opt/local/include/QtCore/qchar.h \
		/opt/local/include/QtCore/QString \
		/opt/local/include/QtCore/qstring.h \
		/opt/local/include/QtCore/qbytearray.h \
		/opt/local/include/QtCore/qatomic.h \
		/opt/local/include/QtCore/qbasicatomic.h \
		/opt/local/include/QtCore/qatomic_bootstrap.h \
		/opt/local/include/QtCore/qatomic_arch.h \
		/opt/local/include/QtCore/qatomic_vxworks.h \
		/opt/local/include/QtCore/qatomic_powerpc.h \
		/opt/local/include/QtCore/qatomic_alpha.h \
		/opt/local/include/QtCore/qatomic_arm.h \
		/opt/local/include/QtCore/qatomic_armv6.h \
		/opt/local/include/QtCore/qatomic_avr32.h \
		/opt/local/include/QtCore/qatomic_bfin.h \
		/opt/local/include/QtCore/qatomic_generic.h \
		/opt/local/include/QtCore/qatomic_i386.h \
		/opt/local/include/QtCore/qatomic_ia64.h \
		/opt/local/include/QtCore/qatomic_macosx.h \
		/opt/local/include/QtCore/qatomic_x86_64.h \
		/opt/local/include/QtCore/qatomic_mips.h \
		/opt/local/include/QtCore/qatomic_parisc.h \
		/opt/local/include/QtCore/qatomic_s390.h \
		/opt/local/include/QtCore/qatomic_sparc.h \
		/opt/local/include/QtCore/qatomic_windows.h \
		/opt/local/include/QtCore/qatomic_windowsce.h \
		/opt/local/include/QtCore/qatomic_symbian.h \
		/opt/local/include/QtCore/qatomic_sh.h \
		/opt/local/include/QtCore/qatomic_sh4a.h \
		/opt/local/include/QtCore/qnamespace.h \
		/opt/local/include/Qt3Support/q3cstring.h \
		/opt/local/include/QtCore/qstringbuilder.h \
		/opt/local/include/QtCore/qmap.h \
		/opt/local/include/QtCore/qiterator.h \
		/opt/local/include/QtCore/qlist.h \
		/opt/local/include/QtCore/qalgorithms.h \
		../../../Source/WebCore/config.h \
		../../../Source/JavaScriptCore/wtf/ExportMacros.h \
		../../../Source/JavaScriptCore/wtf/DisallowCType.h \
		../../../Source/WebCore/bridge/npruntime_internal.h \
		../../../Source/WebCore/plugins/npapi.h \
		../../../Source/WebCore/plugins/nptypes.h \
		/opt/local/include/QtCore/QEvent \
		/opt/local/include/QtCore/qcoreevent.h \
		/opt/local/include/QtCore/qobjectdefs.h \
		/opt/local/include/QtGui/QRegion \
		/opt/local/include/QtGui/qregion.h \
		/opt/local/include/QtCore/qrect.h \
		/opt/local/include/QtCore/qsize.h \
		/opt/local/include/QtCore/qpoint.h \
		/opt/local/include/QtGui/qwindowdefs.h \
		/opt/local/include/QtGui/qmacdefines_mac.h \
		/opt/local/include/QtGui/qwindowdefs_win.h \
		/opt/local/include/QtCore/qdatastream.h \
		/opt/local/include/QtCore/qscopedpointer.h \
		/opt/local/include/QtCore/qiodevice.h \
		/opt/local/include/QtCore/qobject.h \
		../../../Source/WebCore/plugins/npfunctions.h \
		../../../Source/WebCore/plugins/npruntime.h \
		../../../Source/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h \
		../../../Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h \
		../../../Source/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h \
		../../../Source/JavaScriptCore/wtf/unicode/brew/UnicodeBrew.h \
		../../../Source/JavaScriptCore/wtf/Vector.h \
		../../../Source/JavaScriptCore/wtf/NotFound.h \
		../../../Source/JavaScriptCore/wtf/ValueCheck.h \
		../../../Source/JavaScriptCore/wtf/VectorTraits.h \
		../../../Source/JavaScriptCore/wtf/RefPtr.h \
		../../../Source/JavaScriptCore/wtf/Alignment.h \
		/opt/local/include/QtCore/QDataStream \
		../../../Source/JavaScriptCore/wtf/text/StringImplBase.h \
		../../../Source/JavaScriptCore/wtf/text/AtomicString.h \
		../../../Source/JavaScriptCore/wtf/text/AtomicStringImpl.h \
		../../../Source/JavaScriptCore/wtf/text/StringConcatenate.h \
		../../../Source/JavaScriptCore/wtf/text/StringOperators.h \
		../../../Source/WebCore/rendering/style/RenderStyleConstants.h \
		../../../Source/WebCore/platform/animation/TimingFunction.h \
		../../../Source/WebCore/platform/graphics/Color.h \
		../../../Source/WebCore/platform/graphics/ColorSpace.h \
		../../../Source/WebCore/platform/graphics/FloatPoint.h \
		../../../Source/WebCore/platform/graphics/FloatSize.h \
		../../../Source/WebCore/platform/graphics/IntPoint.h \
		../../../Source/WebCore/platform/graphics/IntSize.h \
		../../../Source/JavaScriptCore/wtf/MathExtras.h \
		../../../Source/WebCore/platform/graphics/FloatPoint3D.h \
		../../../Source/WebCore/platform/graphics/GraphicsLayerClient.h \
		../../../Source/WebCore/platform/graphics/IntRect.h \
		../../../Source/WebCore/platform/graphics/transforms/TransformationMatrix.h \
		/opt/local/include/QtGui/QTransform \
		/opt/local/include/QtGui/qtransform.h \
		/opt/local/include/QtGui/qmatrix.h \
		/opt/local/include/QtGui/qpolygon.h \
		/opt/local/include/QtCore/qvector.h \
		/opt/local/include/QtCore/QPointF \
		/opt/local/include/QtCore/QPoint \
		/opt/local/include/QtCore/qline.h \
		/opt/local/include/QtGui/qwmatrix.h \
		/opt/local/include/QtGui/qpainterpath.h \
		../../../Source/WebCore/platform/graphics/transforms/TransformOperations.h \
		../../../Source/WebCore/platform/graphics/transforms/TransformOperation.h \
		../../../Source/JavaScriptCore/wtf/PassOwnPtr.h \
		../../../Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
	$(CCACHE) /usr/bin/gcc-4.2 -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ../../../Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm -o obj/release/MediaPlayerPrivateQTKit.o

In WebCore.pro these 4 files are in the same section so I don't know what is the difference between them.
Comment 7 Csaba Osztrogonác 2011-09-14 02:41:44 PDT
Could you check the preprocessed source? (with -E -dD options)
It can help you to find where the missing header is included.
Comment 8 Balazs Kelemen 2011-09-14 05:24:59 PDT
Created attachment 107320 [details]
preprocessed WebVideoFullscreenController
Comment 9 Balazs Kelemen 2011-09-14 05:26:00 PDT
(In reply to comment #7)
> Could you check the preprocessed source? (with -E -dD options)
> It can help you to find where the missing header is included.

I don't know how will we become smarter by this so I uploaded it for you :)
Comment 10 Balazs Kelemen 2011-09-14 05:42:07 PDT
I have now idea how to fix this or what is the reason of this issue so I postpone it to somebody with a better knowledge in qmake and the build system.
Comment 11 Csaba Osztrogonác 2011-09-15 02:00:38 PDT
One more build fail because of this bug: http://trac.webkit.org/changeset/95167
Comment 12 Csaba Osztrogonác 2011-09-15 02:01:39 PDT
It is a blocker bug, because now our SL builder is absolutely unreliable.
Comment 13 Alexis Menard (darktears) 2011-09-15 05:12:20 PDT
(In reply to comment #12)
> It is a blocker bug, because now our SL builder is absolutely unreliable.

Come on. Don't be so dramatic, the bot worked absolutely fine until recent changes that shows up this bug. It did 1000+ builds without a glitch. Unless someone finds the time and the willing to fix the qmake bug, then I'm fine with cleaning the build some time to time.
Comment 14 Csaba Osztrogonác 2011-09-15 05:20:50 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > It is a blocker bug, because now our SL builder is absolutely unreliable.
> 
> Come on. Don't be so dramatic, the bot worked absolutely fine until recent changes that shows up this bug. It did 1000+ builds without a glitch. Unless someone finds the time and the willing to fix the qmake bug, then I'm fine with cleaning the build some time to time.

There wasn't a problem for a long time. But this bug cause two false positive alarm in this week. And will do regularly when JSC developers touch JSCell.h, JSObject.h, ... Because of regularly false positive red bot, developers won't trust the SL bot. And if it turns red, they will say, it must be a flakiness, and won't think if they caused a regression.
Comment 15 Csaba Osztrogonác 2011-09-26 23:18:27 PDT
One more fail because of this bug: http://trac.webkit.org/changeset/96045
Comment 16 Csaba Osztrogonác 2011-09-27 13:36:20 PDT
One more fail because of http://trac.webkit.org/changeset/96143

I'm fed up with this bug ... :-/ Tomorrow I'll fix it myself if nobody is interested in fixing it ...
Comment 17 Csaba Osztrogonác 2011-10-10 01:20:02 PDT
I think I got it. It seems qmake can't handle the "#import" keyword.
I'm going to fix it ASAP.
Comment 18 Csaba Osztrogonác 2011-10-11 07:38:51 PDT
(In reply to comment #17)
> I think I got it. It seems qmake can't handle the "#import" keyword.
> I'm going to fix it ASAP.

It is a qmake bug: https://bugreports.qt.nokia.com/browse/QTBUG-21965
Comment 19 Mark Hahnenberg 2011-10-12 13:52:11 PDT
Just a heads up, there's another patch that just landed that might trigger this bug (r97292).
Comment 20 Mark Hahnenberg 2011-10-12 14:04:55 PDT
Nevermind, false alarm.
Comment 21 Mark Hahnenberg 2011-10-14 19:02:18 PDT
Another failure on the SL bot due to this bug.  Need a clean build.
Comment 22 Csaba Osztrogonác 2011-10-15 02:27:20 PDT
(In reply to comment #21)
> Another failure on the SL bot due to this bug.  Need a clean build.

Thanks for the heads-up. This bug is fixed in Qt trunk, we won't need clean build anymore after final Qt 4.8 release. (I hope it will be released in a month.)
Comment 23 Mark Hahnenberg 2011-10-23 17:23:59 PDT
Another failure @ r98203.  Sorry again guys.  There will probably be a few more of these within the next week.
Comment 24 Alexis Menard (darktears) 2011-10-23 22:22:00 PDT
Rafael, could you please have a look when needed (make a clean build) while I'm away.

Thanks
Comment 25 Rafael Brandao 2011-10-24 14:59:49 PDT
(In reply to comment #24)
> Rafael, could you please have a look when needed (make a clean build) while I'm away.
> 
> Thanks

When I came to the office today the build bot seemed to be working fine so I didn't touch it, but I'll keep an eye on it. If you need anything just give me a heads up via email.
Comment 26 Csaba Osztrogonác 2012-02-02 10:12:10 PST
(In reply to comment #18)
> (In reply to comment #17)
> > I think I got it. It seems qmake can't handle the "#import" keyword.
> > I'm going to fix it ASAP.
> 
> It is a qmake bug: https://bugreports.qt.nokia.com/browse/QTBUG-21965

It is fixed in released Qt 4.8.0.