Apr 022013
 

I’ve mentioned in a past post that it was conceived while reading the source code for the System.Diagnostics.Process class. This post is about the reason that pushed me to read the source code in an attempt to fix the issue. It turned out that this was yet another case of Leaky Abstraction, which is a special interest of mine.

As it turned out, this post ended being way too long (even for me). I don’t like installments, but I felt that it is something that is worth trying as the size was prohibitive for single-post consumption. As such, I’ve split it up on 5 parts, so that each part would be around a 1000 words or less. I’ll post one part a day.

To give you an idea of the scope and subject of what’s to come, here is a quick overview. In part 1 I’ll lay out the problem. We are trying to spawn processes, read their output and kill if they take too long. Our first attempt is to use simple synchronous I/O to read the output and discover a deadlock. We solve the deadlock using asynchronous I/O. In part 2 we parallelize the code and discover reduced performance and yet another deadlock. We create a testbed and set about to investigate the problem at depth. In part 3 we will find out the root cause and we’ll discuss the mechanics (how and why) we hit such a problem. In part 4 we’ll discuss solutions to the problem and develop a generic solutions (with code) to fix the problem. Finally, in part 5 we see whether or not a generic solution could work before we summarize and conclude.

Let’s begin at the very beginning. Suppose you want to execute some program (call it child), get all its output (and error) and, if it doesn’t exit within some time limit, kill it. Notice that there is no interaction and no input. This is how tests are executed in Phalanger using a test runner.

Synchronous I/O

The Process class has conveniently exposed the underlying pipes to the child process using stream instances StandardOutput and StandardError. And, like many, we too might be tempted to simply call StandardOutput.ReadToEnd() and StandardError.ReadToEnd(). Albeit, that would work, until it doesn’t. As Raymond Chen noted, it’ll work as long as the data fits into the internal pipe buffer. The problem with this approach is that we are asking to read until we reach the end of the data, which will only happen for certainty when the child process we spawned exits. However, when the buffer of the pipe which the child writes its output to is full, the child has to wait until there is free space in the buffer to write to. But, you say, what if we always read and empty the buffer?

Good idea, except, we need to do that for both StandardOutput and StandardError at the same time. In the StandardOutput.ReadToEnd() call we read every byte coming in the buffer until the child process exits. While we have drained the StandardOutput buffer (so that the child process can’t be possibly blocked on that,) if it fills the StandardError buffer, which we aren’t reading yet, we will deadlock. The child won’t exit until it fully writes to the StandardError buffer (which is full because no one is reading it,) meanwhile, we are waiting for the process to exit so we can be sure we read to the end of the StandardOutput before we return (and start reading StandardError). The same problem exists for StandardOutput, if we first read StandardError, hence the need to drain both pipe buffers as they are fed, not one after the other.

Async Reading

The obvious (and only practical) solution is to read both pipes at the same time using separate threads. To that end, there are mainly two approaches. The pre-4.0 approach (async events), and the 4.5-and-up approach (tasks).

Async Reading with Events

The code is reasonably straight forward as it uses .Net events. We have two manual-reset events and two delegates that get called asynchronously when we read a line from each pipe. We get null data when we hit the end of file (i.e. when the process exits) for each of the two pipes.

        public static string ExecWithAsyncEvents(string path, string args, int timeoutMs)
        {
            using (var outputWaitHandle = new ManualResetEvent(false))
            {
                using (var errorWaitHandle = new ManualResetEvent(false))
                {
                    using (var process = new Process())
                    {
                        process.StartInfo = new ProcessStartInfo(path);
                        process.StartInfo.Arguments = args;
                        process.StartInfo.UseShellExecute = false;
                        process.StartInfo.RedirectStandardOutput = true;
                        process.StartInfo.RedirectStandardError = true;
                        process.StartInfo.ErrorDialog = false;
                        process.StartInfo.CreateNoWindow = true;

                        var sb = new StringBuilder(1024);
                        process.OutputDataReceived += (sender, e) =>
                        {
                            sb.AppendLine(e.Data);
                            if (e.Data == null)
                            {
                                outputWaitHandle.Set();
                            }
                        };
                        process.ErrorDataReceived += (sender, e) =>
                        {
                            sb.AppendLine(e.Data);
                            if (e.Data == null)
                            {
                                errorWaitHandle.Set();
                            }
                        };

                        process.Start();
                        process.BeginOutputReadLine();
                        process.BeginErrorReadLine();

                        process.WaitForExit(timeoutMs);
                        outputWaitHandle.WaitOne(timeoutMs);
                        errorWaitHandle.WaitOne(timeoutMs);

                        process.CancelErrorRead();
                        process.CancelOutputRead();

                        return sb.ToString();
                    }
                }
            }
        }

We certainly can improve on the above code (for example we should make the total wait limit <= timeoutMs) but you get the point with this sample. Also, no error handling or killing the child process when it times out and doesn’t exit.

Async Reading with Tasks

A much more simplified and sanitized approach is to use the new System.Threading.Tasks namespace/framework to do all the heavy-lifting for us. As you can see, the code has been cut by half and it’s much more readable, but we need Framework 4.5 and newer for this to work (although my target is 4.0, but for comparison purposes I gave it a spin). The results are the same.

        public static string ExecWithAsyncTasks(string path, string args, int timeout)
        {
            using (var process = new Process())
            {
                process.StartInfo = new ProcessStartInfo(path);
                process.StartInfo.Arguments = args;
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardError = true;
                process.StartInfo.ErrorDialog = false;
                process.StartInfo.CreateNoWindow = true;

                var sb = new StringBuilder(1024);

                process.Start();
                var stdOutTask = process.StandardOutput.ReadToEndAsync();
                var stdErrTask = process.StandardError.ReadToEndAsync();

                process.WaitForExit(timeout);
                stdOutTask.Wait(timeout);
                stdErrTask.Wait(timeout);

                return sb.ToString();
            }
        }

Again, a healthy doze of error-handling is in order, but for illustration purposes left out. A point worthy of mention is that we can’t assume we read the streams by the time the child exits. There is a race condition and we still need to wait for the I/O operations to finish before we can read the results.

In the next part we’ll parallelize the execution in an attempt to maximize efficiency and concurrency.

Mar 182013
 

I don’t need to see the source code of an API to code against. In fact, I actively discourage against depending (even psychologically) on the inner details of an implementation. The contract should be sufficient. Of course I’m assuming a well-designed API with good (at least decent) documentation. But sometimes often reality is more complicated than an ideal world.

Empty try{}

While working with System.Diagnostics.Process in the context of Parallel.ForEach things became a bit too complicated. (I’ll leave the gory details to another post.) What prompted this post was a weird pattern that I noticed while browsing Process.cs, the source code for the Process class (to untangle said complicated scenario).

RuntimeHelpers.PrepareConstrainedRegions();
try {} finally {
   retVal = NativeMethods.CreateProcessWithLogonW(
		   startInfo.UserName,
		   startInfo.Domain,
		   password,
		   logonFlags,
		   null,            // we don't need this since all the info is in commandLine
		   commandLine,
		   creationFlags,
		   environmentPtr,
		   workingDirectory,
		   startupInfo,        // pointer to STARTUPINFO
		   processInfo         // pointer to PROCESS_INFORMATION
	   );
   if (!retVal)
	  errorCode = Marshal.GetLastWin32Error();
   if ( processInfo.hProcess!= (IntPtr)0 && processInfo.hProcess!= (IntPtr)NativeMethods.INVALID_HANDLE_VALUE)
	  procSH.InitialSetHandle(processInfo.hProcess);
   if ( processInfo.hThread != (IntPtr)0 && processInfo.hThread != (IntPtr)NativeMethods.INVALID_HANDLE_VALUE)
	  threadSH.InitialSetHandle(processInfo.hThread);
}

This is from StartWithCreateProcess(), a private method of Process. So no surprises that it’s doing a bunch of Win32 native API calls. What stands out is the try{} construct. But also notice the RuntimeHelpers.PrepareConstrainedRegions() call.

Thinking of possible reasons for this, I suspected it had to do with run-time guarantees. The RuntimeHelpers.PrepareConstrainedRegions() call is a member of CER. So why the need to use empty try if we have the PrepareConstrainedRegions call? Regrettably, I confused it with the empty try clause. In reality, the empty try construct has nothing to do with CER and everything with execution interruption by means of ThreadAbortException.

A quick search hit Siddharth Uppal’s The empty try block mystery where he explains that Thread.Abort() never interrupts code in the finally clause. Well, not quite.

Thread.Abort and finally

A common interview question, after going through the semantics of try/catch/finally, is to ask the candidate if finally is always executed (since usually that’s the wording they use). Are there no scenarios where one could conceivably expect their code in finally never to get executed? A creative response is usually when we have an an “infinite loop” in the try or catch (if it gets called). Novice candidates are easily confused when they consider a premature termination of the process (or thread). After all, one would expect that there be some consistency in the behavior of code. So why shouldn’t finally always get executed, even in a process termination scenario?

It’s not difficult to see that there is a struggle of powers between the termination party and the code/process in question. If finally always executes, there would be no guarantees for termination. Yes, we cannot guarantee both that finally will always execute while guaranteeing that termination will always succeed. One or both must have weak guarantees (or at least weaker guarantees than the other). When push comes to shove, we (as users or administrators) want to have full control over our machines, so we choose to have the ultimate magic wand to kill and terminate any misbehaving (or just undesirable) process.

The story is a little bit different when it comes to aborting individual threads, however. Where on the process level the operating system can terminate it with a sweeping gesture, in the managed world things are more controlled. The CLR can see to it that any thread that is about to get terminated (by a call to Thread.Abort()) is done cleanly and respecting all the language and runtime rules. This includes executing finally blocks as well as finalizers.

ThreadAbortException weirdness

When aborting a thread, the apparent behavior is one of an exception thrown from within the thread in question. When another thread invokes Thread.Abort() on our thread, a ThreadAbortException is raised from our thread code. This is called asynchronous thread abort, as opposed to synchronous abort, when a thread invokes Thread.CurrentThread.Abort() (invariantly on itself). Other asynchronous exceptions include OutOfMemoryException and StackOverflowException.

The behavior, then, is exactly as one would expect when an exception is raised. The exception bubbles up the stack, executing catch and finally blocks as one would expect from any other exception. There are, however, a couple of crucial differences between ThreadAbortException and other Exceptions (with the exception of StackOverflowException, which can’t be caught at all). First, this exception can’t be suppressed by simply catching it – it is automatically rethrown right after exiting the catch clause that caught it. Second, throwing it does not abort the running thread (it must be done via a call to Thread.Abort()).

The source for this behavior of ThreadAbortException is the abort requested flag, which is set when Thread.Abort() is invoked (but not when it is thrown directly). CLR then checks for this flag at certain check-points and proceeds to raise the exception, which normally is raised between any two machine instructions. This guarantees that the exception will not get thrown when executing a finally block or when executing unmanaged code.

So the expectation of the novice interviewee (and Mr. Uppal’s) was right after all. Except, it wasn’t. We are back full circle to the problem between the purpose of aborting a thread, and the possibility of an ill behaved code never giving up at all. I am being too generous when I label code that wouldn’t yield to a request to abort as “ill behaved.” Because ThreadAbortException is automatically rethrown from catch causes, the only way to suppress it is to explicitly call Thread.ResetAbort() which clears the abort requested flag. This is intentional as developers are in the habit of writing catching-all clauses very frequently.

AppDomain hosting

So far we’ve assumed that we just might need to terminate a process, no questions asked. But why would one need to abort individual threads within a process? The answer lies with hosting. In environments such as IIS or SQL servers, the server should be both fast and reliable. This led to the design of compartmentalizing processes beyond threads. AppDomain groups processing units within a single process such that spawning new instances is fast (faster than spawning a complete new process,) but at the same time it’s grouped such that they can be unloaded on demand. When an AppDomain instance takes longer than the configured time (or consumes some resource more than it should,) it’s deemed ill-behaved and the server will want to unload it. Unloading includes aborting every thread within the AppDomain in question.

The problem is yet again one of conflict between guarantees. This time, though, the termination logic needs to play along, or else. When terminating a process, the complete process memory is released, along with all its system resources. If the managed code or CLR don’t do that, the operating system will. In a hosted execution environment, the host wants to have full control over the life-time of an AppDomain (with all its threads,) all the while, when it decides to purge of it, it does not want to destabilize the process or, worse, itself or the system at large. When unloading an AppDomain, the server wants to give it a chance to cleanup and release any shared resources, including files and sockets and synchronization objects (i.e. locks,) to name but a few. This is because the process will continue running, hopefully for a very long time. Hence the behavior of ThreadAbortException that calls every catch and finally as it should.

In return, any process that wants to play rough gets to call Thread.ResetAbort() and go on with its life, thereby defeating the control that the server enjoyed. The server invariantly has the upper hand, of course. After a second limit is exceeded, after invoking Thread.Abort(), in the words of Tarantino, the server may “go medieval” on the misbehaving AppDomain.

Rude Abort/Unload/Exit

When a thread requested to abort doesn’t play along, it warrants rudeness. The CLR allows a host to specify escalation policy in similar events, such that the host would escalate a normal thread abort into a rude thread abort. Similarly, a normal AppDomain unload and process exit may be escalated to a rude ones.

But we all know that the server doesn’t want to be too inconsiderate. It wouldn’t want to jeopardize its stability in the wake of this arms race between it and the hosted AppDomain. For that, it wants to have some guarantees. More stringent guarantees from the code in question that it will not misbehave again, when given half a chance. One such guarantee is that the finalization code will not have ill side-effects.

In a rude thread abort event, the CLR forgoes calling any finally blocks (except those marked as Constrained Execution Regions, or CER for short) as well as any normal finalizer. But unlike mere finally blocks, finalizers are a much more serious bunch. They are functions with consequences. Recall that finalization serves the purpose of releasing system resources. In a completely managed environment, with garbage collection and cleanup, the only resources that needs special care are those that aren’t managed. In an ideal scenario, one wouldn’t need to implement finalizers at all. The case is different when we need to wrap a system resource that is not managed (this includes native DLL invoking). All system resources that are represented by the framework are released precisely using a finalizer.

Admittedly, if we are developing standalone applications, as opposed to hosted, we don’t have to worry about the possibility of escalation and rude abort or unload. But then again, why should we worry about Thread.Abort() at all in such a case? Either our code could issue such a harsh request, which we should avoid like the plague and opt to more civil cancellation methods, such as raising events or setting shared flags (with some special care), or, our code is in a library that may be called either from a standalone application or a hosted one. Only in the latter case must we worry and prepare for the possibility of rude abort/unload.

Critical Finalization and CER

Dispose() is called in finally blocks, either manually us via the using clause. So the only correct way to dispose objects during such an upheaval is to have finalizers on these objects. And not just any finalizer, but Critical Finalizers. This is the same technique used in SafeHandle to ensure that native handles are correctly released in the event of a catastrophic failure.

When things get serious, only finalizers marked as safe are called. Unsurprisingly, attributes are used to mark methods as safe. The contract between CLR and the code is a strict one. First, we communicate how critical a function is, in the face of asynchronous exceptions by marking their reliability. Next, we void our rights to allocate memory, which isn’t trivial, since this is done transparently in some cases such as P/Invoke marshaling, locking and boxing. In addition, the only methods we can call from within a CER block are those with strong reliability guarantees. Virtual methods that aren’t prepared in advance cannot be called either.

This brings us full circle to RuntimeHelpers.PrepareConstrainedRegions(). What this call does is it tells the CLR to fully prepare the proceeding code, by allocating all necessary memory, ensuring there is sufficient stack space, JITing the code, which completely loads any assemblies we may need.

Here is a sample code that demonstrates how this works in practice. When the ReliabilityContract attribute is commented out, the try block is executed before the finally block, which fails. However, with the ReliabilityContract attribute, the PrepareConstrainedRegions() call fails to allocate all necessary memory beforehand and therefore doesn’t even attempt to execute the try clause, nor the finally, instead the exception is thrown immediately.

