Skip to content

Instantly share code, notes, and snippets.

@jonforums
Created September 20, 2012 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonforums/3756271 to your computer and use it in GitHub Desktop.
Save jonforums/3756271 to your computer and use it in GitHub Desktop.
Building ninja on Win7 32bit
# mingw based toolchain
C:\Users\Jon\Documents\CDev\ninja-git>gcc --version
gcc (tdm-1) 4.7.1
# mingw-w64 based toolchain
C:\Users\Jon\Documents\CDev\ninja-git>gcc --version
gcc (GCC) 4.6.2
C:\Users\Jon\Documents\CDev\ninja-git>python configure.py --with-gtest=c:\Users\Jon\Documents\CDev\gtest --platform=mingw
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
C:\Users\Jon\Documents\CDev\ninja-git>ninja ninja_test
[19/39] CXX build\msvc_helper_main-win32.o
src\msvc_helper_main-win32.cc: In function 'int MSVCHelperMain(int, char**)':
src\msvc_helper_main-win32.cc:55:15: warning: variable 'relative_to' set but not used [-Wunused-but-set-variable]
[26/39] AR build\libninja.a
1 file(s) moved.
[39/39] LINK ninja_test.exe
C:\Users\Jon\Documents\CDev\ninja-git>ninja_test
Running main() from gtest_main.cc
[==========] Running 156 tests from 20 test cases.
[----------] Global test environment set-up.
...
[----------] 6 tests from DiskInterfaceTest
[ RUN ] DiskInterfaceTest.StatMissingFile
[ OK ] DiskInterfaceTest.StatMissingFile (10 ms)
[ RUN ] DiskInterfaceTest.StatBadPath
ninja: error: GetFileAttributesEx(cc:\foo): The filename, directory name, or volume label syntax is incorrect.
...
[----------] Global test environment tear-down
[==========] 156 tests from 20 test cases ran. (862 ms total)
[ PASSED ] 156 tests.
C:\Users\Jon\Documents\CDev\ninja-git>cl -h
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
C:\Users\Jon\Documents\CDev\ninja-git>set VCINSTALLDIR="c:\Program Files\Microsoft Visual Studio 10.0\VC"
C:\Users\Jon\Documents\CDev\ninja-git>python configure.py --with-gtest=C:\Users\Jon\Documents\CDev\gtest
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
wrote build.ninja.
C:\Users\Jon\Documents\CDev\ninja-git>ninja ninja_test
[40/40] LINK ninja_test.exe
Generating code
Finished generating code
C:\Users\Jon\Documents\CDev\ninja-git>ninja_test
...
[----------] 6 tests from DiskInterfaceTest
[ RUN ] DiskInterfaceTest.StatMissingFile
[ OK ] DiskInterfaceTest.StatMissingFile (10 ms)
[ RUN ] DiskInterfaceTest.StatBadPath
ninja: error: GetFileAttributesEx(cc:\foo): The filename, directory name, or volume label syntax is incorrect.
...
[----------] Global test environment tear-down
[==========] 156 tests from 20 test cases ran. (2419 ms total)
[ PASSED ] 156 tests.
I get the following errors intermittently:
...
[ FAILED ] 1 test, listed below:
[ FAILED ] BuildLogTest.Truncate
1 FAILED TEST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment