Bug 71775 - [Qt] Incremental fails when using GNUmake and Q_OBJECT macro is added to a header file
Summary: [Qt] Incremental fails when using GNUmake and Q_OBJECT macro is added to a he...
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: Tor Arne Vestbø
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 71222
  Show dependency treegraph
 
Reported: 2011-11-08 00:34 PST by Csaba Osztrogonác
Modified: 2011-11-17 05:37 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2011-11-08 00:34:22 PST
error message:
/usr/bin/gold: obj/release/BrowserWindow.o: in function BrowserWindow::BrowserWindow(WindowOptions*):BrowserWindow.cpp(.text+0x58d): error: undefined reference to 'vtable for Utils'
/usr/bin/gold: obj/release/BrowserWindow.o: in function BrowserWindow::BrowserWindow(WindowOptions*):BrowserWindow.cpp(.text+0x95d): error: undefined reference to 'vtable for Utils'

revealed by: http://trac.webkit.org/changeset/99527

It is an incremental build issue, because clean build works fine.
Comment 1 Tor Arne Vestbø 2011-11-08 03:23:14 PST
This issue is due to the addition of the Q_OBJECT macro in a header file. 

When building against Qt5 on a Unix system, we do CONFIG+=GNUmake to let the compiler generate dependency files, and we then run only "make", instead of "make qmake && make", when we build incrementally (running qmake slows the build down). 

But, the compiler-generated dependency files can't catch the addition of a Q_OBJECT macro, so the only way to really guarantee a working incremental build is to always run "make qmake" before running make.

For regular development I think it's fine to leave this case up to the developer to handle, by running make qmake manually, or touching the pro file. The latter can be used to kick the bot.

Long term the bot should be configured with CONFIG-=GNUmake, to fix incremental builds, but for now we'll leave it like this to catch other regressions related to the GNUmake option.
Comment 2 Tor Arne Vestbø 2011-11-17 05:37:03 PST
The bot uses CONFIG-=GNUmake now