There are three forms to execute code in Constrained Execution Regions (from the BCL Team Blog):

  • ExecuteCodeWithGuaranteedCleanup, a stack-overflow safe form of a try/finally.
  • A try/finally block preceded immediately by a call to RuntimeHelpers.PrepareConstrainedRegions. The try block is not constrained, but all catch, finally, and fault blocks for that try are.
  • As a critical finalizer – any subclass of CriticalFinalizerObject has a finalizer that is eagerly prepared before an instance of the object is allocated.
    • A special case is SafeHandle’s ReleaseHandle method, a virtual method that is eagerly prepared before the subclass is allocated, and called from SafeHandle’s critical finalizer.

Conclusion

Normally, CLR guarantees clean execution and cleanup (via finally and finalization code) even in the face of asynchronous exceptions and thread abort. However it does preserve the right to take a harsher measure if the host escalates things. Writing code in finally blocks to avoid dealing with the possibility of asynchronous exceptions, while not the best practice, will work. When we abuse this, by reseting abort requests and spending too long in finally blocks, the host will escalate things to rude unload and will aggressively rip the AppDomain with all its threads, bypassing finally blocks, unless in a CER block, as the above code did.

So, finally blocks are not executed when a rude abort/unload is in progress (unless in CER), when the process is terminated (by the operating system), when an unhandled exception is raised (typically in unmanaged code or in the CLR) or in background threads (IsBackground == true) when all foreground threads have exited.

Nov 032012
 

I’ve just restarted working on Compressed Pristines feature for Subversion (a separate post on that later). I thought it’d be interesting to first have a quick summary of getting Subversion built from the sources in as little effort as possible.

Prerequisites

Ubuntu doesn’t come preinstalled with all the necessary development tools. So first we need to install all the tools necessary to build Subversion. One easy trick is to ask apt-get to do all the hard work for us. But first, let’s make sure we have an up-to-date system:

sudo apt-get update
sudo apt-get upgrade

Now, let’s get all the relevant dependencies:
sudo apt-get build-dep subversion

On a clean install of Ubuntu 12.10 64-bit the above installs 158 new packages. These include build-essential, autoconf and autotools-dev. The majority of the remaining are libraries, languages and frameworks that Subversion depends on one way or another. Apache, for example, is necessary to build the server modules. Similarly, Python and Ruby bindings depend on their respective systems.

After downloading, unpacking and installing a few 100 MBs, we’re finally ready.

Getting the Code

Since we need Subversion to checkout Subversion sources, we will download the source archive instead. The project download page lists recommended release download links. From there, we get the tar.gz or tar.bz2 of our choice. This time around, it’s 1.7.7 for me.


wget http://apache.mirror.nexicom.net/subversion/subversion-1.7.7.tar.bz2
tar -xjvf subversion-1.7.7.tar.bz2
cd subversion-1.7.7

It’s best to do this in /usr/local/src as that’s the “default” folder where user-generated sources should go. For convenience, we can ln -s -t $HOME/ /usr/local/src to create a symbolic link in our home directory called src that really points to /usr/local/src. One inconvenience about /usr/local/src is that we must be superuser to write to it.

Configuring the Source

Once we have the source code extracted, we need to prepare it. Since Subversion is part of the Apache Software Foundation, it naturally uses the APR library (Apache Portable Runtime) which has been the cornerstone of Apache server and many other high-availability projects. To get all core libraries that Subversion depends on to build, there is a very convenient shell script in the root of the sources aptly named get-deps.sh. Once the APR and Surf and other libs are downloaded and extracted, we need prep them for configuration. The following will do all that with much simplicity.


./get-deps.sh
cd apr/; ./buildconf; cd ..
cd apr-util/; ./buildconf; cd ..
cd apr-util/xml/expat/; ./buildconf.sh; cd ../../..
./autogen.sh

Now we can finally configure.


./configure

All went as planned, except I got this harmless warning:

configure: WARNING: we have configured without BDB filesystem support

You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.  We have created Makefile which will build
Subversion without support for the Berkeley DB back-end.  You can find the
latest version of Berkeley DB here:
  http://www.oracle.com/technology/software/products/berkeley-db/index.html

Build and Install

And finally:

make && make check

And if all goes well, the last line should read:

SUMMARY: All tests successful.

Now, let’s install it our shiny Subversion build:

Alternative/Minimalistic Configure

If we don’t want or need all those dependencies, and would rather settle for a fast build of a client-only, without Apache and whatnot, here is a trimmed-down config, make and check that gives a minimalistic working client.

./configure --disable-mod-activation --without-gssapi --without-apxs --without-berkeley-db --without-serf --without-swig --without-ctypesgen --without-kwallet --without-gnome-keyring --disable-javahl --disable-keychain -C

make mkdir-init external-all fsmod-lib ramod-lib lib bin

make check TESTS="`echo subversion/tests/cmdline/{basic_tests.py,merge_tests.py}`"

sudo make install

$ svn --version
svn, version 1.7.7 (r1393599)
   compiled Nov  3 2012, 13:53:08

Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

Summary

Building Subversion can be a real pain, with all the dependencies and configuration options. However, with the right steps, it’s actually a breeze. To summarize, here the full script of commands as we executed them in one chunk:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get build-dep subversion

wget http://apache.mirror.nexicom.net/subversion/subversion-1.7.7.tar.bz2
tar -xjvf subversion-1.7.7.tar.bz2
cd subversion-1.7.7

./get-deps.sh
cd apr/; ./buildconf; cd ..
cd apr-util/; ./buildconf; cd ..
cd apr-util/xml/expat/; ./buildconf.sh; cd ../../..
./autogen.sh

./configure
make && make check
sudo make install
Sep 232012
 

While building WebKit using the latest incarnation of Visual Studio, VS2012, I’ve hit compiler errors in gtest that seemed overwhelming. Since the errors were clearly coming from a testing framework, I thought it was reasonable to wait until it was fixed. After all, WebKit did build, sans tests of course, and VS2012 is new.

I thought it interesting to find the root cause. It turned out to be a rather simple fix. And I learned a thing or two along the way. First, this is a known issue and a bug was reported to gtest back in early June. But I discovered the solution from StackOverflow first.

The Visual Studio 2012 C++ compiler adds a number of new C++11 features and improvements. Historically, when there was no variable template argument support in the language, implementations had to support many versions of the template class or function in question each with an increasing number of arguments. This resulted in a lot of tedious work, which was sometimes auto-generated by scripts macros, but also caused bloat in both source code and compiler time and resources. Worst of all is that it always limited the maximum number of arguments to the template in question. One had to manually create versions with more and more arguments to satisfy their needs. With Variadic templates all of that will be history. All except for compile time, perhaps. There is a certain overhead to adding language features after all.

A decision was made within the VS2012 C++ standard library team, a.k.a. Stephan T. Lavavej or STL as he’s also known, to change the implementation of variadic template headers as explained on the features page of the new compiler (scroll to “Faux variadics”). Astute developers will have figured out that this means that the compiler doesn’t support variadic templates yet. Otherwise, they’d need to reimplement the templates in question using the new and shiny variadic template feature and, well, we wouldn’t be having this discussion.

Unfortunately for us, the new compiler, while improved on many fronts including the standard library, seems to have regressed in terms of memory consumption. This forced the team to reduce the default number of template arguments to 5 instead of the previous 10. As a result, gtest fails to compile where it passes 6 or more parameters to std::tuple, for example. A workaround is supported, with the caveat that increasing the compiler memory limit -using the /Zm switch- might be necessary, in the form of a preprocessor macro: _VARIADIC_MAX.

After passing /D_VARIADIC_MAX=10 to the compiler, not only does gtest compile cleanly, but so does all of WebKit. The fix is to add to our patch a small section:

    if ($versionName eq "vs2012")
    {
        print $fh "\@echo  Increasing vardiadic limit to 10 (_VARIADIC_MAX=10).\r\n";
        $replace_string = "s/\\<PreprocessorDefinitions\\>_VARIADIC_MAX=10;/\\<PreprocessorDefinitions\\>/g"; # Delete _VARIADIC_MAX=10.
        print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
        $replace_string = "s/\\<PreprocessorDefinitions\\>/\\<PreprocessorDefinitions\\>_VARIADIC_MAX=10;/g"; # Add _VARIADIC_MAX=10.
        print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
    }

And we have a new patch that includes this fix and a couple of other improvements that builds WebKit with VS2010 and VS2012.

Sep 042012
 

I didn’t set out to build WebKit with VS2012, but that’s exactly what I ended up doing anyway…

I just built a new workstation from scratch. Clean as a baby’s memory, I thought it’d be fun to taste my own dog food. Starting with a newly installed Windows 7 64-bit and my previous walk-through I set to build WebKit.

Software Setup

  1. First, I downloaded the Cygwin downloader from here and ran it. Once complete, I ran setup.exe, gave it a target path and selected to install all packages.
  2. Next, I installed Visual Studio 2010. We really care about C++ tool chain. But other features may be safely installed.
  3. Windows SDK 7.1 was installed next. I chose to install the x64 version, of course. Again, we need only C++ for x64, but installing other stuff is fine.
  4. Now I could install Visual Studio 2010 SP1.
  5. And finally the fix to restore Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1 (because the SDK installs pre-SP1 files).

Notes:

      Cygwin has warned that the latest version (1.7) is a major update over the previous one. This sounded more like a hint that things might break. As we’ll see, this was not a vain warning.
      The order for installing Visual Studio and updates is important.

Preparation

I decided to attempt first to build what I knew to be a good source (with a large project like this, things break fast,) so i started with r106194. After extracting the archive, I copied the environment setup script (aptly called vs2010-build-env.cmd) from the previous post. Reviewed the Cygwin source path to be valid (I had to update it because I’ve since replaced Tools folder with Bin). Running the vs2010-build-env.cmd script As Administrator, I got a bash shell.

First attempt failed with a new error:

$ build-webkit --wincairo
Can't locate HTTP/Date.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/site_perl/5.14 /usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/i686-cygwin-threads-64int /usr/lib/pe
rl5/5.14 /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 .) at /cygdrive/c/Prj/WebKit/WebKit-r106194/Tools/Scripts/update-webkit-dependency line 39.
BEGIN failed--compilation aborted at /cygdrive/c/Prj/WebKit/WebKit-r106194/Tools/Scripts/update-webkit-dependency line 39.
Died at Tools/Scripts/update-webkit-wincairo-libs line 40.
Died at /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/build-webkit line 561.

Cygwin’s Perl package is missing the HTTP/Date.pm module. CPAN to the rescue:

$ cpan HTTP::Date
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes]

[Snipped a lot of CPAN output]

Running make install
Installing /usr/lib/perl5/site_perl/5.14/HTTP/Date.pm
Installing /usr/share/man/man3/HTTP.Date.3pm
Appending installation info to /usr/lib/perl5/5.14/i686-cygwin-threads-64int/perllocal.pod
  GAAS/HTTP-Date-6.02.tar.gz
  /usr/bin/make install  -- OK

Let’s try again:

$ build-webkit --wincairo
Checking Last-Modified date of WinCairoRequirements.zip...
Couldn't check Last-Modified date of new WinCairoRequirements.zip.
Please ensure that http://idisk.mac.com/bfulgham-Public/WinCairoRequirements.zip is reachable.
Unable to check Last-Modified date and no version of WinCairoRequirements to fall back to.
Died at Tools/Scripts/update-webkit-wincairo-libs line 40.
Died at /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/build-webkit line 561.

Apparently sometime since I built last in April and today Brent Fulgham’s mac.com page went dead. He is the maintainer and host of WinCairoRequirements. I had to either resurrect an old version from my backups or point the script to WinCairoRequirement’s new home. I chose to start with the latter. The updated script shows the new location of the archive to be http://dl.dropbox.com/u/39598926/WinCairoRequirements.zip. But replacing the old URL with the new one wouldn’t work. Apparently DropBox doesn’t report the last-modified date of a file, which is necessary to detect updates, so a workaround is also added in the relevant scripts. Seems that I need to move to newer source revision after all.

Before giving up on the old revision (which I know builds without errors) I decided to do manually what the update script does automatically. I copied the necessary WinCairoRequirement files from an old backup and commented out the perl update-webkit-wincairo-libs script.

# Updates a development environment to the new WebKitAuxiliaryLibrary

use strict;
use warnings;
use FindBin;

my $file = "WinCairoRequirements";
my $zipFile = "$file.zip"; 
my $winCairoLibsURL = "http://dl.dropbox.com/u/39598926/$zipFile";
my $command = "$FindBin::Bin/update-webkit-dependency";

#system("perl", $command, $winCairoLibsURL, ".") == 0 or die;

Now, I could see the build script complaining that it couldn’t find Visual Studio tools directory. It’s time to update the pdevenv script with support for VS2010. After replacing the pdevenv script with the one provided in my patch zip from the last post I built again. (Well, actually, I cheated: I have a newer and improved version of pdevenv script… more on that later.)

Elevated Mode

It’d be really nice if it were possible to request elevation automatically. There doesn’t seem to be a standard way of doing this, but Johannes Passing has created a tiny, but supremely useful, tool called Elevate to do just that.

Simply place the binary somewhere on your path (I have a special directory for similar utilities) and call pass the script file path as a parameter to it. There are many ways to use it. One is to create a single-line bat/cmd file with “Elevate cmd” in it. From the new prompt, one would call vs2010-build-env.cmd. Another solution is to place Elevate before the mklink calls in vs2010-build-env.cmd. The first has the advantage that you won’t be prompted more than once, but then again, that might elevate your risks as well.

Note: In the previous posts I suggested forcing Visual Studio to run as Administrator by changing the executable’s properties. However, this isn’t necessary, so long that we invoke it from an elevated shell. Because of (or thanks to, rather) the need for elevation to create symbolic link for Cygwin, there is no need to mess with Visual Studio binaries.

Back to WibKit.

Building

Running build-webkit --wincairo again throws a new error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error MSB6001: Invalid command line switch for "CL.exe". Item has already been added. Key in dictionary: 'tmp'  Key being added: 'TMP'

A quick search shows that we have duplicate entries in the environment variable. Sounds like another new Cygwin issue. Let’s see what our environment variables look like:

$ printenv | sort

[Snip]
TEMP=/tmp
temp=C:\Users\Ash\AppData\Local\Temp
TERM=cygwin
TMP=/tmp
tmp=C:\Users\Ash\AppData\Local\Temp
[Snip]

Seems that we do have duplicates after all. Previously Cygwin used to upper-case all environment variables, so duplicates that deferred in case only got eliminated. Cl seems to be doing something very similar, only it does detect the duplication and doesn’t silently overwrite one another. What is odd is that the lower-case versions seem to be inherited from Windows, where they are all-caps. Calling set in cmd shows all variable names to be in caps. I’m tempted to think that Cygwin is changing the Windows-inherited variables that conflict with its list to lower-case.

The following Perl snippet does the trick:

# Fix up any env variables that differ only in case.
foreach my $key (sort keys(%ENV)) {
    my $upper_key = uc($key);
    my $dup = $ENV{$upper_key};
    if ($dup && ($dup ne $ENV{$key}))
    {
        # Dups break CL.exe, so we need to remove either one. Since Cygwin seems to make Windows-inherited
        # entries lower-case, and since CL plays better with Windows paths, we remove the upper-case one.
        # There seems to be a bug in MSBuild.exe in that stays resident across builds, so environment
        # variables changes aren't applied to future builds unless it's killed to force respawning.
        print "Found duplicate env-var (rm $upper_key): \t$key = $ENV{$key}\t\t$upper_key = $dup\n";
        delete $ENV{$upper_key};
    }
}

…well, not quite. Turns out MSBuild.exe, which is a background process that visual studio employs for building, needs to be killed so it would run with our modified environment variables. Otherwise, whatever changes we make to the environment variables, MSBuild.exe will ignore and all CL.exe instances will inherit whatever MSBuild.exe has. This is certainly a bug in the design of MSBuild in that it doesn’t detect and update its environment variables. Instead, it just assumes that whatever it has on the first run will be valid on future runs. Clearly an unwarranted assumption.

