Bug 135613

Summary: [Win] Build error when OFFICIAL_BUILD != 1.
Product: WebKit Reporter: peavo
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description peavo 2014-08-05 10:47:12 PDT
When OFFICIAL_BUILD != 1 the WinCairo build fails to build WTFGenerated, because the make file tries to run a python script directly, but this fails, because it needs to be started with a shell (bash -c ...).
Comment 1 peavo 2014-08-05 10:58:54 PDT
Created attachment 236034 [details]
Patch
Comment 2 Brent Fulgham 2014-08-05 11:18:59 PDT
Comment on attachment 236034 [details]
Patch

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

> Source/WTF/ChangeLog:8
> +        This is solved by rewriting the python script to perl.

I don't understand this. Why can't you use the Python implementation?

I'm trying to reduce the use of bash-based build steps, so changing this to call python directly might be the cause of the problem. I have ActiveState Python installed, which may be why it works for me.
Comment 3 Brent Fulgham 2014-08-05 11:19:37 PDT
I don't think this is the right approach; I would like to use the existing script. Instead, we need to figure out why the Python script cannot be used.
Comment 4 peavo 2014-08-05 11:36:48 PDT
(In reply to comment #2)
> (From update of attachment 236034 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=236034&action=review

Thanks for reviewing :)

> 
> > Source/WTF/ChangeLog:8
> > +        This is solved by rewriting the python script to perl.
> 
> I don't understand this. Why can't you use the Python implementation?
> 
> I'm trying to reduce the use of bash-based build steps, so changing this to call python directly might be the cause of the problem. I have ActiveState Python installed, which may be why it works for me.

Ok, I see, I don't have ActiveState installed, just the cygwin environment.
Is it a requirement to have ActiveState installed? In that case I think this bug is invalid ...
Comment 5 peavo 2014-08-05 12:13:29 PDT
(In reply to comment #3)
> I don't think this is the right approach; I would like to use the existing script. Instead, we need to figure out why the Python script cannot be used.

I think it fails for me because python is not in the PATH environment variable.

I guess we also could go back to 'bash -c python ...', but that's sort of counter-productive to your attempt at reducing the use of bash...
Comment 6 Alex Christensen 2014-08-05 13:07:58 PDT
(In reply to comment #5)
> I think it fails for me because python is not in the PATH environment variable.
Does putting python in the PATH fix it?  If so, this should be closed as invalid.

Heads up -- I'm starting to get things working with CMake, which will require separate installation of things like bison, flex, gperf, grep etc.
Comment 7 peavo 2014-08-05 13:40:32 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > I think it fails for me because python is not in the PATH environment variable.
> Does putting python in the PATH fix it?  If so, this should be closed as invalid.
> 
> Heads up -- I'm starting to get things working with CMake, which will require separate installation of things like bison, flex, gperf, grep etc.

I see now that WTFPreBuild.cmd adds c:\cygwin\bin to PATH, and there is both a perl and python executable there, but the python executable has the name python2.6.exe, which explains why python.exe is not found ...
Comment 8 Alex Christensen 2014-08-05 13:51:37 PDT
I installed python from python.org and manually put it into my PATH variable.  Same with ActivePerl.  We should really update http://www.webkit.org/building/tools.html.
Comment 9 peavo 2014-08-06 03:36:51 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > I think it fails for me because python is not in the PATH environment variable.
> > Does putting python in the PATH fix it?  If so, this should be closed as invalid.
> > 
> > Heads up -- I'm starting to get things working with CMake, which will require separate installation of things like bison, flex, gperf, grep etc.
> 
> I see now that WTFPreBuild.cmd adds c:\cygwin\bin to PATH, and there is both a perl and python executable there, but the python executable has the name python2.6.exe, which explains why python.exe is not found ...

There is actually a python symlink in c:\cygwin\bin which points to python2.6.exe, but it's not a native symlink, and will only work with bash, I believe.
Comment 10 peavo 2014-08-06 06:29:38 PDT
Created attachment 236095 [details]
Patch
Comment 11 peavo 2014-08-06 06:31:14 PDT
(In reply to comment #10)
> Created an attachment (id=236095) [details]
> Patch

I suggest we temporarily go back to execute the python script from the bash shell until http://www.webkit.org/building/tools.html is updated.
Comment 12 Alex Christensen 2014-08-06 09:51:24 PDT
(In reply to comment #11)
> I suggest we temporarily go back to execute the python script from the bash shell until http://www.webkit.org/building/tools.html is updated.
I think this would be a step against the direction the Windows build systems are going.  Websites/webkit.org/building/tools.html should be changed instead of this.
Comment 13 peavo 2014-08-06 11:14:18 PDT
Created attachment 236119 [details]
Patch
Comment 14 peavo 2014-08-06 11:15:20 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > I suggest we temporarily go back to execute the python script from the bash shell until http://www.webkit.org/building/tools.html is updated.
> I think this would be a step against the direction the Windows build systems are going.  Websites/webkit.org/building/tools.html should be changed instead of this.

Ok, thanks :) Updated patch.
Comment 15 Alex Christensen 2014-08-06 11:15:25 PDT
Comment on attachment 236119 [details]
Patch

In the near future we'll have to add more things like this (bison, flex, gperf, etc.) once my CMake work takes over
Comment 16 peavo 2014-08-06 11:18:03 PDT
(In reply to comment #15)
> (From update of attachment 236119 [details])
> In the near future we'll have to add more things like this (bison, flex, gperf, etc.) once my CMake work takes over

Sounds good, thanks for reviewing :)
Comment 17 WebKit Commit Bot 2014-08-06 11:49:13 PDT
Comment on attachment 236119 [details]
Patch

Clearing flags on attachment: 236119

Committed r172163: <http://trac.webkit.org/changeset/172163>
Comment 18 WebKit Commit Bot 2014-08-06 11:49:17 PDT
All reviewed patches have been landed.  Closing bug.