Bug 77112

Summary: If the QTDIR environment variable is set, the build system fails to compile WinCairo
Product: WebKit Reporter: David Delaune <david.delaune>
Component: Tools / TestsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, bfulgham, dbates, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch none

Description David Delaune 2012-01-26 10:03:37 PST
Hi,

When the environment variable QTDIR is defined the build system fails to compile the WinCairo branch. The problem is in the perl module:

WebKit\Tools\Scripts\webkitdirs.pm

The sub determineIsQt() function contains the line:  $isQt = defined($ENV{'QTDIR'});

It could easily be fixed by adding a check for isWinCairo()

Best Wishes,
-David Delaune
Comment 1 Csaba Osztrogonác 2012-01-30 04:08:58 PST
Created attachment 124522 [details]
Patch
Comment 2 Daniel Bates 2012-01-30 09:43:10 PST
Comment on attachment 124522 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=124522&action=review

> Tools/Scripts/webkitdirs.pm:882
>      # The presence of QTDIR only means Qt if --gtk or --wx or --efl or --blackberry or --chromium are not on the command-line

This comment should be updated to mention that we ignore the QTDIR environment variable when --wincairo is specified on the command line.

On another note, this exclusion list of ports is long. Maybe we should consider only building for Qt when the --qt command line option is explicitly specified. That is, don't check for a set QTDIR environment variable.
Comment 3 Csaba Osztrogonác 2012-01-31 09:19:21 PST
(In reply to comment #2)
> (From update of attachment 124522 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124522&action=review
> 
> > Tools/Scripts/webkitdirs.pm:882
> >      # The presence of QTDIR only means Qt if --gtk or --wx or --efl or --blackberry or --chromium are not on the command-line
> 
> This comment should be updated to mention that we ignore the QTDIR environment variable when --wincairo is specified on the command line.

Good point, fixed.

> On another note, this exclusion list of ports is long. Maybe we should consider only building for Qt when the --qt command line option is explicitly specified. That is, don't check for a set QTDIR environment variable.

I agree with you more or less ...

But in my opinion requiring from developer to use explicit --qt for build-webkit, run-javascriptcore-tests, run-webkit-tests isn't a good idea.

What do you think if we add an evironment for example DEFAULT_WEBKIT_PLATFORM, and developers can define a default platform on they work, but can be overriden with command line options: --gtk, --efl, ...

I think it can be useful for all WebKit developer.
Comment 4 Csaba Osztrogonác 2012-01-31 09:20:36 PST
I think with this change we can expect that the developer set DEFAULT_WEBKIT_PLATFORM or add platform explicitly.
Comment 5 Csaba Osztrogonác 2012-01-31 09:21:18 PST
Comment on attachment 124522 [details]
Patch

Landed in http://trac.webkit.org/changeset/106363 with fixed comment.
Comment 6 Daniel Bates 2012-02-01 09:04:24 PST
(In reply to comment #3)
> (In reply to comment #2)
> [...]
> What do you think if we add an evironment for example DEFAULT_WEBKIT_PLATFORM, and developers can define a default platform on they work, but can be overriden with command line options: --gtk, --efl, ...
>

I don't have a strong opinion on this at this time.  Maybe other people have an opinion on this.