Let’s try building again after killing MSBuild.exe and with the new script.

Success, At Last

Here is the complete output, with Quiet log-level, for reference:

$ build-webkit --wincairo
Building results into: /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/WebKitBuild
WEBKITOUTPUTDIR is set to: C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild
WEBKITLIBRARIESDIR is set to: C:\Cygwin\home\Ash\WebKit-r106194\WebKitLibraries\win
/cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/pdevenv win\WebKit.vcproj\WebKit.sln /build Release_Cairo_CFLite
Current working directory: /cygdrive/c/Prj/WebKit/WebKit-r106194/Source/WebKit
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/autogen.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/make-generated-sources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/gyp/generate-derived-sources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/gyp/generate-dtrace-header.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/gyp/run-if-exists.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/gyp/update-info-plist.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/ThirdParty/ANGLE/src/compiler/generate_parser.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/ThirdParty/gtest/xcode/Samples/FrameworkSample/runtests.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/ThirdParty/gtest/xcode/Scripts/runtests.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/make-generated-sources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/move-js-headers.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/copy-forwarding-and-icu-headers.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/copy-inspector-resources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/generate-derived-sources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/generate-webcore-export-file-generator.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/run-if-exists.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/streamline-inspector-source.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/gyp/update-info-plist.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/inspector/compile-front-end.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/WebCore.gyp/mac/adjust_visibility.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/WebCore.gyp/mac/check_objc_rename.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/WebCore.vcproj/build-generated-files.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebCore/WebCore.vcproj/migrate-scripts.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Source/WebKit2/win/build-generated-files.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/CygwinDownloader/make-zip.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/EWSTools/boot.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/EWSTools/start-queue.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/iExploder/iexploder-1.7.2/tools/release_src.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/webkit-tools-completion.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/WebKitTestRunner/win/build-generated-files.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/WebKitLibraries/win/tools/scripts/auto-version.sh to Unix format ...
dos2unix: converting file /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/WebKitLibraries/win/tools/scripts/feature-defines.sh to Unix format ...
Found duplicate env-var: temp = C:\Users\Ash\AppData\Local\Temp         TEMP = /tmp - Deleting temp.
Found duplicate env-var: tmp = C:\Users\Ash\AppData\Local\Temp          TMP = /tmp - Deleting tmp.
Running cmd /c "call C:\Bin\CYGWIN~1\tmp\KSVECI~1.CMD"
print() on closed filehandle $fh at /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/pdevenv line 149.
Using VS2010 toolchain.

Upgrading solution file @ C:\Prj\WebKit\WebKit-r106194\Source\WebKit\win\WebKit.vcproj\WebKit-vs2010.sln. Delete this file to force-upgrade all projects.
Build will commence when done. Please be patient.
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.

Information:
This project/solution does not require conversion.
Patching common.props...
 Disabling warning as error.
 Disabling warning C4396.
 Enabling multiprocess compile.
Patching JavaScriptCore.def...
        1 file(s) moved.
Correcting WebCore.vcxproj...
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF, Configuration: Release_Cairo_CFLite Win32 ------
2>StringExtras.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>SizeLimits.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>NullPtr.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>HashTable.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>DynamicAnnotations.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>BinarySemaphore.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
3>------ Build started: Project: JavaScriptCore, Configuration: Release_Cairo_CFLite Win32 ------
3>JSGlobalObject.obj : warning LNK4197: export '?s_globalObjectMethodTable@JSGlobalObject@JSC@@1UGlobalObjectMethodTable@2@B' specified multiple times; using first specification
3>PropertyDescriptor.obj : warning LNK4197: export '?defaultAttributes@PropertyDescriptor@JSC@@0IA' specified multiple times; using first specification
3>MachineStackMarker.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>Heap.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSValueRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSWeakObjectMapRefPrivate.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>BytecodeGenerator.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>Parser.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackObject.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSClassRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSContextRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSObjectRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSGlobalData.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSBase.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackConstructor.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackFunction.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
4>------ Build started: Project: WebCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
4>C:\Prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCairo.props(4,5): warning MSB4011: "C:\Prj\WebKit\WebKit-r106194\WebKitLibraries\win\tools\vsprops\common.props" cannot be imported again. It was already imported at "C:\Prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCommon.props (4,5)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGenerated.vcxproj]
5>------ Skipped Build: Project: QTMovieWin, Configuration: Release_Cairo_CFLite Win32 ------
5>Project not selected to build for this solution configuration
6>------ Build started: Project: WebCore, Configuration: Release_Cairo_CFLite Win32 ------
6>..\platform\graphics\cairo\DrawErrorUnderline.h(24): warning C4067: unexpected tokens following preprocessor directive - expected a newline
6>..\platform\graphics\cairo\DrawErrorUnderline.h(24): warning C4067: unexpected tokens following preprocessor directive - expected a newline
6>InspectorIndexedDBAgent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>InspectorFileSystemAgent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>StorageInfo.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBTransaction.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBRequest.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBObjectStoreBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBObjectStore.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBKeyRange.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBKey.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBIndexBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBIndex.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactoryBackendInterface.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactoryBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactory.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBDatabaseBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBDatabase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBCursorBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBCursor.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBAny.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PluginDebug.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileReaderCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntrySyncCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntryCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntrySyncCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntryCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ProgressShadowElement.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControls.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControlRootElement.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControlElements.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WeekInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>TimeInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>OperationNotAllowedException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MonthInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MicroDataItemValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaFragmentURIParser.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaDocument.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LocalFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>HTMLPropertiesCollection.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>HTMLParserErrorCodes.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriterSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriterBase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileThread.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileSystemCallbacks.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileStreamProxy.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReaderLoader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntryArraySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntryArray.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Entry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMURL.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystemSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystemBase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFilePath.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryReader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateTimeLocalInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateTimeInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ColorInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>NotificationCenter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Notification.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScriptedAnimationController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>StyleCachedShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>RenderLayerBacking.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>RenderFullScreen.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebKitCSSShaderValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebKitCSSFilterValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>SpeechInputClientMock.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LoaderRunLoopCF.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>BlobResourceHandle.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>BlobRegistryImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayerPrivateAVFoundationCF.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayerPrivateAVFoundation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WKCACFViewLayerTreeHost.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCALayerWinInternal.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCALayerWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCAAnimationWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LegacyCACFLayerTreeHost.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>TransformationMatrixCA.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GraphicsLayerCA.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FilterOperations.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FilterOperation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FELightingNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FEGaussianBlurNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FECustomFilter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FECompositeArithmeticNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterProgram.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterOperation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterMesh.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FullScreenController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayer.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GraphicsLayer.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebCorePrefix.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScrollbarThemeSafari.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GDIObjectCounter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScrollAnimatorWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformEvent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileStream.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CalculationValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>AsyncFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CachedShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MHTMLParser.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MHTMLArchive.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>SpeechInput.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PerformanceTiming.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PerformanceNavigation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Performance.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PageVisibilityState.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoUsageCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoQuotaCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoErrorCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfo.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSOperationNotAllowedException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileWriterCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntryArraySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDOMFileSystemSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DerivedSources.obj : warning LNK4006: "protected: void __thiscall WebCore::JSWebKitCSSRegionRule::finishCreation(class JSC::JSGlobalData &)" (?finishCreation@JSWebKitCSSRegionRule@WebCore@@IAEXAAVJSGlobalData@JSC@@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "private: __thiscall WebCore::JSWebKitCSSRegionRuleConstructor::JSWebKitCSSRegionRuleConstructor(class JSC::Structure *,class WebCore::JSDOMGlobalObject *)" (??0JSWebKitCSSRegionRuleConstructor@WebCore@@AAE@PAVStructure@JSC@@PAVJSDOMGlobalObject@1@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRuleConstructor::getOwnPropertyDescriptor(class JSC::JSObject *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertyDescriptor &)" (?getOwnPropertyDescriptor@JSWebKitCSSRegionRuleConstructor@WebCore@@SA_NPAVJSObject@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertyDescriptor@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "protected: __thiscall WebCore::JSWebKitCSSRegionRule::JSWebKitCSSRegionRule(class JSC::Structure *,class WebCore::JSDOMGlobalObject *,class WTF::PassRefPtr)" (??0JSWebKitCSSRegionRule@WebCore@@IAE@PAVStructure@JSC@@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VWebKitCSSRegionRule@WebCore@@@WTF@@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRuleConstructor::getOwnPropertySlot(class JSC::JSCell *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSWebKitCSSRegionRuleConstructor@WebCore@@SA_NPAVJSCell@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertySlot@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRule::getOwnPropertyDescriptor(class JSC::JSObject *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertyDescriptor &)" (?getOwnPropertyDescriptor@JSWebKitCSSRegionRule@WebCore@@SA_NPAVJSObject@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertyDescriptor@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRule::getOwnPropertySlot(class JSC::JSCell *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSWebKitCSSRegionRule@WebCore@@SA_NPAVJSCell@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertySlot@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSObject * __cdecl WebCore::JSWebKitCSSRegionRule::createPrototype(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?createPrototype@JSWebKitCSSRegionRule@WebCore@@SAPAVJSObject@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSObject * __cdecl WebCore::JSWebKitCSSRegionRulePrototype::self(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?self@JSWebKitCSSRegionRulePrototype@WebCore@@SAPAVJSObject@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "private: void __thiscall WebCore::JSWebKitCSSRegionRuleConstructor::finishCreation(class JSC::ExecState *,class WebCore::JSDOMGlobalObject *)" (?finishCreation@JSWebKitCSSRegionRuleConstructor@WebCore@@AAEXPAVExecState@JSC@@PAVJSDOMGlobalObject@2@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSValue __cdecl WebCore::JSWebKitCSSRegionRule::getConstructor(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?getConstructor@JSWebKitCSSRegionRule@WebCore@@SA?AVJSValue@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "class JSC::JSValue __cdecl WebCore::jsWebKitCSSRegionRuleCssRules(class JSC::ExecState *,class JSC::JSValue,class JSC::Identifier const &)" (?jsWebKitCSSRegionRuleCssRules@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@V23@ABVIdentifier@3@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "class JSC::JSValue __cdecl WebCore::jsWebKitCSSRegionRuleConstructor(class JSC::ExecState *,class JSC::JSValue,class JSC::Identifier const &)" (?jsWebKitCSSRegionRuleConstructor@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@V23@ABVIdentifier@3@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRuleConstructor::s_info" (?s_info@JSWebKitCSSRegionRuleConstructor@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRulePrototype::s_info" (?s_info@JSWebKitCSSRegionRulePrototype@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRule::s_info" (?s_info@JSWebKitCSSRegionRule@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
7>------ Build started: Project: Interfaces, Configuration: Release_Cairo_CFLite Win32 ------
8>------ Build started: Project: WebKitGUID, Configuration: Release_Cairo_CFLite Win32 ------
9>------ Build started: Project: WebKitLib, Configuration: Release_Cairo_CFLite Win32 ------
9>WebDesktopNotificationsDelegate.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
9>FullscreenVideoController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
10>------ Build started: Project: WebKit2Generated, Configuration: Release_Cairo_CFLite Win32 ------
11>------ Build started: Project: WebKit, Configuration: Release_Cairo_CFLite Win32 ------
12>------ Build started: Project: WebKit2WebProcess, Configuration: Release_Cairo_CFLite Win32 ------
13>------ Build started: Project: testapi, Configuration: Release_Cairo_CFLite Win32 ------
14>------ Build started: Project: jsc, Configuration: Release_Cairo_CFLite Win32 ------
15>------ Build started: Project: testRegExp, Configuration: Release_Cairo_CFLite Win32 ------
16>------ Build started: Project: WinLauncher, Configuration: Release_Cairo_CFLite Win32 ------
17>------ Build started: Project: WinLauncherLauncher, Configuration: Release_Cairo_CFLite Win32 ------
17>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WinLauncherLauncher.exe) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WinLauncher.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
17>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WinLauncherLauncher) does not match the Linker's OutputFile property value (WinLauncher). This may cause your project
to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
18>------ Build started: Project: TestNetscapePlugin, Configuration: Release_Cairo_CFLite Win32 ------
18>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\TestNetscapePlugin.dll) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\TestNetscapePlugin\npTestNetscapePlugin.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
18>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(TestNetscapePlugin) does not match the Linker's OutputFile property value (npTestNetscapePlugin). This may cause your
project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
19>------ Build started: Project: ImageDiff, Configuration: Release_Cairo_CFLite Win32 ------
19>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.dll) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
19>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
20>------ Build started: Project: ImageDiffLauncher, Configuration: Release_Cairo_CFLite Win32 ------
20>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiffLauncher.exe) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
20>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(ImageDiffLauncher) does not match the Linker's OutputFile property value (ImageDiff). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
21>------ Build started: Project: WebCoreTestSupport, Configuration: Release_Cairo_CFLite Win32 ------
22>------ Build started: Project: DumpRenderTree, Configuration: Release_Cairo_CFLite Win32 ------
23>------ Build started: Project: DumpRenderTreeLauncher, Configuration: Release_Cairo_CFLite Win32 ------
23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\DumpRenderTreeLauncher.exe) does not match the
Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\DumpRenderTree.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(DumpRenderTreeLauncher) does not match the Linker's OutputFile property value (DumpRenderTree). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
24>------ Build started: Project: WebKitLauncherWin, Configuration: Release_Cairo_CFLite Win32 ------
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitLauncherWin.exe) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKit.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WebKitLauncherWin) does not match the Linker's OutputFile property value (WebKit). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
25>------ Build started: Project: record-memory-win, Configuration: Release_Cairo_CFLite Win32 ------
26>------ Build started: Project: InjectedBundleGenerated, Configuration: Release_Cairo_CFLite Win32 ------
27>------ Build started: Project: InjectedBundle, Configuration: Release_Cairo_CFLite Win32 ------
28>------ Build started: Project: WebKitTestRunner, Configuration: Release_Cairo_CFLite Win32 ------
29>------ Build started: Project: WebKitTestRunnerLauncher, Configuration: Release_Cairo_CFLite Win32 ------
29>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitTestRunnerLauncher.exe) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitTestRunner.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
29>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WebKitTestRunnerLauncher) does not match the Linker's OutputFile property value (WebKitTestRunner). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
30>------ Build started: Project: gtest-md, Configuration: Release_Cairo_CFLite Win32 ------
30>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\lib\gtest-md.lib) does not match the Library's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\lib\gtest.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
30>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1153,5): warning MSB8012: TargetName(gtest-md) does not match the Library's OutputFile property value (gtest). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
31>------ Build started: Project: TestWebKitAPIGenerated, Configuration: Release_Cairo_CFLite Win32 ------
32>------ Build started: Project: TestWebKitAPI, Configuration: Release_Cairo_CFLite Win32 ------
33>------ Build started: Project: TestWebKitAPIInjectedBundle, Configuration: Release_Cairo_CFLite Win32 ------
34>------ Build started: Project: MiniBrowser, Configuration: Release_Cairo_CFLite Win32 ------
35>------ Build started: Project: MiniBrowserLauncher, Configuration: Release_Cairo_CFLite Win32 ------
35>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\MiniBrowserLauncher.exe) does not match the Linker's OutputFile property value (C:\Cygwin\home\Ash\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\MiniBrowser.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
35>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(MiniBrowserLauncher) does not match the Linker's OutputFile property value (MiniBrowser). This may cause your project
to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
========== Build: 34 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

===========================================================
 WebKit is now built (07m:41s).
 To run Safari with this newly-built code, use the
 "../../../Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/run-safari" script.
===========================================================

