wiki:BuildingOnWindows

Version 27 (modified by Adam Roben, 15 years ago) ( diff )

Added a link to a page containing ideas about how to improve the Windows build process

Building on Windows

See Windows Build System Brainstorming for ideas about how to make building on Windows easier.

Follow the instructions on http://webkit.org/building/tools.html to install the necessary developer tools, support libraries, and check out the WebKit code.

Note that it is safest to build WebKit in your Cygwin home directory. At the moment, there seems to be an implicit assumption in the build scripts that paths will be relative to the home directory.

Building from within Visual Studio

WebKit can be built from within Visual Studio by setting two environment variables:

  • WEBKITOUTPUTDIR - An absolute Windows-style path pointing to the directory where you want the build products to go.
  • WEBKITLIBRARIESDIR - An absolute Windows-style path pointing to the WebKitLibraries/win folder in your WebKit checkout.

Common Build Errors

Error spawning cmd.exe

Sometimes, Visual Studio complains that it 'cannot spawn cmd.exe'. Should this happen, check if both your Cygwin\bin folder and c:\windows\sytem32 are both in the Visual Studio list of executable files (Tools -> Options -> VC++ Directories).

Missing Autogenerated Files

If you have the Visual Studio IDE open while you are performing an update-webkit, you can sometimes run into a strange problem where Visual Studio is unable to locate the autogenerated files. These files are usually things like HTMLNames.cpp, which are generated by Perl as part of the WebCoreGenerated target.

The best way to resolve this is to exit from the IDE, then relaunch. This usually fixes the problem, though you may wish to clean and rebuild the JavaScriptCoreGenerated and WebCoreGenerated projects.

Bad line endings

When you see errors in WebCore/css/makeprops or WebCore/css/maketokenizer, open those files in a suitable editor (SciTE works) and convert the line endings to LF only (Unix-style). Then restart the build.

Visual C++ Express Edition

1>c:\cygwin\home\admin\webkit\javascriptcore\wtf\assertions.cpp(45) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

If you see errors like this you probably need to install the platform SDK.

WebKitLibrariesDir

If you see errors opening the WebKit solution in Visual Studio/Visual C++ Express that say:

"$(WebKitLibrariesDir)/tools/vsprops/common.vsprops could not be found or failed to load"

(or some other .vsprops file), you must set the "WebKitLibrariesDir" environment variable. Make sure that "WebKitLibrariesDir" points to the "WebKitLibraries/win" directory, not the "WebKitLibraries/" directory.

Missing packages in Cygwin

You may have had cygwin already installed before attempting to build WebKit. In this case, you should have checked your cygwin setup to make sure that you have at least the following packages installed: bison, gawk, flex, gperf, perl, zlib. The error reports you get when you miss one such package are particularly cryptic and may not lead you to those packages.

If you'd rather reconcile each package and version manually, rather than use the cygwin installer, you may find the list of packages included in the cygwin installer useful.

Other Common Errors

Error launching Apache from run-webkit-tests on Vista

You need to rebase libphp4.dll. Run the following command:

/bin/rebase -d -b 0x70000000 -o 0x10000 WebKit/LayoutTests/http/conf/libphp4.dll

Debugging information cannot be found

When following the instructions on http://webkit.org/building/debug.html on how to debug WebKit on Windows, Visual Studio displays the message:

"Debugging information for 'Safari.exe' cannot be found or does not match. No symbols loaded."

Check that you followed the instructions on how to configure Visual Studio to use Apple's Safari for Windows symbol server on the bottom of http://webkit.org/building/debug.html.

If you still run into the issue, it is possible that the symbols for the version of Safari that you are running have not been posted yet. Make sure you are signed up for webkit-dev mailing list (http://lists.webkit.org/mailman/listinfo/webkit-dev), as an announcement will go out there when any new symbols are posted.

Note: See TracWiki for help on using the wiki.