Bug 19743

Summary: Release build fails on 32-bit Windows
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ararunprasad, benm, dev+webkit, eric, sfalken
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://build.webkit.org/results/trunk-win-release/9700/WebCore-BuildLog.htm
Attachments:
Description Flags
Combines html element cpp files into one whic helps reduce the size of webcore.lib
aroben: review-
v2: Combines html element cpp files into one which helps reduce the size of webcore.lib aroben: review+

Description Adam Roben (:aroben) 2008-06-24 07:41:15 PDT
As of a few weeks ago, it seems to be impossible to successfully build WebKit in the Release configuration on Windows XP. Vista machines (and one Server 2003 R2 machine) build fine. Errors like this occur when linking:

> Creating library...
> d:\WebKit-BuildSlave\trunk-win-release\build\WebKitBuild\lib\WebCore.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x51D16DEE

This seems to be due to whole-program optimization (WPO). My guess is that we're running out of virtual address space.

I don't know why this affects XP but not Vista -- perhaps there was a bug in the OS that was fixed.

Booting with the /3GB option does not fix the issue.

This is affecting the build bots.
Comment 1 Adam Roben (:aroben) 2008-07-21 16:32:23 PDT
This appears to be affecting Vista now as well.
Comment 2 Adam Roben (:aroben) 2008-07-21 16:35:11 PDT
http://support.microsoft.com/kb/888326 has some potentially-relevant information.
Comment 3 Mark Rowe (bdash) 2008-07-22 14:37:57 PDT
<rdar://problem/6094248>
Comment 4 Eric Seidel (no email) 2008-08-07 13:07:37 PDT
Mark Rowe was updating me on the status yesterday in #webkit.

This is an approximate summary of what he said:

It seems to be a bug which we tickle in MSVC because of our usage of
templates in SVGAnimatedProperty.h.  Including SVGAnimatedProperty.h
increases the object file size by a MB (which is the bug), and since
SVGStyledElement.h includes it, anything which touches SVG in the
codebase ends up with at least a 1MB object file.  Boom.  Linker
fails.

The Applers are working on a fix yet.
Comment 5 Adam Roben (:aroben) 2008-08-08 08:16:20 PDT
Fixed in r35629
Comment 6 Adam Roben (:aroben) 2009-04-01 07:33:24 PDT
This has started happening again.
Comment 7 Ben Murdoch 2009-04-01 12:20:05 PDT
Created attachment 29173 [details]
Combines html element cpp files into one whic helps reduce the size of webcore.lib
Comment 8 Adam Roben (:aroben) 2009-04-01 12:27:59 PDT
Comment on attachment 29173 [details]
Combines html element cpp files into one whic helps reduce the size of webcore.lib

> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog	(revision 42150)
> +++ WebCore/ChangeLog	(working copy)
> @@ -1,3 +1,21 @@
> +2009-04-01  Ben Murdoch  <benm@google.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Combines all the HTML element cpp files into one to help reduce the size of WebCore.lib so we can build in release mode on 32bit Windows.
> +
> +        * WebCore.vcproj/WebCore.vcproj:
> +        * html/HTMLElements.cpp: Added.
> +
> +2009-04-01  Ben Murdoch  <benm@google.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Reduce the size of WebCore.lib so we can continue building release mode on 32 bit Windows.
> +
> +        * WebCore.vcproj/WebCore.vcproj:
> +        * html/HTMLElements.cpp: Added.
> +

You have two ChangeLog entries here. It would be good to mention this bug in your ChangeLog entry.

> @@ -12638,103 +12638,51 @@
>  				>
>  			</File>
>  			<File
> -				RelativePath="..\html\HTMLAnchorElement.cpp"
> -				>
> -				<FileConfiguration
> -					Name="Release_PGO|Win32"
> -					>
> -					<Tool
> -						Name="VCCLCompilerTool"
> -						WholeProgramOptimization="true"
> -					/>
> -				</FileConfiguration>
> -			</File>
> -			<File

I think rather than removing the .cpp files from the project entirely (as was unfortunately done for SVG), it would be better to use the "Excluded From Build" option (right-click on the file, go to Configuration Properties > General). That way the .cpp files will still be accessible from the Solution Explorer. Eventually we should put the SVG .cpp files back into the .vcproj using this method.

> Property changes on: WebCore/html/HTMLElements.cpp
> ___________________________________________________________________
> Added: svn:executable
>    + *

You should remove this property. We also normally set svn:eol-style to native for new files.

Maybe the new file should have "AllInOne" in its name? That would match JavaScriptCore's AllInOneFile.cpp and SVGAllInOne.cpp.

r- for now, but I don't think it will be much work to get this commitable!
Comment 9 Ben Murdoch 2009-04-01 14:22:04 PDT
Created attachment 29177 [details]
v2: Combines html element cpp files into one which helps reduce the size of webcore.lib
Comment 10 Adam Roben (:aroben) 2009-04-02 10:23:37 PDT
Comment on attachment 29177 [details]
v2: Combines html element cpp files into one which helps reduce the size of webcore.lib

r=me
Comment 11 Adam Roben (:aroben) 2009-04-02 10:30:27 PDT
Landed as r42175
Comment 12 Arunprasad 2012-10-16 07:06:56 PDT
I would like to know one additional info. Sorry in-case I'm wrong.

Actually this template bloat only increases the static library size or it will increase the runtime executable size as well?