Astute readers might notice that my previous build took 49m:07s while this one is only 07m:41s. This is thanks to my new 6-core i7 3930K @ 4.6 Ghz, 32 GB 1600 @ CL9 on 256 GB Samsung 830 SSD. The previous build was on Core 2 Quad 9300 @ 2.7 Ghz, 4 GB 800 @ CL5 on 150 GB WD VelociRaptor @ 10,000 (with RamDisk). That’s an almost 6.5x difference.

The dos2unix entries are auto-conversion of Bash files that often don’t have correct line-ending, which used to break the build on some Cygwin Bash instances. This takes a couple of extra seconds but ensures that no line-ending discrepancy exists.

Latest Revision

Now it’s time to try the latest revision. It’s interesting to see what difference do 20,000 revisions and almost 1000 new files make. After extracting the archive, I simply copied the contents of my patch (2 files) overwriting pdevenv. I made sure that no instance of MSBuild.exe was running.

Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.50727.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: WTFGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF (WTF\WTF), Configuration: Release_Cairo_CFLite Win32 ------
3>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
4>------ Build started: Project: JavaScriptCore, Configuration: Release_Cairo_CFLite Win32 ------
5>------ Build started: Project: WebCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
5>Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCairo.props(4,5): warning MSB4011: "Z:\WebKit-r127371\WebKitLibraries\win\tools\vsprops\common.props" cannot be imported again. It was already imported at "Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCommon.props (4,5)". This is most likely a build authoring error. This subsequent import will be ignored. [Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGenerated.vcxproj]
6>------ Skipped Build: Project: QTMovieWin, Configuration: Release_Cairo_CFLite Win32 ------
6>Project not selected to build for this solution configuration
7>------ Build started: Project: WebCore, Configuration: Release_Cairo_CFLite Win32 ------
7>c1xx : fatal error C1083: Cannot open source file: '..\storage\StorageInfo.cpp': No such file or directory
7>..\platform\graphics\cairo\DrawErrorUnderline.h(24): warning C4067: unexpected tokens following preprocessor directive - expected a newline

I might have been a bit overoptimistic, but I really was hoping it’d build. There seems to be missing source files. First assumption is that I got unlucky with the revision. After building over half a dozen revisions I was convinced it wasn’t a fluke. I checked the repository and sure enough the file is not there. Digging further I found a rather old version of the file. Circa April 2011. Further investigations showed that the file in question is a port-specific implementation. Chromium has its own implementation. But this version is the default. My best explanation is that the last major port on Windows was Safari, and they stopped supporting Windows. So that leaves Chromium and they already have a specialized implementation in their port-specific folder/project. Whatever the case, I restored the last implementation I could find, which doesn’t do anything really.

Placing the missing files gives us a successful build.

Visual Studio 2012

I thought it’d be fun to try and see how VS2012 would fare. I was encouraged after reading that the latest version of the popular IDE finally creates almost backwards compatible solution and project files. I say almost because, well, it’s not perfect. Another minor push came from the fact that Windows 8 SDK is included and DirectX SDK as well. That meant less setup hassle.

First Impressions: A Mini Review

Visual Studio certainly warrants a full review in its own right, but a quick overview will do here. First thing to notice was that it loaded very swiftly. Projects loaded faster as well. Mind you, I also thought it must be my new hardware at work. But VS2010 doesn’t load nearly as fast. Next was a small disappointment as I stared at the drab looking GUI. It was ’97 all over again. Everything is grey. Icons are grey too. Are we that desensitized by colors that we want to do away with them? I found finding commands in the menus difficult as my eyes were struggling to find anything familiar at sight without reading each entry.

First thing I did was to go to the Options dialog. To my sweet surprise, there is a dark theme! I almost exclusively use dark themes in my editors for lesser eye strain. The high contrast of black-on-white isn’t very relaxing to the eye nerves, especially after long hours. Dark themes help by lowering the contrast. Native support of dark themes is very important because some plugins assumed that the background was always light-colored. So their default choices of text color has been dark colors. This can be fixed in most cases, but some text colors aren’t configurable. I immediately switched to dark theme expecting a restart, to my surprise it instantly redrew the whole application without a single blemish. VS2010 couldn’t even change the background color of its Solution window (it wasn’t ported from Win32 to WPF).

Next I noticed that (finally) variables are highlighted when the cursor is placed on them. This has been in Notepad++ for ages. VS2012 chose to support highlighting variables within the current context. So that also means only variables are highlighted. One can’t highlight all new keywords, for example, to see all allocations at a glance. Still, it’s an improvement.

Things aren’t perfect, of course. There is always a catch. After running VS2012 on a project in my RamDisk I noticed that Intellisense stopped working. With it, highlighting went away. I tried everything and the only change is RamDisk. When the project is loaded from RamDisk, Intellisense files aren’t created or created with a minimal size. Visual Studio complains upon closing (and of course upon invoking any Intellisense comand) that it couldn’t load Intellisense files. Obviously a bug.

Another sweet feature that I noticed right off the bat is the “quick preview” (as I call it) feature. Basically, selecting any file shows the file in a single tab to the far right which is recycled. Double click to open a permanent tab or click on the “Keep Open” button on the temporary one. This works best from the Find window where one can quickly go through the found lines by the cursor and preview the lines in context without cluttering the tabs.

Btw, notice the solution loaded is VS2010 converted. It didn’t need any modifications to load (it loaded silently). I don’t know if incompatible changes are made when project settings are changed.

Building with VS2012

It was really going great for the longest time, until it didn’t. MIDL found an indefensible statement:

Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.50727.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: WTFGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF (WTF\WTF), Configuration: Release_Cairo_CFLite Win32 ------
3>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
4>------ Build started: Project: JavaScriptCore, Configuration: Release_Cairo_CFLite Win32 ------
5>------ Build started: Project: WebCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
5>Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCairo.props(4,5): warning MSB4011: "Z:\WebKit-r127371\WebKitLibraries\win\tools\vsprops\common.props" cannot be imported again. It was already imported at "Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCommon.props (4,5)". This is most likely a build authoring error. This subsequent import will be ignored. [Z:\WebKit-r127371\Source\WebCore\WebCore.vcproj\WebCoreGenerated.vcxproj]
6>------ Skipped Build: Project: QTMovieWin, Configuration: Release_Cairo_CFLite Win32 ------
6>Project not selected to build for this solution configuration
7>------ Build started: Project: WebCore, Configuration: Release_Cairo_CFLite Win32 ------
8>------ Build started: Project: Interfaces, Configuration: Release_Cairo_CFLite Win32 ------
8>MIDL : error MIDL2337: unsatisfied forward declaration : WebFontDescription
9>------ Build started: Project: WebKitGUID, Configuration: Release_Cairo_CFLite Win32 ------

The MIDL version of the SDK that ships with VS2012 doesn’t like forward declaring without defining. I replaced the offending typedef with a simpler forward declaration. To automate the modification, I updated pdevenv with the appropriate Perl scripts.

    # Patch DOMPrivate.idl.
    print $fh "\@echo Patching DOMPrivate.idl...\r\n";
    my $idl_filename = $webkitRootPath . "\\Source\\WebKit\\win\\Interfaces\\DOMPrivate.idl";
    chomp($idl_filename = `cygpath -w -a '$idl_filename'`);
    my $replace_string = "s/typedef struct WebFontDescription WebFontDescription/struct WebFontDescription/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $idl_filename . "\"\r\n";
    $replace_string = "s/\(WebFontDescription\\* webFontDescription/\(struct WebFontDescription\\* webFontDescription/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $idl_filename . "\"\r\n";

Next set of errors came from the Linker. Missing functions. A quick look reminded me of VS2010 project conversion errors. In previous version of Visual Studio the project files had an entry per file and nested within that entry were the configuration-specific nodes. In VS2010 and VS2012 this has changed to a tool-specific node that has a file as its attribute. Because ignored files in the original VS2005 project had their tool set to custom, upon conversion VS2010 and VS2012 have decided that the relevant files are custom files, although they are C++ sources. To add insult to injury, VS2012 has changed the custom tool tag-name from CustomBuildStep to CustomBuild.

    $replace_string = "undef \$/; s/\\<CustomBuild(.*?)\\.cpp(.*?)CustomBuild\\>/\\<ClCompile\$1\\.cpp\$2ClCompile\\>/msgi";
    print $fh "perl -0pi -e \"" . $replace_string . "\" \"" . $webcore_filename . "\"\r\n";

Next the complaints came from Tuple. This is most odd because one would expect newer versions of the compiler to have better support of the standard, not worse.

31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4015): error C2977: 'std::tuple' : too many template arguments (..\src\gtest-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4015): error C3203: 'tuple' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type (..\src\
test-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4015): error C2955: 'std::tuple' : use of class template requires template argument list (..\src\gtest-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4015): error C2955: 'testing::internal::ParamGeneratorInterface' : use of class template requires template argument list (..\src\gtest-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4017): error C2977: 'std::tuple' : too many template arguments (..\src\gtest-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4028): error C3203: 'tuple' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type (..\src\
test-typed-test.cc)
31>Z:\WebKit-r127371\Source\ThirdParty\gtest\include\gtest/internal/gtest-param-util-generated.h(4028): error C2955: 'std::tuple' : use of class template requires template argument list (..\src\gtest-typed-test.cc)

Anyway, noticing that this was indeed test project, and the errors (too many to list here) coming from gtest, I thought it fair to call it a day and let Google worry about bringing gtest up to speed with VS2012. As far as I was concerned, I build WebKit on VS2012, sans the tests, of course.

Full Script

#!/usr/bin/perl -w

use strict;
use warnings;

use File::Temp qw/tempfile/;
use File::Copy;
use File::Find;
use FindBin;

use lib $FindBin::Bin;
use webkitdirs;

# Visual Studio is executed using a temp Windows Batch file.
my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;
print $fh "\@echo off\r\n"; # Comment-out to see/debug executed commands.

chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
chomp(my $scriptsPath = `cygpath -w "$FindBin::Bin"`);
my $webkitRootPath = $scriptsPath . "\\..\\..";

my $originalWorkingDirectory = getcwd();
print "Current working directory: " . $originalWorkingDirectory . "\n";

# Cygwin Bash expects unix files (LF only).
chomp(my $root = `cygpath "$webkitRootPath"`);
system("dos2unix " . $root . "autogen.sh");
find( sub { if (/\.sh$/) { my $fname = `cygpath "$File::Find::name$/"`; `dos2unix $fname` } }, $webkitRootPath . "\\Source");
find( sub { if (/\.sh$/) { my $fname = `cygpath "$File::Find::name$/"`; `dos2unix $fname` } }, $webkitRootPath . "\\Tools");
find( sub { if (/\.sh$/) { my $fname = `cygpath "$File::Find::name$/"`; `dos2unix $fname` } }, $webkitRootPath . "\\WebKitLibraries");

my $jsdef_filename = $webkitRootPath . "\\Source\\JavaScriptCore\\JavaScriptCore.vcproj\\JavaScriptCore\\JavaScriptCore.def";
chomp($jsdef_filename = `cygpath -w -a '$jsdef_filename'`);

my $command = join(" ", @ARGV);
my $vsToolsVar;

sub Fixup
{
    my ($versionName, $vsToolsVarName, $solution) = @_;
    
    $solution =~ s/\\/\//g; # Avoid having backslash because they are also escapes.
    chomp($solution = `cygpath -w -a $solution`);
    my $origSolution = $solution;
    $solution =~ s/\.sln/-$versionName\.sln/g;
    print $fh "if not exist " . $webkitRootPath . "\\WebKitLibraries ( \@echo This is not a WebKit directory! Stopping.\n goto exit )\r\n";
    print $fh "if not exist " . $solution . " (\r\n";
    print $fh "copy " . $origSolution . " " . $solution . "\r\n";
    print $fh ")\r\n"; # If no converted solution.
    print $fh "\@echo Upgrading solution file @ " . $solution . ". Delete this file to force-upgrade all projects.\r\n";
    print $fh "\@echo Build will commence when done. Please be patient.\r\n";
    print $fh "call \"\%" . $vsToolsVarName . "\%\\vsvars32.bat\"\r\n";
    print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv /upgrade " . join(" ", $solution) . ") ELSE ";
    print $fh "VCExpress.exe /useenv /upgrade " . join(" ", $solution) . "\r\n";

    # Correct the solution file name.
    $command = '';
    foreach my $arg (@ARGV) {
        $arg =~ s/\.sln/-$versionName\.sln/g;
        $command = $command . ' ' . $arg;
    }

    # Patch DOMPrivate.idl.
    print $fh "\@echo Patching DOMPrivate.idl...\r\n";
    my $idl_filename = $webkitRootPath . "\\Source\\WebKit\\win\\Interfaces\\DOMPrivate.idl";
    chomp($idl_filename = `cygpath -w -a '$idl_filename'`);
    my $replace_string = "s/typedef struct WebFontDescription WebFontDescription/struct WebFontDescription/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $idl_filename . "\"\r\n";
    $replace_string = "s/\(WebFontDescription\\* webFontDescription/\(struct WebFontDescription\\* webFontDescription/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $idl_filename . "\"\r\n";

    # Patch common.props.
    print $fh "\@echo Patching common.props...\r\n";
    my $props_filename = $webkitRootPath . "\\WebKitLibraries\\win\\tools\\vsprops\\common.props";
    chomp($props_filename = `cygpath -w -a '$props_filename'`);
    print $fh "\@echo  Disabling warning as error.\r\n";
    $replace_string = "s/\\true\\<\\/TreatWarningAsError\\>/\\false\\<\\/TreatWarningAsError\\>/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
    print $fh "\@echo  Disabling warning C4396.\r\n";
    $replace_string = "s/\\<\\DisableSpecificWarnings\\>4396;/\\<\\DisableSpecificWarnings\\>/g"; # Delete disabled warning 4396.
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
    $replace_string = "s/\\<\\DisableSpecificWarnings\\>/\\<\\DisableSpecificWarnings\\>4396;/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n"; # Disable warning 4396.
    print $fh "\@echo  Enabling multiprocess compile.\r\n";
    $replace_string = "s/\\(.*?)\\<\\/MultiProcessorCompilation\\>//g"; # Delete MP compilation.
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
    $replace_string = "s/\\<\\/DisableSpecificWarnings\\>/\\<\\/DisableSpecificWarnings\\>\\n      \\true\\<\\/MultiProcessorCompilation\\>/g";
    print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n"; # Enable MP compilation.

    # Remove nullptr_t from JavaScriptCore.def
    print $fh "\@echo Patching JavaScriptCore.def...\r\n";    
    print $fh "move \"" . $jsdef_filename . "\" \"" . $jsdef_filename . ".orig\" \r\n";
    print $fh "findstr /V ?nullptr\@\@3Vnullptr_t\@std\@\@A \"" . $jsdef_filename . ".orig\" > \"" . $jsdef_filename . "\"\r\n";

    my $webcore_filename = $webkitRootPath . "\\Source\\WebCore\\WebCore.vcproj\\WebCore.vcxproj";
    chomp($webcore_filename = `cygpath -w -a '$webcore_filename'`);
    print $fh "\@echo Correcting WebCore.vcxproj...\r\n";
    $replace_string = "undef \$/; s/\\/\\/msgi";
    print $fh "perl -0pi -e \"" . $replace_string . "\" \"" . $webcore_filename . "\"\r\n";
    $replace_string = "undef \$/; s/\\/\\/msgi";
    print $fh "perl -0pi -e \"" . $replace_string . "\" \"" . $webcore_filename . "\"\r\n";
}

