google / ion

Ion
Apache License 2.0
1.43k stars 92 forks source link

cannot build on windows 7 (64 bits) #14

Open DomDumont opened 8 years ago

DomDumont commented 8 years ago

Hi,

When I launch the build.bat script. Gyp reports an error :

generate_ninja_environment.gyp not found

num3ric commented 8 years ago

I concur, quite a few people have the same error: https://news.ycombinator.com/item?id=11070281

cmaughan commented 8 years ago

Me too....

missmah commented 8 years ago

Was seriously hoping this would be fixed by now...

oon3m0oo commented 8 years ago

The missing file is in the latest push. Please comment back here if you still have issues.

DomDumont commented 8 years ago

Hi,

Got a new issue on windows : gyp: name 'ogles20' is not defined while evaluating condition 'angle or ogles20'

oon3m0oo commented 8 years ago

That's odd, ogles20 is defined in dev/common_variables.gypi. If you just comment out that block does it work for you? We haven't ever got around to migrating angle support to gyp anyway, and the contents of that block are commented out, so it's kind of useless.

cwillisf commented 8 years ago

I put this into /ion/common_variables.gypi and was able to get a little bit further:

  'variables': {
    'ogles20%': 0, # <----- Added this line

With that in place, the next error I get is:

FAILED: ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\ion\port\ionport.stacktrace.obj.rsp /c ..\..\..\ion\port\stacktrace.cc /Foobj\ion\port\ionport.stacktrace.obj /Fdobj\ion\port\ionport.cc.pdb 
[snip]\ion\ion\port\stacktrace.h(21): fatal error C1083: Cannot open include file: 'string': No such file or directory

I noticed that the environment.x86 and environment.x64 files all contain this entry:

INCLUDE=[snip]\ion\third_party\msvc/files/vc/include;[snip]\ion\third_party\windows_sdk_8_1/files/include/um;[snip]\ion\third_party\windows_sdk_8_1/files/include/shared;[snip]\ion\third_party\windows_sdk_8_1/files/include/winrt

I also saw these warnings in the output of build.bat:

ninja: warning: multiple rules generate [snip]/ion/gyp-out/windows-ninja/dbg_x86/environment.x86. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate [snip]/ion/gyp-out/windows-ninja/dbg_x86/environment.x64. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]

I tried using mklink to connect ion/third_party/msvc/files to my actual MSVC directory and was able to get further. I don't have the Windows 8.1 SDK handy at the moment but I will try mklink with that as well. Ideally the build process would find these files on its own, through things like %VCINSTALLDIR%.

Full build output: build-output.txt

cwillisf commented 8 years ago

Update with Windows 8.1 SDK: I still get errors related to headers that can't be found, but the headers in question are now corecrt.h, malloc.h, and ctype.h which are being included from within the VC and Windows SDK headers.

My links are now:

ion/third_party/msvc/files -> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0
ion/third_party/windows_sdk_8_1/files -> /cygdrive/c/Program Files (x86)/Windows Kits/8.1

In case it matters, I'm using Visual Studio 2015 on Windows 10.

Here's the new build output: build-output.txt

tweenk commented 8 years ago

Try this branch: https://github.com/tweenk/ion/tree/vsbuildfix