Bug 22347 - Chromium Scons build does not work on Windows
Summary: Chromium Scons build does not work on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-18 16:24 PST by Eric Seidel (no email)
Modified: 2008-11-26 17:40 PST (History)
0 users

See Also:


Attachments
first attempt at making the scons build work on Windows (3.24 KB, patch)
2008-11-18 17:35 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Fix the JSC/Chromium build for Windows (8.29 KB, patch)
2008-11-20 16:40 PST, Eric Seidel (no email)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-11-18 16:24:48 PST
I knew this when I wrote it.  I didn't have any idea how hard it would be to fix the build to work on Windows though. :(  Scons + CYGWIN + MSVC do not get along, at all.

I've got most of it building now.  I'll attach my first pass patch shortly.

It is *not possible* to build using a cygwin shell.  Sadly Scons requires Windows Python in order to handle MSVC.  This is superbly lame, but do to needing to grab at the registry to find out where MSVC is installed.  The scons folks know about the issue, and will likely fix it at some point, but for now, we have to install Windows Python, + the win32 python additions, (not to mention scons itself) in order to build.
Comment 1 Eric Seidel (no email) 2008-11-18 17:35:58 PST
Created attachment 25255 [details]
first attempt at making the scons build work on Windows

Not for review yet.  Still at least one error:

cl /Fowtf\ThreadingWin.obj /c wtf\ThreadingWin.cpp /nologo /TP /nologo /DBUILDING_CHROMIUM__ /I. /IC:\Projects\WebK
it /IForwardingHeaders /Iicu /Ipcre /Idebugger /Iwrec /Iwtf\unicode /Iparser /Ibytecompiler /Iprofiler /IAPI /Iwtf
/IDerivedSources\JavaScriptCore /IVM /Iruntime /Iwtf\win /Iwtf\unicode\icu /IC:\Projects\WebKit\WebKitLibraries\win
\include /IC:\Projects\WebKit\WebKitLibraries\win\include\pthreads
ThreadingWin.cpp
wtf\ThreadingWin.cpp(280) : error C2039: 'TryEnterCriticalSection' : is not a member of '`global namespace''
wtf\ThreadingWin.cpp(280) : error C3861: 'TryEnterCriticalSection': identifier not found
scons: *** [wtf\ThreadingWin.obj] Error 2
scons: building terminated because of errors.
Comment 2 Eric Seidel (no email) 2008-11-18 17:42:36 PST
I tried adding a WIN32_LEAN_AND_MEAN define before the windows.h include in ThreadingWin.cpp, but that didn't solve the problem.  I think I'll try defining LEAN_AND_MEAN globally (Since a google search seems to suggest that will help.)
Comment 3 Eric Seidel (no email) 2008-11-20 16:40:00 PST
Created attachment 25325 [details]
Fix the JSC/Chromium build for Windows
Comment 4 Darin Adler 2008-11-20 16:52:00 PST
Comment on attachment 25325 [details]
Fix the JSC/Chromium build for Windows

>      ASSERT(m_sourceElements);
> -    functionBodyNode->adoptData(auto_ptr<ScopeNodeData>(new ScopeNodeData(m_sourceElements.get(),
> +    functionBodyNode->adoptData(std::auto_ptr<ScopeNodeData>(new ScopeNodeData(m_sourceElements.get(),
>                                                                            m_varDeclarations ? &m_varDeclarations->data : 0, 
>                                                                            m_funcDeclarations ? &m_funcDeclarations->data : 0,
>                                                                            m_numConstants)));

What's this change about? It's not mentioned in the ChangeLog. The right fix would be to add a "using namespace std" or "using std::auto_ptr" to this source file, not add an explicit std:: qualification.

rs=me on the scons changes
Comment 5 Eric Seidel (no email) 2008-11-20 16:56:40 PST
(In reply to comment #4)
> What's this change about? It's not mentioned in the ChangeLog. The right fix
> would be to add a "using namespace std" or "using std::auto_ptr" to this source
> file, not add an explicit std:: qualification.

Yeah, sorry.  I'll fix it to be using std::auto_ptr.  Not sure why no other platform fails...

I'll also fix it to mention in the ChangeLog.

Thanks!
Comment 6 Eric Seidel (no email) 2008-11-26 17:40:06 PST
http://trac.webkit.org/changeset/38647