if ($ENV{'VS110COMNTOOLS'}) {
    $vcBin = ''; # We no longer need cl and midl wrappers.
    $vsToolsVar = "VS110COMNTOOLS";
    my $versionName = "vs2012";
    print $fh "\@echo Using $versionName toolchain.\r\n";
    print $fh "\@echo.\r\n";
    # If there is no converted solution, upgrade.
    my $solution = $ARGV[0];
    if ($solution)
    {
        Fixup($versionName, $vsToolsVar, $solution);
    }

} elsif ($ENV{'VS100COMNTOOLS'}) {
    $vcBin = ''; # We no longer need cl and midl wrappers.
    $vsToolsVar = "VS100COMNTOOLS";
    my $versionName = "vs2010";
    print $fh "\@echo Using $versionName toolchain.\r\n";
    print $fh "\@echo.\r\n";
    # If there is no converted solution, upgrade.
    my $solution = $ARGV[0];
    if ($solution)
    {
        Fixup($versionName, $vsToolsVar, $solution);
    }

} elsif ($ENV{'VS90COMNTOOLS'}) {
    $vsToolsVar = "VS90COMNTOOLS";

    # Restore JavaScriptCore.def backup.
    print $fh "if exist \"" . $jsdef_filename . ".orig\" (\r\n";
    print $fh "\@echo Restoring JavaScriptCore.def...\r\n";    
    print $fh "move /Y \"" . $jsdef_filename . ".orig\" \"" . $jsdef_filename . "\" \r\n";
    print $fh ")\r\n"; # If JavaScriptCore.def.orig.

} elsif ($ENV{'VS80COMNTOOLS'}) {
    $vsToolsVar = "VS80COMNTOOLS";

    # Restore JavaScriptCore.def backup.
    print $fh "if exist \"" . $jsdef_filename . ".orig\" (\r\n";
    print $fh "\@echo Restoring JavaScriptCore.def...\r\n";    
    print $fh "move /Y \"" . $jsdef_filename . ".orig\" \"" . $jsdef_filename . "\" \r\n";
    print $fh ")\r\n"; # If JavaScriptCore.def.orig.

} else {
    print "*************************************************************\n";
    print "Cannot find Visual Studio tools dir.\n";
    print "Please ensure that \$VS80COMNTOOLS, \$VS90COMNTOOLS or \$VS100COMNTOOLS\n";
    print "is set to a valid location.\n";
    print "*************************************************************\n";
    die;
}

print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\r\n";
print $fh "set PATH=$vcBin;$scriptsPath;\%PATH\%\r\n";

print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", $command) . ") ELSE ";
print $fh "VCExpress.exe /useenv " . join(" ", $command) . "\r\n";
print $fh ":exit\n";

close $fh;
chmod 0755, $path;
chomp($path = `cygpath -w -s '$path'`);

# Fix up any env variables that differ only in case.
foreach my $key (sort keys(%ENV)) {
    my $upper_key = uc($key);
    my $dup = $ENV{$upper_key};
    if ($dup && ($dup ne $ENV{$key}))
    {
        # Dups break CL.exe, so we need to remove either one. Since Cygwin seems to make Windows-inherited
        # entries lower-case, and since CL plays better with Windows paths, we remove the upper-case one.
        # There seems to be a bug in MSBuild.exe in that stays resident across builds, so environment
        # variables changes aren't applied to future builds unless it's killed to force respawning.
        print "Found duplicate env-var (rm $upper_key): \t$key = $ENV{$key}\t\t$upper_key = $dup\n";
        delete $ENV{$upper_key};
    }
}

my $batch_command = "cmd /c \"call $path\"";
print "Running $batch_command\n";
print "\@echo.\r\n";
system($batch_command);
unlink($path); # Comment-out to preserve the batch file for debugging.

What’s Next?

It’d be great if all the test projects also compiled. I’m sure in time this will get fixed. Another thing that I’d like to tackle is building the now-discontinued CoreGraphics on Windows. I expect this to be more of a challenge as the port rots. Still, it’s interesting. Finally, I’ll start maintaining a fork of WebKit where these fixes could be applied (yes, I tried, it’s really hard to get any unsupported code into the trunk).

Conclusion (and Patch)

Building WebKit is always challenging (and fun). Building the latest revision from scratch wasn’t trivial, but previous experience helped quite a bit. Moving to VS2012 wasn’t a breeze either, but it wasn’t nearly as hard as getting the first successful build with VS2010. Now, armed with this walk-through, one only needs to download the patch and extract it in the root of a recent revisions of a WebKit source tree for an easy and (hopefully) successful build.

Don’t shy from sharing your experience. Happy Hacking.

Jan 292012
 

In a previous post I outlined a detailed description of how to build WebKit on Windows XP. My aim was to share with everyone the long and rather tricky process of building the beast that WebKit is. There are many pitfalls, gotchas and critical requirements to get from code to binary to execution. I also did away with the standard and default requirement of VS2005 and opted to go with the newer and less-buggy VS2008. Besides the improvements in this newer version, there was only 1 update to install (SP1) as opposed to the 5 or so that VS2005 required (in addition to QuickTime SDK, Windows 2003 SDK and DirectX SDK), it had a better compiler and, in my experience, caused much less problems (consider for example that newer DirectX SDK doesn’t support VS2005) to build WebKit than VS2005 did.

But that was VS2008 and Windows XP. Now, we’ll attempt to build WebKit with VS2010 and on Windows 7. This adds two groups of issues to the mix: One on the compiler/environment level and the other on the OS level. Regarding the issues that Windows 7 brings to the table, see the previous post and here. As before, I’ll build only WinCairo, but you should be well-advised to try the default – CoreGraphics.

Note: While this walk-through should be complete, obviously there are many concepts specific to WebKit and/or the tools, these I won’t repeat here. You don’t need to read the previous post, but if you find some reference that isn’t clear, search for the keyword in question in the previous post. If that doesn’t help, don’t shy from asking in the comments; I’ll get back to you.

Summary (TL;DR)

This is a detailed walk-through of getting WebKit built on Windows 7 with VS2010. For the bottom-line and an automated patch just skip the details and jump here. There is a very easy, virtually flawless, two-step, five-click procedure to get from code to binary.

Motivation

This project took my spare time during a whole week and almost two weekends. That’s an estimated 20 hours. So why do it? VS2005, which is the officially supported version, is outdated, has a painfully large number of updates and the end-user must install all its updated/patched runtime libraries and is notorious in losing/reseting the Include and Library paths. On top of that, it’s not supported on Windows 7. Since I upgraded my workstation to Win7 I couldn’t and didn’t want to install VS2005 (nor VS2008 for that matter). I could either build WebKit in a VM on WinXP (actually my old system is now turned into a cosy VM, so I could use that,) but then WebKit is too huge for a VM. The adventure of attempting a build on VS2010 was intimidating enough, considering that a single unsupported/incompatible issue could mushroom into 100s of thousands of errors that might actually require a sizable code change, which would be far more than what I bid for. To top it, I knew that Windows 7 had its own set of issues related to UAC and Cygwin’s Fork implementation, which conflicted with Windows’ randomized image mapping and other security features.

Ultimately, I wanted a clean build with the latest tools on the latest Windows incarnation. WebKit.org might not be tempted to force its development team to shell out for VS2010 or Windows 7, not to mention spend all that time to upgrade both their machines and code, but, eventually, they will. So, here it is. A complete walkthrough documenting every step of the way, from code download to environment setup to successful build. In addition, all changes to fix errors are automated with just two scripts… read on.

Environment

WebKit has a lot of dependencies and requirements. So first we need to setup everything that is expected by the code before we even try to build.

Getting the Code

As with the tip from the previous post, I avoided the Trunk and used the prepackaged sources of r106194 (but relatively recent packages should also work). While the trunk may often be broken, the nightly build isn’t guaranteed to build. To increase your odds, pick a revision of the sources that has a Mac or Windows nightly build as well. From the 7 nightly builds I picked (r105569-r106194) 2 were broken. A considerable time is wasted figuring out whether or not the errors are our fault or the source code’s.

Cygwin

The first hurdle was to setup Cygwin. Get the download instructions from the previous post. (Read and use the Cygwin downloader from here is the gist of it.) Since WebKit expects the sources to be within the user’s home directory of Cygwin, I decided to avoid placing the 100s of thousands of files and the gigabytes that a single source working-copy is within Cygwin. Instead, I can have WebKit sources anywhere and Cygwin elsewhere and get them both together using symbolic links.

My Cygwin installation is in my Tools folder, which hosts a rather large number of portable programs and scripts, including MinGW. Tools is in the root of my system drive. To make things easy for me, I’d like to have Cygwin in the system drive as well (it’s a fast drive). So the first thing is to setup symbolic links where from the original folders to where we’d like to see our environment setup. This is done using the mklink command, but before executing it we delete any directories in that path, so make sure your target path is safe!

Visual Studio 2010

With VS2005 and VS2008 the Express editions worked fine. Since I don’t have VS2010 Express, I can’t vouch the same guarantee. Regardless, it’s probably reasonable to expect it to work. At any rate, we need to install a functional version. We also need to install SP1 and Windows SDK. Microsoft deserves some scolding for releasing Windows SDK that reverts Visual Studio updates for yet another time. So, to avoid stepping on your own feet, here is how you need to proceed with the VS2010 and WinSDK installations:

  1. Visual Studio 2010.
  2. Windows SDK 7.1.
  3. Visual Studio 2010 SP1.
  4. Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1.

Interestingly, I didn’t change the toolchain from VC100 to Windows SDK 7.1. I also didn’t install QuickTime or DirectX SDKs. It seems that the Windows and DirectX headers that come with VS2010 were enough that I didn’t have to go through any settings as I had to with VS2005. However, QuickTime’s missing SDK, while didn’t break the build, might mean that there wouldn’t be full media support in the resulting build. Actually, I suspect QuickTime SDK is needed for the CoreGraphics build. Nevertheless, that’s a minor issue that can be remedied later.

Environment Variables

Next we need to setup the WEBKITLIBRARIESDIR and WEBKITOUTPUTDIR environment variables, add scripts folder on the path and setup VS2010. WebKit build scripts expect VSINSTALLDIR environment variable, which, it seems, VS2010 installation isn’t creating. I found only VS100COMNTOOLS on my system, so I added a make-shift VSINSTALLDIR to my build environment setup script. Once that is done, we need to ask VS to setup its own environment variables and fire-up Cygwin.

I want to automate as much as possible, including the ability to run the same boiler-plate setup script for any revision of WebKit. The script is designed to be thrown into the source code folder of WebKit and run as administrator. The only missing thing is your Cygwin installation folder. But don’t worry, if you don’t provide this folder (or is invalid,) of you don’t run as admin, the script will warn you and stop.

Here is the cmd script I use to do the magic of setting up the build environment:

vs2010-build-env.cmd:

@rem Setup the Cygwin environment to build WebKit.
@rem Copyright 2012 Ashod Nakashian
@rem Your are free to use this however you see fit,
@rem provided you give credit where credit is due.

@rem Comment to debug and see what is being set exactly.
@echo off
@echo.

echo Setting up Cygwin directory...
@rem Change CYGWIN_SOURCE_DIR to where Cygwin is installed.
set CYGWIN_SOURCE_DIR=C:\Tools\cygwin
set CYGWIN_DIR=C:\Cygwin
if not exist "%CYGWIN_SOURCE_DIR%" (@echo Error: Please specify the correct Cygwin installation folder in '%0' @ CYGWIN_SOURCE_DIR.
goto exit)
if exist "%CYGWIN_DIR%" rmdir "%CYGWIN_DIR%"
mklink /D "%CYGWIN_DIR%" "%CYGWIN_SOURCE_DIR%"
if not %ERRORLEVEL%==0 (@echo Error: Please run this script as administrator.
goto exit)

echo Setting up WebKit directory...
set WEBKIT_SOURCE_DIR=%~dp0%
set CURRENT_DIR=%WEBKIT_SOURCE_DIR%
if "%CURRENT_DIR:~-1%"=="\" set CURRENT_DIR=%CURRENT_DIR:~0,-1%
for /R "delims=\" %%a in (%CURRENT_DIR%) do set WEBKIT_DIR_NAME=%%~nxa
set WEBKIT_DIR=%CYGWIN_DIR%\home\%username%\%WEBKIT_DIR_NAME%
if exist "%WEBKIT_DIR%" rmdir "%WEBKIT_DIR%"
mklink /D "%WEBKIT_DIR%" "%WEBKIT_SOURCE_DIR%"

echo Exporting environment varibles...
set WEBKITOUTPUTDIR=%WEBKIT_DIR%\WebKitBuild
set WEBKITLIBRARIESDIR=%WEBKIT_DIR%\WebKitLibraries\win
set VSINSTALLDIR=%VS100COMNTOOLS%..\..
set PATH=%WEBKIT_DIR%\Tools\Scripts;%PATH%
set PATH=%CYGWIN_DIR%\bin;%PATH%

@rem Uncomment if you want to execute VC tools from the shell.
@rem call "%VSINSTALLDIR%\VC\vcvarsall.bat" x86

echo Note: Remember to set devenv.exe to run as administrator!

echo Running Cygwin...
call "%CYGWIN_DIR%\Cygwin.bat"

:exit

This should be straight forward. All we do is setup the Cygwin and source-code folders and the environment variables. Take your time to read it and don’t forget to set your Cygwin installation folder to CYGWIN_SOURCE_DIR.

Building

First, download the source code and extract it in any folder you like. Next, place this script in the extracted folder. What you need to edit are: CYGWIN_SOURCE_DIR to point to your cygwin folder. The other settings should be automatically set. Note: You must run this script as Administrator!

Here is a sample of the output you should expect:

Setting up Cygwin directory...
symbolic link created for C:\Cygwin <> C:\Tools\cygwin
Setting up WebKit directory...
symbolic link created for C:\Cygwin\home\Ash\WebKit-r105582 <> C:\prj\WebKit\WebKit\WebKit-r105582\
Exporting environment varibles...
Running Cygwin...

Ash@Bull ~
#

If you get the prompt as I did above, then you’re good to go. But before we try to build, we need to let the build scripts know about VS2010, which isn’t really supported. Go to Tools\Scripts within the source folder and open the pdevenv file for editing. On the 18th line you should add a case for VS100COMNTOOLS and make it the first, next VS90COMNTOOLS followed by VS80COMNTOOLS. This way VS2010 will be preferred, followed by VS2008 then by 2005 if neither is found. Here is how lines 17-31 should look:

my $vsToolsVar;
if ($ENV{'VS100COMNTOOLS'}) {
    $vsToolsVar = "VS100COMNTOOLS";
} elsif ($ENV{'VS90COMNTOOLS'}) {
    $vsToolsVar = "VS90COMNTOOLS";
} elsif ($ENV{'VS80COMNTOOLS'}) {
    $vsToolsVar = "VS80COMNTOOLS";
} else {
    print "*************************************************************\n";
    print "Cannot find Visual Studio tools dir.\n";
    print "Please ensure that \$VS80COMNTOOLS or \$VS90COMNTOOLS\n";
    print "is set to a valid location.\n";
    print "*************************************************************\n";
    die;
}

Let’s do an initial run of the build script so it’d download the WinCairo files and install them (no change is done outside the WebKit source folder).

Here is an initial run…

# build-webkit --wincairo
Checking Last-Modified date of WinCairoRequirements.zip...
Downloading WinCairoRequirements.zip...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14.0M  100 14.0M    0     0   320k      0  0:00:44  0:00:44 --:--:--  480k

Installing WinCairoRequirements...
The WinCairoRequirements has been sucessfully installed in
 /cygdrive/c/Cygwin/home/Ash/WebKit-r105582/WebKitLibraries/win
Building results into: /cygdrive/c/Cygwin/home/Ash/WebKit-r105582/WebKitBuild
WEBKITOUTPUTDIR is set to: C:\prj\WebKit\WebKit\WebKit-r105582\WebKitBuild
WEBKITLIBRARIESDIR is set to: C:\Cygwin\home\Ash\WebKit-r105582\WebKitLibraries\win
/cygdrive/c/Cygwin/home/Ash/WebKit-r105582/Tools/Scripts/pdevenv win\WebKit.vcproj\WebKit.sln /build Release_Cairo_CFLite
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.

Solution file 'C:\prj\WebKit\WebKit\WebKit-r105582\Source\WebKit\win\WebKit.vcproj\WebKit.sln' is from a previous version of this application and must be converted in order to build in this version of the application. To convert the solution, open the solution in this version of the application.

