Bug 22569 - build-webkit --chromium fails on windows
Summary: build-webkit --chromium fails on windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 10:52 PST by Eric Seidel (no email)
Modified: 2008-12-02 11:04 PST (History)
1 user (show)

See Also:


Attachments
make build-webkit --chromium work on windows under cygwin (1.62 KB, patch)
2008-12-01 11:10 PST, Eric Seidel (no email)
ddkilzer: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-12-01 10:52:40 PST
Fix (or rather HACK) build-webkit --chromium to use win32 python instead of cygwin python since Scons assumes GCC when building with cygwin python, trying to force Scons to build with MSVC under cygwin has been an exercise in futility it seems.  For now, hack to use cmd to run win32 python w/ scons until we can figure out how to fix scons in order to play nice with cygwin + MSVC.
Comment 1 Eric Seidel (no email) 2008-12-01 11:09:27 PST
If you're curious as to the latest error with cygwin python + scons + msvc:

[12031:JavaScriptCore]% scons                                                                                        [/cygdrive/c/Projects/WebKit/JavaScriptCore]
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Implicit dependency `\Program Files\Microsoft Visual Studio 8/VC/bin/cl' not found, needed by target `API/JSBase.obj'.  Stop.
scons: building terminated because of errors.

Still working on the scons folks on getting past this one in a nice way.  Of course the concern is that once we get past this, all the paths passed to cl.exe will still be "wrong" and more hacks would be needed.  So for now, we're cutting our losses and just driving scons via cmd + win32 python.  That at least allows WebKit devs to us build-webkit --chromium from CYGWIN like normal, and have it work.
Comment 2 Eric Seidel (no email) 2008-12-01 11:10:27 PST
Created attachment 25631 [details]
make build-webkit --chromium work on windows under cygwin
Comment 3 David Kilzer (:ddkilzer) 2008-12-01 13:04:21 PST
(In reply to comment #0)
> Fix (or rather HACK) build-webkit --chromium to use win32 python instead of
> cygwin python since Scons assumes GCC when building with cygwin python, trying
> to force Scons to build with MSVC under cygwin has been an exercise in futility
> it seems.  For now, hack to use cmd to run win32 python w/ scons until we can
> figure out how to fix scons in order to play nice with cygwin + MSVC.

What's the chromium/scons/bugs.webkit.org follow-up bug to fix this the right way?
Comment 4 David Kilzer (:ddkilzer) 2008-12-01 13:06:38 PST
(In reply to comment #2)
> Created an attachment (id=25631) [review]
> make build-webkit --chromium work on windows under cygwin

Is there a documentation update that is needed with this change?  Is C:\Python26 the standard location for Win32 Python (2.6) to be installed?

Comment 5 David Kilzer (:ddkilzer) 2008-12-01 13:11:13 PST
(In reply to comment #1)
> If you're curious as to the latest error with cygwin python + scons + msvc:
> 
> [12031:JavaScriptCore]% scons                                                  
>                                     
> [/cygdrive/c/Projects/WebKit/JavaScriptCore]
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> scons: *** Implicit dependency `\Program Files\Microsoft Visual Studio
> 8/VC/bin/cl' not found, needed by target `API/JSBase.obj'.  Stop.
> scons: building terminated because of errors.

It looks like the path is a mix of backslashes (\) and forward slashes (/).  Have you tried using "cygpath" on one (or the other) to convert the paths to/from DOS format?

http://www.cygwin.com/cygwin-ug-net/using-utils.html#cygpath

Comment 6 Eric Seidel (no email) 2008-12-01 14:24:58 PST
(In reply to comment #3)
> What's the chromium/scons/bugs.webkit.org follow-up bug to fix this the right
> way?

Turns out Scons seems to have a bug tracking system (besides me emailing the dudes one office over from me...)

http://scons.tigris.org/issues/show_bug.cgi?id=2266
Comment 7 Eric Seidel (no email) 2008-12-01 14:28:29 PST
(In reply to comment #4)
> (In reply to comment #2)
> > Created an attachment (id=25631) [review] [review]
> > make build-webkit --chromium work on windows under cygwin
> 
> Is there a documentation update that is needed with this change?  Is
> C:\Python26 the standard location for Win32 Python (2.6) to be installed?
> 

This change is mostly a hack to make it possible for us to have a "standard configuration" windows buildbot.  (i.e. "just type build-webkit --chromium and run-webkit-tests --chromium like every other port")

There are 3 pieces which you have to install to get this up and working as is (ActivePython 2.6 for windows, the Python win32 extentions, and scons 1.1.0).  If we ever get Scons + MSVC working under cygwin, there will only be *one* piece (scons) which you have to install to build using scons.

I think we should talk about more documentation (on the WebKit wiki) once someone else besides me has ever tried to build using this build system on their machines.  I'm happy to write some docs as I bring that first person up and going (which hopefully will be as simple as type "build-webkit --chromium" on any platform w/o any additional installs at that point).
Comment 8 Eric Seidel (no email) 2008-12-01 14:29:51 PST
(In reply to comment #5)
> (In reply to comment #1)
> > If you're curious as to the latest error with cygwin python + scons + msvc:
> > 
> > [12031:JavaScriptCore]% scons                                                  
> >                                     
> > [/cygdrive/c/Projects/WebKit/JavaScriptCore]
> > scons: Reading SConscript files ...
> > scons: done reading SConscript files.
> > scons: Building targets ...
> > scons: *** Implicit dependency `\Program Files\Microsoft Visual Studio
> > 8/VC/bin/cl' not found, needed by target `API/JSBase.obj'.  Stop.
> > scons: building terminated because of errors.
> 
> It looks like the path is a mix of backslashes (\) and forward slashes (/). 
> Have you tried using "cygpath" on one (or the other) to convert the paths
> to/from DOS format?
> 
> http://www.cygwin.com/cygwin-ug-net/using-utils.html#cygpath
> 

Yeah.  Turns out that cygwin shells actually understand this amazingly strange path just fine.  And scons seems to understand it OK in some parts but not in others.  Scons is actually constructing this path internally.  I've notified the scons guys and they intend to fix all of scon's cygwin support at some point. :(
Comment 9 David Kilzer (:ddkilzer) 2008-12-01 15:49:50 PST
Comment on attachment 25631 [details]
make build-webkit --chromium work on windows under cygwin

>+    my $sconsCommand = "scons";
>+    if (isCygwin()) {
>+        # HACK: Launch scons with Win32 python instead of CYGWIN python
>+        # Scons + MSVC only works under Win32 python
>+        $sconsCommand = "cmd /c 'C:\\Python26\\Scripts\\scons'";
>+    }

Please add a comment with a URL to this bug or <http://scons.tigris.org/issues/show_bug.cgi?id=2266>.

Thanks for answering my questions, Eric!  r=me
Comment 10 Eric Seidel (no email) 2008-12-02 11:04:57 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/webkitdirs.pm
Committed r38907