Hello, I've followed and re-checked the steps for building with VC++ 2005 Express at http://webkit.org/building/tools.html and have run ~/WebKit/Tools/Scripts/update-webkit numerous times at my both WinXP SP3 PCs, but the builds always fail with: afarber@AFARBER-DT:~> ./WebKit/Tools/Scripts/build-webkit WebKitSupportLibrary is up-to-date. Building results into: /home/afarber/WebKit/WebKitBuild WEBKITOUTPUTDIR is set to: C:\cygwin\home\afarber\WebKit\WebKitBuild WEBKITLIBRARIESDIR is set to: C:\cygwin\home\afarber\WebKit\WebKitLibraries\win /cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe win\WebKit.vcproj\WebKit.sln /build Release Can't exec "WebKit/Tools/Scripts/print-vse-failure-logs": No such file or directory at ./WebKit/Tools/Scripts/build-webkit line 573. ===== BUILD FAILED ====== Please ensure you have run WebKit/Tools/Scripts/update-webkit to install dependencies. You can view build errors by checking the BuildLog.htm files located at: /home/afarber/WebKit/WebKitBuild/obj/<project>/<config>. To workaround the logging error above I've just replaced the path by hardcoded one in build-webkit script: #system(File::Spec->catfile($scriptDir, "print-vse-failure-logs")); system("/home/afarber/WebKit/Tools/Scripts/print-vse-failure-logs"); Regards Alex
Maybe we should just use an absolute path instead of a relative path.
The error seems to occur in module webkitdirs.pm, function relativeScriptsDir, line 974: my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel(dirname($0), getcwd()), ""); Function 'dirname' already returns a relative path (at least in Cygwin), but this path is relative to the "first path", from that the user calls build-webkit. Functions like 'chdir' don't change this path. E.g., if you run build-webkit from ~ (home), 'dirname($0)' (from webkitdirs) will return 'WebKit/Tools/Scripts' (path relative to ~). But 'getcwd()' will return '/home/<user>/WebKit', not '/home/<user>', because working directory has changed before by 'chdirWebKit()' (in build-webkit, from webkitdirs).
Na, Na. The bug, in true, is the use of $0 in relativeScriptsDir. xD Variable $0 doesn't change when working directory is changed. I suggest to declare an $absoluteScriptsDir in webkitdirs.pm, that will be used by relativeScriptsDir : my $absoluteScriptsDir = File::Spec->rel2abs(dirname($0), getcwd()); sub relativeScriptsDir() { my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel($absoluteScriptsDir, getcwd()), ""); if ($scriptDir eq "") { $scriptDir = "."; } return $scriptDir; } I tested it and it seems ok. :)
Created attachment 83079 [details] changed WebKit/Tools/Scripts/webkitdirs.pm , 1 line added (72), 1 line changed (975).
Attachment 83079 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files']" exit_code: 1 Total errors found: 0 in 0 files If any of these errors are false positives, please file a bug against check-webkit-style.
Felipe, thanks for working on the issue you're seeing. Please file a new bug for your issue, since it is quite different from the one originally reported here by A. Farber.
Comment on attachment 83079 [details] changed WebKit/Tools/Scripts/webkitdirs.pm , 1 line added (72), 1 line changed (975). This does not appear to be a patch. Please create a patch using ./Tools/Script/svn-create-patch. Also, you'll need to write a ChangeLog, as described in http://www.webkit.org/coding/contributing.html
Created attachment 83410 [details] This is the patch Sorry, I was not attempt in how to create a patch. This is the desired patch, and I checked old as obsolete.
Comment on attachment 83410 [details] This is the patch View in context: https://bugs.webkit.org/attachment.cgi?id=83410&action=review > Tools/Scripts/webkitdirs.pm:72 > +my $absoluteScriptsDir = File::Spec->rel2abs(dirname($0), getcwd()); I don't think the getcwd() is needed. Maybe it would be better to use $FindBin::Bin instead?
Comment on attachment 83410 [details] This is the patch Needs a ChangeLog. webkit-patch upload should automatically create on for you.
>I don't think the getcwd() is needed. > >Maybe it would be better to use $FindBin::Bin instead? It appears ok to me. Only a risk : FindBin might never be called before webkitdirs.pm by a module/script that was not in Scripts directory, because $FindBin::Bin is valued only once.
Created attachment 85436 [details] snapshot of the failed builds
with reference to bug no. 53590 which has been observed on Windows XP SP3,we would like to state that the same was tried on windows XP SP2. And the same error was encountered with the difference in the line number.In the original bug report(on Windows XP SP3) it is stated as line number 573 while the build on windows XP SP2 established on line 596. The build was tried on two PCs with windows XP SP2. The attachment is the snapshot of both the cygwin shells showing build failed(differentiated by observing the user name).
Comment on attachment 83410 [details] This is the patch Please write a ChangeLog for this patch and resubmit it. <http://www.webkit.org/coding/contributing.html> will tell you how to do so.
Created attachment 85801 [details] patch
Comment on attachment 85801 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=85801&action=review > Tools/ChangeLog:8 > + * Scripts/webkitdirs.pm: It would be good to add a function-level comment explaining this change. Something like: (relativeScriptsDir): Ensure we use the directory that contains webkitdirs.pm, not the one that contains the original script that was invoked. > Tools/Scripts/webkitdirs.pm:1 > -# Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. > +# Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. Please undo this change.
Created attachment 85886 [details] patch Sorry, my editor has added a BOM automatically in the files.
Comment on attachment 85886 [details] patch Clearing flags on attachment: 85886 Committed r81219: <http://trac.webkit.org/changeset/81219>
All reviewed patches have been landed. Closing bug.