===== BUILD FAILED ======

Please ensure you have run ../../../../Cygwin/home/Ash/WebKit-r105582/Tools/Scripts/update-webkit to install dependencies.

You can view build errors by checking the BuildLog.htm files located at:
/cygdrive/c/Cygwin/home/Ash/WebKit-r105582/WebKitBuild/obj//.

Ash@Bull ~
#

Great! So far so good. We downloaded and installed WinCairoRequirements (to redownload, just delete WebKitLibraries\win\WinCairoRequirements.headers) and we got VS2010 to run and try to load (and complain of) the solution file. Let’s upgrade it.

Open the solution file located at Source\WebKit\win\WebKit.vcproj\WebKit.sln in VS2010. (The easiest way to run VS2010 is to simply run pdevenv from the shell.) You’ll be prompted to convert the solution and all 40 projects. Now we should save the solution and close VS. (Alternatively you can use the /upgrade command.) Let’s go back and try to build again. Run build-webkit --wincairo from the shell. You should see the projects getting built and fail with more errors than you can count. Let’s Fix the errors.

Windows 7 UAC

Here is a generic error that’s omnipresent:

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF, Configuration: Release_Cairo_CFLite Win32 ------
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error MSB6006: "CL.exe" exited with code -1073741819.

The above error actually means “CL.exe” failed to execute. It’s a general failure. The culprit here is UAC of Windows 7. To fix this issue, navigate to the VSINSTALLDIR folder, in Common7\IDE\ there should be devenv.exe (not devenv.com). Select the file, open properties then Compatibility tab. At the bottom under “Privilege Level” check “Run this program as an administrator”. Now VS2010 should run with full privileges and executing CL.exe (the C++ compiler) should work.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
1>EXEC : cygwin warning :
2>------ Build started: Project: WTF, Configuration: Release_Cairo_CFLite Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'C:\Cygwin\home\Ash\WebKit-r105582\WebKitBuild\Release_Cairo_CFLite\obj\WTF\MainThreadWin.obj'

This time the Linker is complaining of not finding an OBJ file. Here we notice a couple of things. First, since CL no longer complains, it’s safe to assume our UAC fix worked and CL ran. Second, and more importantly, we see no CPP file compilation output before the linker error. Checking the output folder clearly shows no OBJ files. May be the output folder is different, so we need to see more details. Changing the log-level from Visual Studio (Tools > Options > Projects and Solutions > Build and Run. Change “MSBuild project build output verbosity” from “Quiet” to “Detailed” or higher) shows that CL is not compiling anything at all! After some investigation, it turns out the culprit is the parallelcl script (in Tools/Scripts). This middleware gets called from Tools/vcbin/cl.exe, which is what is actually called by VS2010 since it’s found first on the path. The purpose of this script is to parallelize the build by executing multiple concurrent instances of the compiler.

The older Visual Studio versions used to dump all command-line parameters passed to CL in a compiler response file. VS2010 isn’t using response files and is passing the params in the classical way. This behavior may be specific to Windows 7 as its shell supports a larger command-line param buffer than previous versions, but I haven’t checked either way. Bottom line is that parallelcl needs to accomodate this fact because as-is it’s simply failing to pass anything to CL, which is why nothing is actually getting compiled.

We can of course bypass this script altogether. Unfortunately, this will cost us much in terms of build time (which is significant to start with) because VS2010 (and 2008 as well) support only project-level parallelization, which isn’t much help for WebKit. The fix is to directly call the real CL. We may later try to do a better fix and support compiler-level parallelization, which is what this script was actually doing. To disable this custom script all we have to do is simply rename the CL.exe in Tools\vcbin\cl.exe.

mv Tools/vcbin/cl.exe Tools/vcbin/cl-.exe

Warnings (as Error)

Building again we see source files getting compiled. This time the errors come from the warnings. We resolved this issue by removing the “warnings as errors” options. Fire up VS2010 (which can be done by running pdevenv from the shell) then load the WebKit solution. Select every C++ solution (either one at a time, or all together) and open their properties. From the C/C++ > General node, change “Treat Warnings As Errors” to “No (/WX-)”. You probably want to do this for “All Configurations”. Save the solution and lets build again from the shell. To change settings, we’ll use property sheets (quick into here and here, more details here) which not only is the correct way to share common settings between large number of projects and configurations, but also WebKit heavily utilizes anyway.

Output showing “warning as error” and some superfluous warnings:

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF, Configuration: Release_Cairo_CFLite Win32 ------
2>c:\prj\webkit\webkit\webkit-r105582\source\javascriptcore\wtf\PassRefPtr.h(86): error C2220: warning treated as error - no 'object' file generated
2>c:\prj\webkit\webkit\webkit-r105582\source\javascriptcore\wtf\PassRefPtr.h(86): warning C4396: 'WTF::adoptRef' : the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
2>C:\prj\WebKit\WebKit\WebKit-r105582\Source\JavaScriptCore\wtf/HashSet.h(96): warning C4396: 'WTF::deleteAllValues' : the inline specifier cannot be used when a friend declaration refers to a specialization of a function template

The property sheet file format was changed in VS2010. As with the C++ project file names, which changed from vcproj to vcxproj, the property sheet file names have also changed from vsprops to props. The reason for this is because now C++ projects are now built using MSBuild and not VCBuild. Old vcproj files, for example, contained file filters (which defined the folder structure shown in Visual Studio) as well as build instructions. New vcxproj files now contain only build instructions and filters are now in vcxproj.filters. Since property sheets contain compiler switches and flags, the format must also comform to the MSBuild format. The same is true for vcxproj files.

To disable “warnings as errors” open WebKitLibraries\win\tools\vsprops\common.props and change the code TreatWarningAsError from true to false. We also see a lot of compiler warning C4396 and linker warning LNK4221, so let’s disable them as well.

Lines 13-23 of common.props:

<ClCompile>
<AdditionalOptions>/bigobj /GS %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>WIN32;_WINDOWS;WINVER=0x502;_WIN32_WINNT=0x502;_WIN32_IE=0x603;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_HAS_EXCEPTIONS=0;BUILDING_$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4396;4018;4068;4099;4100;4127;4138;4180;4189;4201;4244;4251;4275;4288;4291;4305;4344;4355;4389;4481;4503;4505;4510;4512;4610;4706;4800;4951;4952;4996;6011;6031;6211;6246;6255;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>

Fixing Errors

nullptr

VS2010’s C++ compiler supports the new nullptr keyword. This was previously simulated in WTF\NullPtr.cpp/h as class std::nullptr_t; which isn’t simulated for VS2010 and newer (WTF\Compiler.h disables nullptr simulation for _MSC_VER >= 1600). Unfortunately, the simulated class, unlike a native one, needs to be exported so that it may be consumed by other projects. JavaScriptCore exports it, and since it’s not simulated, it can’t be found. From Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def we need to remove “?nullptr@@3Vnullptr_t@std@@A”.

MIDL

Like CL, there is a MIDL wrapper in Tools/vcbin. The purpose of this wrapper is to wrap command-line parameters in double-quotes. What it does wrong is that it, like the CL wrapper, assumes that the only parameter is a response file. Unfortunately, VS2010 doesn’t feel obliged to pass a response file in every case, so the wrapper ends up double-quotting every parameter and thus ends up passing invalid parameters to the real MIDL. Two solutions: we can temporarily rename the wrapper file to by-pass it (it works for me) or we can improve the MIDL wrapper to support both cases. For now, let’s simply rename the wrapper to bypass it.

mv Tools/vcbin/midl.exe Tools/vcbin/midl-.exe

Link Errors

If you got thus far, then you compiled everything until WebKit proper. Your biggest milestones were JavaScriptCore, Interfaces and WebCore. WebCore, however, seems to be missing a dozen or so definitions. Turns out that during the project conversion VS2010 set the Item Type (under General settings) to “Custom Build Tool” instead of “C/C++ compiler” thereby getting ignored by the C++ compiler. The culprit here is the VS2005 project file, which has incorrect Item Type for these files, one the original project file is fixed, the conversion should produce valid output. These files are:

Source\WebCore\platform\network\curl\CookieJarCurl.cpp
Source\WebCore\platform\image-decoders\ImageDecoder.cpp

Just change their Item Type to “C/C++ compiler” from their properties and rebuild. If all goes well, you should get no error and everything should build successfully.

Wrapping up

Summary

Here is what we did so far:

  1. Install Cygwin.
  2. Installed VS2010 Sp1 (and Windows SDK 7.1).
  3. Set WEBKITLIBRARIESDIR and WEBKITOUTPUTDIR environment variables.
  4. Make devenv.exe run as administrator.
  5. Change Tools\Scripts\pdevenv to recognize VS100COMNTOOLS.
  6. Remove the nullptr_t export from Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.def.
  7. Disable CL and MIDL wrappers (the files may be renamed or their folder removed from the path).
  8. Disable Warning as Error from WebKitLibraries\win\tools\vsprops\common.props (optionally disable warning C4396 and enable MultiProcessor Compilation).
  9. Change the Item Type of Source\WebCore\platform\network\curl\CookieJarCurl.cpp and Source\WebCore\platform\image-decoders\ImageDecoder.cpp to C/C++ compiler.

Of course it would be great if one didn’t have to make all the code changes every time they updated the source code. Also, VS2010 project and props files have a different extension and format than the older ones. This means that any changes done to these files won’t get reflected in our converted files. The fix to that is to delete the converted Solution file and VS2010 will convert the files again. But even the conversion is a manual process. Let’s automate these changes…

Automating

Every modification we make to the source code, is a departure from the mainline and therefore a pain in maintaining it. I wanted somethin maintainable. This meant minimal change. I didn’t want to add new scripts, if any at all. Not only that, but I also wanted to support VS2005/VS2008 builds as well. That is, I plan to send this patch to become part of the mainline codebase. Turns out, we only need to modify one script in the WebKit proper source code: pdevenv.

We must modify pdevenv anyway to add support for VS2010 toolchain, no escape to that. So, here is what we can also do. First, add the VS100COMNTOOLS check, then, we need to convert the project, edit JavaScriptCore.def to remove the nullptr_t reference. We don’t need to rename the CL and MIDL wrappers; it’s enough to remove their folder from the path. Next, we need to edit common.props to disable warning as error, disable warning C4396 (which is optional) and enable MultiProcessor Compilation (again optional). Finally, we need to find all .cpp files and change their type to ClCompiler.

All of the editing tasks can be done using perlre (Perl Regex). In fact, they are simple one-line scripts. The tricky part was to generate Windows Batch file with the perl calls from pdevenv, which is a perl script itself. The reason for this is because that’s how Visual Studio is called; it’s a separate CMD shell. As you can see, the regex code is pretty twisted. Here is the updated pdevenv script:

#!/usr/bin/perl -w

use strict;
use warnings;

use File::Temp qw/tempfile/;
use File::Copy;
use FindBin;

use lib $FindBin::Bin;
use webkitdirs;

my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;

chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
chomp(my $scriptsPath = `cygpath -w "$FindBin::Bin"`);

my $command = join(" ", @ARGV);
my $vsToolsVar;
if ($ENV{'VS100COMNTOOLS'}) {
    $vsToolsVar = "VS100COMNTOOLS";
    $vcBin = ''; # We no longer need cl and midl wrappers.
	print $fh "\@echo Using VS2010 toolchain.\r\n";
	# If there is no vs2010 solution, upgrade.
	my $solution = $ARGV[0];
	$solution =~ s/WebKit.sln/WebKit-vs2010.sln/g;
	print $fh "\@echo off\r\n";
	print $fh "if not exist ..\\..\\WebKitLibraries ( \@echo This is not a WebKit directory! Stopping.\n goto exit )\r\n";
	print $fh "if not exist " . $solution . " (\r\n";
	print $fh "copy " . $ARGV[0] . " " . $solution . "\r\n";
	print $fh ")\r\n"; # If no vs2010 solution.
	print $fh "\@echo Upgrading solution file @ " . $solution . ". Build will resume when done. Please be patient.\r\n";
	print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\r\n";
	print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv /upgrade " . join(" ", $solution) . ") ELSE ";
	print $fh "VCExpress.exe /useenv /upgrade " . join(" ", $solution) . "\r\n";

	# Correct the solution file name.
	$command = '';
    foreach my $arg (@ARGV) {
		$arg =~ s/WebKit.sln/WebKit-vs2010.sln/g;
        $command = $command . ' ' . $arg;
    }

	print $fh "\@echo Patching common.props...\r\n";	
	my $props_filename = "..\\..\\WebKitLibraries\\win\\tools\\vsprops\\common.props";
	chomp($props_filename = `cygpath -w '$props_filename'`);
	print $fh "\@echo  Disabling warning as error.\r\n";	
	my $replace_string = "s/\\true\\/\\false\\/g";
	print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
	print $fh "\@echo  Disabling warning C4396.\r\n";	
	$replace_string = "s/\\4396;/\\/g"; # Delete disabled warning 4396.
	print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
	$replace_string = "s/\\/\\4396;/g";
	print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n"; # Disable warning 4396.
	print $fh "\@echo  Enabling multiprocess compile.\r\n";	
	$replace_string = "s/\\(.*?)\\//g"; # Delete MP compilation.
	print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n";
	$replace_string = "s/\\/\\\\n      \\true\\/g";
	print $fh "perl -p -i -e \"" . $replace_string . "\" \"" . $props_filename . "\"\r\n"; # Enable MP compilation.

	my $jsdef_filename = "..\\..\\Source\\JavaScriptCore\\JavaScriptCore.vcproj\\JavaScriptCore\\JavaScriptCore.def";
	chomp($jsdef_filename = `cygpath -w '$jsdef_filename'`);
	print $fh "if not exist \"" . $jsdef_filename . ".orig\" (\r\n";
	print $fh "\@echo Patching JavaScriptCore.def...\r\n";	
	print $fh "move \"" . $jsdef_filename . "\" \"" . $jsdef_filename . ".orig\" \r\n";
	print $fh "findstr /V ?nullptr\@\@3Vnullptr_t\@std\@\@A \"" . $jsdef_filename . ".orig\" > \"" . $jsdef_filename . "\"\r\n";
	print $fh ")\r\n"; # If no JavaScriptCore.def.orig.

	my $webcore_filename = "..\\..\\Source\\WebCore\\WebCore.vcproj\\WebCore.vcxproj";
	chomp($webcore_filename = `cygpath -w '$webcore_filename'`);
	print $fh "\@echo Correcting WebCore.vcxproj...\r\n";	
	$replace_string = "undef \$/; s/\\/\\/msgi";
	print $fh "perl -0pi -e \"" . $replace_string . "\" \"" . $webcore_filename . "\"\r\n";
} elsif ($ENV{'VS90COMNTOOLS'}) {
    $vsToolsVar = "VS90COMNTOOLS";
} elsif ($ENV{'VS80COMNTOOLS'}) {
    $vsToolsVar = "VS80COMNTOOLS";
} else {
    print "*************************************************************\n";
    print "Cannot find Visual Studio tools dir.\n";
    print "Please ensure that \$VS80COMNTOOLS or \$VS90COMNTOOLS\n";
    print "is set to a valid location.\n";
    print "*************************************************************\n";
    die;
}

print $fh "\@echo off\r\n";
print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\r\n";
print $fh "set PATH=$vcBin;$scriptsPath;\%PATH\%\r\n";

print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", $command) . ") ELSE ";
print $fh "VCExpress.exe /useenv " . join(" ", $command) . "\r\n";
print $fh ":exit\n";

close $fh;
chmod 0755, $path;
chomp($path = `cygpath -w -s '$path'`);

exec("cmd /c \"call $path\"");

One-Command Build

Having installed Cygwin and Visual Studio, we need to change devenv.exe to run as administrator. Beyond that, just download the source code and the patch. Extract the source code anywhere you like, then extract the patch in the same folder. You should get a new vs2010-build-env.cmd file in the root of that folder and replace pdevenv in the Tools/Scripts folder.

Right-click vs2010-build-env.cmd and Run as Administrator. In the shell, simply execute build-webkit --wincairo and go read something, exercise or eat some healthy meal… Be back in an hour or so. Your station won’t be much usable during the build anyway.

Complete run of a patched nightly build for reference and completeness:

Setting up Cygwin directory...
symbolic link created for C:\Cygwin <> C:\Tools\cygwin
Setting up WebKit directory...
symbolic link created for C:\Cygwin\home\Ash\WebKit-r106194 <> C:\prj\WebKit\WebKit-r106194\
Exporting environment varibles...
Note: Remember to set devenv.exe to run as administrator!
Running Cygwin...

Ash@Bull ~
$ build-webkit --wincairo
Checking Last-Modified date of WinCairoRequirements.zip...
Downloading WinCairoRequirements.zip...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14.0M  100 14.0M    0     0   400k      0  0:00:35  0:00:35 --:--:--  407k

Installing WinCairoRequirements...
The WinCairoRequirements has been sucessfully installed in
 /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/WebKitLibraries/win
Building results into: /cygdrive/c/Cygwin/home/Ash/WebKit-r106194/WebKitBuild
WEBKITOUTPUTDIR is set to: C:\prj\WebKit\WebKit-r106194\WebKitBuild
WEBKITLIBRARIESDIR is set to: C:\Cygwin\home\Ash\WebKit-r106194\WebKitLibraries\win
/cygdrive/c/Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/pdevenv win\WebKit.vcproj\WebKit.sln /build Release_Cairo_CFLite
Using VS2010 toolchain.
        1 file(s) copied.
Upgrading solution file @ win\WebKit.vcproj\WebKit-vs2010.sln. Build will resume when done. Please be patient.
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.

Upgrade completed successfully. Results can be seen in the
upgrade report:
C:\prj\WebKit\WebKit-r106194\Source\WebKit\win\WebKit.vcproj\UpgradeLog.XML
Patching common.props...
 Disabling warning as error.
 Disabling warning C4396.
 Enabling multiprocess compile.
Patching JavaScriptCore.def...
        1 file(s) moved.
Correcting WebCore.vcxproj...
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: JavaScriptCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
2>------ Build started: Project: WTF, Configuration: Release_Cairo_CFLite Win32 ------
2>StringExtras.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>SizeLimits.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>NullPtr.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>HashTable.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>DynamicAnnotations.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>BinarySemaphore.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
3>------ Build started: Project: JavaScriptCore, Configuration: Release_Cairo_CFLite Win32 ------
3>JSGlobalObject.obj : warning LNK4197: export '?s_globalObjectMethodTable@JSGlobalObject@JSC@@1UGlobalObjectMethodTable@2@B' specified multiple times; using first specification
3>PropertyDescriptor.obj : warning LNK4197: export '?defaultAttributes@PropertyDescriptor@JSC@@0IA' specified multiple times; using first specification
3>MachineStackMarker.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>Heap.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSValueRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific* WTF::WTFThreadData::staticData) imported
3>JSWeakObjectMapRefPrivate.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>BytecodeGenerator.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>Parser.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackObject.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSClassRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific* WTF::WTFThreadData::staticData) imported
3>JSContextRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSObjectRef.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSGlobalData.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSBase.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackConstructor.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
3>JSCallbackFunction.obj : warning LNK4049: locally defined symbol ?staticData@WTFThreadData@WTF@@0PAV?$ThreadSpecific@VWTFThreadData@WTF@@@2@A (private: static class WTF::ThreadSpecific * WTF::WTFThreadData::staticData) imported
4>------ Build started: Project: WebCoreGenerated, Configuration: Release_Cairo_CFLite Win32 ------
4>C:\prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCairo.props(4,5): warning MSB4011: "C:\prj\WebKit\WebKit-r106194\WebKitLibraries\win\tools\vsprops\common.props" cannot be imported again. It was already imported at "C:\prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGeneratedCommon.props (4,5)". This is most likely a build authoring error. This subsequent import wi
ll be ignored. [C:\prj\WebKit\WebKit-r106194\Source\WebCore\WebCore.vcproj\WebCoreGenerated.vcxproj]
5>------ Skipped Build: Project: QTMovieWin, Configuration: Release_Cairo_CFLite Win32 ------
5>Project not selected to build for this solution configuration
6>------ Build started: Project: WebCore, Configuration: Release_Cairo_CFLite Win32 ------
6>..\platform\graphics\cairo\DrawErrorUnderline.h(24): warning C4067: unexpected tokens following preprocessor directive - expected a newline
6>..\platform\graphics\cairo\DrawErrorUnderline.h(24): warning C4067: unexpected tokens following preprocessor directive - expected a newline
6>InspectorIndexedDBAgent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>InspectorFileSystemAgent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>StorageInfo.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBTransaction.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBRequest.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBObjectStoreBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBObjectStore.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBKeyRange.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBKey.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBIndexBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBIndex.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactoryBackendInterface.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactoryBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBFactory.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBDatabaseBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBDatabase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBCursorBackendImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBCursor.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>IDBAny.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PluginDebug.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileReaderCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntrySyncCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntryCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntrySyncCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntryCustom.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ProgressShadowElement.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControls.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControlRootElement.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaControlElements.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WeekInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>TimeInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>OperationNotAllowedException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MonthInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MicroDataItemValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaFragmentURIParser.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaDocument.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LocalFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>HTMLPropertiesCollection.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>HTMLParserErrorCodes.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriterSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriterBase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileWriter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileThread.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileSystemCallbacks.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileStreamProxy.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReaderLoader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileReader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntryArraySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>EntryArray.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Entry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMURL.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystemSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystemBase.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DOMFilePath.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryReader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DirectoryEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateTimeLocalInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateTimeInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DateInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ColorInputType.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>NotificationCenter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Notification.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScriptedAnimationController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>StyleCachedShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>RenderLayerBacking.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>RenderFullScreen.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebKitCSSShaderValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebKitCSSFilterValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>SpeechInputClientMock.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LoaderRunLoopCF.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>BlobResourceHandle.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>BlobRegistryImpl.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayerPrivateAVFoundationCF.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayerPrivateAVFoundation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WKCACFViewLayerTreeHost.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCALayerWinInternal.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCALayerWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformCAAnimationWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>LegacyCACFLayerTreeHost.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>TransformationMatrixCA.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GraphicsLayerCA.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FilterOperations.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FilterOperation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FELightingNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FEGaussianBlurNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FECustomFilter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FECompositeArithmeticNEON.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterProgram.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterOperation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CustomFilterMesh.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FullScreenController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MediaPlayer.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GraphicsLayer.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>WebCorePrefix.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScrollbarThemeSafari.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>GDIObjectCounter.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>ScrollAnimatorWin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PlatformEvent.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>FileStream.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CalculationValue.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>AsyncFileSystem.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>CachedShader.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MHTMLParser.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>MHTMLArchive.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>SpeechInput.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PerformanceTiming.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PerformanceNavigation.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>Performance.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>PageVisibilityState.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoUsageCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoQuotaCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfoErrorCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSStorageInfo.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSOperationNotAllowedException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileWriterCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileException.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileEntry.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSFileCallback.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSEntryArraySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDOMFileSystemSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryReaderSync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>JSDirectoryEntrySync.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
6>DerivedSources.obj : warning LNK4006: "protected: void __thiscall WebCore::JSWebKitCSSRegionRule::finishCreation(class JSC::JSGlobalData &)" (?finishCreation@JSWebKitCSSRegionRule@WebCore@@IAEXAAVJSGlobalData@JSC@@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "private: __thiscall WebCore::JSWebKitCSSRegionRuleConstructor::JSWebKitCSSRegionRuleConstructor(class JSC::Structure *,class WebCore::JSDOMGlobalObject *)" (??0JSWebKitCSSRegionRuleConstructor@WebCore@@AAE@PAVStructure@JSC@@PAVJSDOMGlobalObject@1@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRuleConstructor::getOwnPropertyDescriptor(class JSC::JSObject *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertyDescriptor &)" (?getOwnPropertyDescriptor@JSWebKitCSSRegionRuleConstructor@WebCore@@SA_NPAVJSObject@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertyDescriptor@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "protected: __thiscall WebCore::JSWebKitCSSRegionRule::JSWebKitCSSRegionRule(class JSC::Structure *,class WebCore::JSDOMGlobalObject *,class WTF::PassRefPtr)" (??0JSWebKitCSSRegionRule@WebCore@@IAE@PAVStructure@JSC@@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VWebKitCSSRegionRule@WebCore@@@WTF@@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRuleConstructor::getOwnPropertySlot(class JSC::JSCell *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSWebKitCSSRegionRuleConstructor@WebCore@@SA_NPAVJSCell@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertySlot@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRule::getOwnPropertyDescriptor(class JSC::JSObject *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertyDescriptor &)" (?getOwnPropertyDescriptor@JSWebKitCSSRegionRule@WebCore@@SA_NPAVJSObject@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertyDescriptor@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static bool __cdecl WebCore::JSWebKitCSSRegionRule::getOwnPropertySlot(class JSC::JSCell *,class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSWebKitCSSRegionRule@WebCore@@SA_NPAVJSCell@JSC@@PAVExecState@4@ABVIdentifier@4@AAVPropertySlot@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSObject * __cdecl WebCore::JSWebKitCSSRegionRule::createPrototype(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?createPrototype@JSWebKitCSSRegionRule@WebCore@@SAPAVJSObject@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSObject * __cdecl WebCore::JSWebKitCSSRegionRulePrototype::self(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?self@JSWebKitCSSRegionRulePrototype@WebCore@@SAPAVJSObject@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "private: void __thiscall WebCore::JSWebKitCSSRegionRuleConstructor::finishCreation(class JSC::ExecState *,class WebCore::JSDOMGlobalObject *)" (?finishCreation@JSWebKitCSSRegionRuleConstructor@WebCore@@AAEXPAVExecState@JSC@@PAVJSDOMGlobalObject@2@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static class JSC::JSValue __cdecl WebCore::JSWebKitCSSRegionRule::getConstructor(class JSC::ExecState *,class JSC::JSGlobalObject *)" (?getConstructor@JSWebKitCSSRegionRule@WebCore@@SA?AVJSValue@JSC@@PAVExecState@4@PAVJSGlobalObject@4@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "class JSC::JSValue __cdecl WebCore::jsWebKitCSSRegionRuleCssRules(class JSC::ExecState *,class JSC::JSValue,class JSC::Identifier const &)" (?jsWebKitCSSRegionRuleCssRules@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@V23@ABVIdentifier@3@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "class JSC::JSValue __cdecl WebCore::jsWebKitCSSRegionRuleConstructor(class JSC::ExecState *,class JSC::JSValue,class JSC::Identifier const &)" (?jsWebKitCSSRegionRuleConstructor@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@V23@ABVIdentifier@3@@Z) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRuleConstructor::s_info" (?s_info@JSWebKitCSSRegionRuleConstructor@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRulePrototype::s_info" (?s_info@JSWebKitCSSRegionRulePrototype@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
6>DerivedSources.obj : warning LNK4006: "public: static struct JSC::ClassInfo const WebCore::JSWebKitCSSRegionRule::s_info" (?s_info@JSWebKitCSSRegionRule@WebCore@@2UClassInfo@JSC@@B) already defined in JSWebKitCSSRegionRule.obj; second definition ignored
7>------ Build started: Project: Interfaces, Configuration: Release_Cairo_CFLite Win32 ------
8>------ Build started: Project: WebKitGUID, Configuration: Release_Cairo_CFLite Win32 ------
9>------ Build started: Project: WebKitLib, Configuration: Release_Cairo_CFLite Win32 ------
9>WebDesktopNotificationsDelegate.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
9>FullscreenVideoController.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
10>------ Build started: Project: WebKit2Generated, Configuration: Release_Cairo_CFLite Win32 ------
11>------ Build started: Project: WebKit, Configuration: Release_Cairo_CFLite Win32 ------
11>libjpeg.lib(jdapimin.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdapimin.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdapistd.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdapistd.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdmarker.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdmarker.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jerror.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jerror.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdmaster.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdmaster.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jcomapi.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jcomapi.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdinput.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdinput.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jmemmgr.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jmemmgr.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jutils.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jutils.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdhuff.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdhuff.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jquant1.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jquant1.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jddctmgr.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jddctmgr.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdsample.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdsample.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdarith.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdarith.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdcolor.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdcolor.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdcoefct.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdcoefct.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jquant2.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jquant2.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdmerge.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdmerge.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdmainct.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdmainct.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jdpostct.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jdpostct.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jmemnobs.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jmemnobs.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jidctint.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jidctint.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jidctflt.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jidctflt.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jidctfst.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jidctfst.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libjpeg.lib(jaricom.obj) : warning LNK4099: PDB 'libjpeg.pdb' was not found with 'libjpeg.lib(jaricom.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libjpeg.pdb'; linking object as if no debug info
11>libpng.lib(pngerror.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngerror.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngread.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngread.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngpread.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngpread.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngget.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngget.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngtrans.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngtrans.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngrtran.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngrtran.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngset.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngset.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(png.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(png.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngrio.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngrio.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngrutil.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngrutil.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
11>libpng.lib(pngmem.obj) : warning LNK4099: PDB 'libpng.pdb' was not found with 'libpng.lib(pngmem.obj)' or at 'C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\libpng.pdb'; linking object as if no debug info
12>------ Build started: Project: WebKit2WebProcess, Configuration: Release_Cairo_CFLite Win32 ------
13>------ Build started: Project: testapi, Configuration: Release_Cairo_CFLite Win32 ------
14>------ Build started: Project: jsc, Configuration: Release_Cairo_CFLite Win32 ------
15>------ Build started: Project: testRegExp, Configuration: Release_Cairo_CFLite Win32 ------
16>------ Build started: Project: WinLauncher, Configuration: Release_Cairo_CFLite Win32 ------
17>------ Build started: Project: WinLauncherLauncher, Configuration: Release_Cairo_CFLite Win32 ------
17>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WinLauncherLauncher.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WinLauncher.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WinLauncherLauncher) does not match the Linker's OutputFile property value (WinLauncher). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
18>------ Build started: Project: TestNetscapePlugin, Configuration: Release_Cairo_CFLite Win32 ------
18>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\TestNetscapePlugin.dll) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\TestNetscapePlugin\npTestNetscapePlugin.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
18>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(TestNetscapePlugin) does not match the Linker's OutputFile property value (npTestNetscapePlugin). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
19>------ Build started: Project: ImageDiff, Configuration: Release_Cairo_CFLite Win32 ------
19>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.dll) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
19>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
20>------ Build started: Project: ImageDiffLauncher, Configuration: Release_Cairo_CFLite Win32 ------
20>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiffLauncher.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\ImageDiff.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
20>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(ImageDiffLauncher) does not match the Linker's OutputFile property value (ImageDiff). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
21>------ Build started: Project: WebCoreTestSupport, Configuration: Release_Cairo_CFLite Win32 ------
22>------ Build started: Project: DumpRenderTree, Configuration: Release_Cairo_CFLite Win32 ------
23>------ Build started: Project: DumpRenderTreeLauncher, Configuration: Release_Cairo_CFLite Win32 ------
23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\DumpRenderTreeLauncher.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\DumpRenderTree.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(DumpRenderTreeLauncher) does not match the Linker's OutputFile property value (DumpRenderTree). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
24>------ Build started: Project: WebKitLauncherWin, Configuration: Release_Cairo_CFLite Win32 ------
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitLauncherWin.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKit.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WebKitLauncherWin) does not match the Linker's OutputFile property value (WebKit). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
25>------ Build started: Project: record-memory-win, Configuration: Release_Cairo_CFLite Win32 ------
26>------ Build started: Project: InjectedBundleGenerated, Configuration: Release_Cairo_CFLite Win32 ------
27>------ Build started: Project: InjectedBundle, Configuration: Release_Cairo_CFLite Win32 ------
28>------ Build started: Project: WebKitTestRunner, Configuration: Release_Cairo_CFLite Win32 ------
29>------ Build started: Project: WebKitTestRunnerLauncher, Configuration: Release_Cairo_CFLite Win32 ------
29>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitTestRunnerLauncher.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\WebKitTestRunner.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
29>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(WebKitTestRunnerLauncher) does not match the Linker's OutputFile property value (WebKitTestRunner). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile)
.
30>------ Build started: Project: gtest-md, Configuration: Release_Cairo_CFLite Win32 ------
30>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\lib\gtest-md.lib) does not match the Library's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\lib\gtest.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
30>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1153,5): warning MSB8012: TargetName(gtest-md) does not match the Library's OutputFile property value (gtest). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
31>------ Build started: Project: TestWebKitAPIGenerated, Configuration: Release_Cairo_CFLite Win32 ------
32>------ Build started: Project: TestWebKitAPI, Configuration: Release_Cairo_CFLite Win32 ------
33>------ Build started: Project: TestWebKitAPIInjectedBundle, Configuration: Release_Cairo_CFLite Win32 ------
34>------ Build started: Project: MiniBrowser, Configuration: Release_Cairo_CFLite Win32 ------
35>------ Build started: Project: MiniBrowserLauncher, Configuration: Release_Cairo_CFLite Win32 ------
35>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\MiniBrowserLauncher.exe) does not match the Linker's OutputFile property value (C:\prj\WebKit\WebKit-r106194\WebKitBuild\Release_Cairo_CFLite\bin\MiniBrowser.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
35>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(MiniBrowserLauncher) does not match the Linker's OutputFile property value (MiniBrowser). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
========== Build: 34 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

===========================================================
 WebKit is now built (49m:07s).
 To run Safari with this newly-built code, use the
 "../../../Cygwin/home/Ash/WebKit-r106194/Tools/Scripts/run-safari" script.
===========================================================

Ash@Bull ~
$

The Patch

The Patch: WebKit-vs2010-Patch.zip
Good luck and happy hacking.

Nov 122011
 

Just discovered a set of IDA Pro video/flash tutorials called TiGa’s Video Tutorial Series on IDA Pro. For anyone who ever needed to go knee-deep in the native assembly, IDA Pro is an indispensable tool. The only other tool that I’d put on that same list is WinDbg, of course.

IDA Pro not only disassembles for a multitude of processors/architectures, but it also allows for editing, renaming, commenting the disassembly. On top of all that, it’s a debugger! With an add-on decompiler, one can even generate C/C++ code from the disassembly for much better and faster insight into the code.

The thing about these tutorials is that they don’t have a large audience, so there aren’t too many of them and the ones that are around are typically old and outdated. At any rate, I was happy to find these, especially that the applications used for the tutorials are made-up and available for download.

Sep 252011
 

Building a large and complex such as WebKit is anything but straightforward. WebKit is the core of multiple browsers, most notably Safari and Chrome. Even the official instructions are sometimes lacking. This is mostly because such large projects are moving targets and it’s hard to keep track of all the changes in the requirements. Another issue is that most developers don’t setup build systems from scratch regularly. Probably no more than once or twice during the lifetime of a project. Even blogs, articles, forums and mailing lists that discuss building WebKit are almost completely outdated.

At any rate, these notes are up-to-date as of September 2011, I hope you find them helpful.

Background

WebKit can be built in different flavors. The differences are important, because one must setup the build system slightly differently for each flavor. There are essentially 4 different flavors: Apple Windows, WinCairo, Qt and GTK. All four require external libraries to be present for the build to succeed. I have no experience building the Qt and GTK flavors. Here I’ll cover Apple Windows and WinCairo. I do not cover building Chromium.

Build Environment

There are some common requirements, so first and foremost make sure these are setup correctly. You may follow the instructions described here. Unless you want to build using VS2005, ignore the instructions on VS2005.

Here is a summary:

  1. Install Cygwin. Use this downloader. Preferably install to C:\cygwin (I’ll assume that’s where it is). Never to a path with spaces! Make sure you install: svn, curl, unzip, make, perl, python, gcc, gcc-g++, gcc4, gcc4-g++, bison, flex, gperf.
  2. Install QuickTime SDK in the default location.
  3. Install DirectX SDK. However, if you’ll build with VS2005, don’t install anything newer than February 2010. It’s worth noting that the August 2007 version builds WebKit just fine (as of r95358 with default flags).
  4. Install Visual Studio 2005 or 2008 with all updates and Service Packs. For VS2005 please refer to the updates listed here. Personally, I suggest sticking with 2008.
  5. Install Windows SDK for Server 2003 R2 or newer. See below for more details.
  6. Download the Support Libraries from Apple. Copy the file (don’t extract, just copy the zip) into the WebKit source folder.
  7. Create WEBKITLIBRARIESDIR and WEBKITOUTPUTDIR environment variables. The values must be fully-qualified Windows paths and not Cygwin/unix paths. If you don’t want to change you system-wide path, skip this and see the script below.

Windows SDK

If you have multiple Windows SDKs (as is typically the case when installing multiple Visual Studio versions) then you will have to setup your target Visual Studio to use the SDK of choice. There are two ways to achieve this.

The first method is to change the BIN, INCLUDE and LIB directories from the Visual Studio Options dialog. From Tools > Options menu, from Projects and Solutions > VC++ Directories page, set the Executable files‘s top entry to %SDK%\bin folder, the %SDK%\lib at the top of the Library files entries and %SDK%\include to the top of the Include files‘s entries. Where %SDK% is the installation path of the SDK. Note: This will change the Visual Studio paths for all instances. So don’t make this change if other projects depend on your current settings, unless you care more about WebKit, of course.

The second method is much less intrusive. We can change the environment variables in a shell instance and pass them on to Visual Studio. This is relatively easy and convenient, but will require scripting. In the Tools/Scripts folder of WebKit there is a script called pdevenv. This Perl script is responsible for creating a Windows CMD file which ultimately runs Visual Studio. The reason for this is because Bash can’t execute the scripts necessary for setting up Visual Studio’s environment.

Here is an example of a modified pdevenv script that sets up the SDK:

#!/usr/bin/perl -w

use strict;
use warnings;
use File::Temp qw/tempfile/;
use FindBin;
use lib $FindBin::Bin;
use webkitdirs;

my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;

chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
chomp(my $scriptsPath = `cygpath -w "$FindBin::Bin"`);

# Reverse the order of these if you prefer to use VS2008.
my $vsToolsVar;
if ($ENV{'VS80COMNTOOLS'}) {
    $vsToolsVar = "VS80COMNTOOLS";
} elsif ($ENV{'VS90COMNTOOLS'}) {
    $vsToolsVar = "VS90COMNTOOLS";
} else {
    print "*************************************************************\n";
    print "Cannot find Visual Studio tools dir.\n";
    print "Please ensure that \$VS80COMNTOOLS or \$VS90COMNTOOLS\n";
    print "is set to a valid location.\n";
    print "*************************************************************\n";
    die;
}

# Comment the following to see the environment variables used.
print $fh "\@echo off\n\n";

# Setup Visual Studio.
print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\n\n";
print $fh "set PATH=$vcBin;$scriptsPath;\%PATH\%\n\n";

# Setup the 2003 SDK. Don't call its own SetEnv as it doesn't detect VS2008 or newer.
print $fh "Set MSSdk=C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\n\n";
print $fh "Set INETSDK=%MSSdk%\n\n";
print $fh "Set MSSdk=%MSSdk%\n\n";
print $fh "Set Mstools=%MSSdk%\n\n";
print $fh "Set Lib=%MSSdk%\\Lib;%Lib%\n\n";
print $fh "Set Include=%MSSdk%\\Include;%Include%\n\n";
print $fh "Set Path=%MSSdk%\\Bin;%MSSdk%\\Bin\\WinNT;%path%\n\n";

# Run Visual Studio.
print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", @ARGV) . ") ELSE ";
print $fh "VCExpress.exe /useenv " . join(" ", @ARGV) . "\n";

close $fh;
chmod 0755, $path;
chomp($path = `cygpath -w -s '$path'`);
exec("cmd /c \"call $path\"");

Note: If you already have SDK 6.0, 6.0A, 7.0, 7.0A or 7.1, you should be fine, but be warned: DirectX conflicts with 7.x SDKs, so make sure DirectX headers come after Windows SDK. If you have 6.0 or 6.0A you should have no problems building.

Building with VS2008

  1. Install VS2008 with all Service Packs and updates. (Express version needs a bit of a push to work. Please follow the these instructions.)
  2. Run update-webkit and build-webkit at least once. Regardless of the outcome, delete the contents of WEBKITOUTPUTDIR folder, wherever it is.
  3. Run VS2008 and open C:\cygwin\home\{username}\WebKitTrunk\Source\WebKit\win\WebKit.vcproj\WebKit.sln. You’ll be prompted to convert the project files from VS2005 format to 2008. Convert and save-all.
  4. WebKit projects have no tolerance for warnings and they are set to the highest level. Since VS2008 does emit some superfluous warnings (such as not inlining a force-inline function) the build will fail with these settings. As such, we need to change these setting.
    Select every project that doesn’t end in “generated”, right-click and select Properties. In the Properties window, from the top, change the Configuration to “All Configurations”. Navigate to Configuration Properties/C++/General in the left tree and on the right-side change the Warning Level to “Off: Turn Off All Warnings (/W0)” and Treat Warnings As Errors to “No”. Click OK to close this dialog.
    If you don’t see C++/General in the left tree it means you selected a non-C++ project. You may do this one project at a time.
  5. The project files are now ready. Save all and exit Visual Studio.

Build Notes

  1. Disable Anti-Virus scanners. (Can you spell incredible?) Cygwin needs to simulate Fork, which needs to clone process memory exactly. Many AV products add system hooks to scan processes in-memory. This disrupts memory layout and DLL relocation results in differences in the memory of forked processes resulting in memory corruption. This issue may never happen even with an AV running. However, if you see fork, out-of-memory or Virtual-Memory allocation failures, try disabling AV and try again. Some don’t remove their system hooks by temporarily disabling them, so you’ll need to uninstall them completely.
  2. Don’t build the Trunk. WebKit is large, complex and fast moving. Unless you like testing the limits of your sanity, you may want to stay away from the Trunk, which can be broken and problem-laden. Instead, get a successfully-built and packaged source archive from the nightly builds. At least have one recent successful build from a nightly archive before attempting the Trunk.
  3. Place Cygwin/bin before others in Path. In the system path, place CygWin binary folder after System folders but before anything else. Example: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin;. This will insure that if you have Perl, SVN and other similar utilities installed outside of Cygwin, the Cygwin version will take precendence. NOTE: This may break other products that rely on the non-cygwin variants, in that case, you’ll have to perform this change in a build-script (see below).
  4. Place WebKit sources in your Cygwin home directory. If you install Cygwin in the root, your home should be here: C:\cygwin\home\{username}. WebKit should be in a folder directly within your home. Example: C:\cygwin\home\{username}\webkit.
  5. Add the scripts folder to the path. The webkit scripts must be reachable at all times, makes sure C:\cygwin\home\{username}\webkit\Tools\Scripts is prepended to the path.
  6. Don’t update the WinCairo code unless you want to build that flavor. It seems that running update-webkit --wincairo is changing enough in the code that it’s rendering the Apple Windows flavor broken. If this happens and you can’t build Apple Windows, then simply delete the WebKitLibraries folder, and run update-webkit (without --wincairo!).
  7. Run update-webkit at least once. Even if you don’t need to update the code, you must run this script at least once. Note that if you’ve downloaded a nightly-build package this script won’t update the code to the Trunk! It’ll only update the support libraries and other scripts.
  8. You may have to build twice before it works. The build almost always fails the first time and after deleting the WEBKITOUTPUTDIR folder, so the build script must be executed more than once to get a successful build.
  9. Look for the first failed project to fix errors. Since the WebKit build copies many source files as well as output binaries from one project to another, it’s vital that all dependencies of a sub-project succeed before it is built. That is, if a project fails, typically due to missing headers, identifiers etc, before panicking look for the first failed project and try to fix it. Most probably the errors are due to a previously broken dependency. This can get tricky, as some projects depend on external scripts that may be partially completed and stop reporting errors on subsequent builds. In such a case you won’t see failed dependencies and the sub-project in question would be the first to fail. To make sure this is the case, delete the WEBKITOUTPUTDIR folder and build again. If you get errors, note the first error you got and build again. Repeat this until you get the same error. This is the error you need to fix.
  10. Disable warning as error. If you get error C2220: warning treated as error - no 'object' file generated errors, then follow the instruction for disabling warning as error in the Building with VS2008 section above.

Here is a bash script to setup the environment, update and build. You must set your home folder name. Save this file in the webkit folder, name it build.

#! /bin/sh

echo
echo "Exporting environment varibles..."
export PATH=~/webkit/Tools/Scripts:$PATH
export WEBKITLIBRARIESDIR=C:\\cygwin\\home\\{username}\\webkit\\WebKitLibraries\\win
export WEBKITOUTPUTDIR=C:\\cygwin\\home\\{username}\\webkit\\WebKitBuild

echo
echo "Updating source tree..."
update-webkit

echo
echo "Building..."
build-webkit $*

Apple Windows

This flavor is the one used by Safari on Windows. The external libraries are copyrighted by Apple and aren’t redistributable. As such, the build system will require one to manually download an archive holding them from Apple after accepting the license agreement. This build, therefore, cannot be distributed on the internet with the external libraries. Having said that, one should at least try to get this flavor successfully built before attempting others.

To build this flavor follow these steps:

  1. Run the Cygwin shell.
  2. cd webkit
  3. ./build

WinCairo

To build the WinCairo flavor one had to manually download and install the various libraries, often having to build them manually or get a prebuilt version. Thanks to the efforts of volunteers now the update-webkit script automates all that. If you have built the Apple Windows flavor, you should be able to build WinCairo using the following:

  1. Run the Cygwin shell.
  2. cd webkit
  3. ./build –wincairo

If the build fails, try running the build script again.

However if you get “CF” identifier errors, consider updating the CF library manually. All public CF library identifiers and even filenames either begin or end with “CF”, so they are easy to spot. WebKit WinCairo uses a modified version of the original Apple sources called OpenCFLite. Download a recent version from the project’s page or get the trunk. You’ll have to bite the bullet and build the library yourself, update the headers and libs and build WebKit again.

To build OpenCFLite, open the solution in VS2005 or 2008 (depending on which you’ll use for the WebKit build). Choose the Release configuration and build the CFLite project. Ignore the mountain of warning and see if the build succeeded or not. If all goes well, in the root of the OpenCFLite source folder you should see a dist folder. Now copy the contents of dist into %WEBKITLIBRARIESDIR%\win overwriting existing files.

Delete the %WEBKITLIBRARIESDIR% folder and build Webkit WinCairo again. You should get a clean build.

Debugging

Now that you have a successful build, you may want to build the Debug version by passing --debug switch to the build-webkit script. You can execute this script directly (without running the above build script or update-webkit) or you can modify the above build script to the same effect.

With the debug build we can use the Visual Studio debugger or the ultra-powerful WinDbg. In Visual Studio simply open the solution file from C:\cygwin\home\{username}\WebKitTrunk\Source\WebKit\win\WebKit.vcproj\WebKit.sln, select one of the runner test projects as the startup and hit F5.

Happy hacking and don’t forget, you can contribute by submitting bug reports and sending patches and fixes. Good luck.

References

I couldn’t have succeeded in building WebKit without the help of numerous developers who shared their experience on the web. Here is a list of the most helpful and relevant pages. Be forewarned however, they are mostly outdated!

QR Code Business Card