Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Windows: fatal error C1083: Cannot open include file: 'expat.h' #16

Closed
tracker1 opened this Issue Sep 25, 2012 · 6 comments

Comments

Projects
None yet
2 participants

The output details are below... suggestion for windows, since binary compatibility is pretty much ensured... Have the install/post-install script simply download a prebuilt binary of ltx (x86, or x64, not sure if WinRT (arm) is supported with Node.js).

C:\Users\michaelr>npm -g install ltx
npm http GET https://registry.npmjs.org/ltx
npm http 304 https://registry.npmjs.org/ltx
npm http GET https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/sax

> node-expat@1.6.1 install C:\Users\michaelr\AppData\Roaming\npm\node_modules\ltx\node_modules\node-expat
> node-gyp rebuild


C:\Users\michaelr\AppData\Roaming\npm\node_modules\ltx\node_modules\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  node-expat.cc
..\node-expat.cc(6): fatal error C1083: Cannot open include file: 'expat.h': No such file or directory [C:\Users\michaelr\AppData\Roaming\npm\node_modules\ltx\node_modules\node-expat\build\node_expa
.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:219:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\michaelr\AppData\Roaming\npm\node_modules\ltx\node_modules\node-expat
gyp ERR! node -v v0.8.9
gyp ERR! node-gyp -v v0.6.8
gyp ERR! not ok
npm ERR! node-expat@1.6.1 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the node-expat@1.6.1 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "ltx"
npm ERR! cwd C:\Users\michaelr
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\michaelr\npm-debug.log
npm ERR! not ok code 0
Owner

astro commented Oct 4, 2012

Would you try astro/node-expat#48 for me?

tracker1 commented Oct 5, 2012

@astro if you'd explain how, will do it.. doesn't look like it's merged yet... getting the same error with 'npm install node-expat' currently.

Owner

astro commented Oct 9, 2012

Released node-expat 2.0.0, please retry.

Looks like it's working now...

C:\Users\michaelr>npm -g install node-expat
npm http GET https://registry.npmjs.org/node-expat
npm http 200 https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/node-expat/-/node-expat-2.0.0.tgz
npm http 200 https://registry.npmjs.org/node-expat/-/node-expat-2.0.0.tgz
> node-expat@2.0.0 install C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat
> node-gyp rebuild
C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  xmltok.c
  xmlrole.c
  xmlparse.c
..\..\..\deps\libexpat\lib\xmlparse.c(1844): warning C4244: 'return' : conversion from '__int64' to 'XML_Index', possible loss of data [C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
  expat.vcxproj -> C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\Release\lib\libexpat.node
  node-expat.cc
..\node-expat.cc(165): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\node_expat.vcxproj]
..\node-expat.cc(409): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) [C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\node_expat.vcxproj]
..\node-expat.cc(422): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) [C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\node_expat.vcxproj]
     Creating library C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\Release\node_expat.lib and object C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\Release\node_expat.exp
  Generating code
  Finished generating code
  node_expat.vcxproj -> C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat\build\Release\\node_expat.node
node-expat@2.0.0 C:\Users\michaelr\AppData\Roaming\npm\node_modules\node-expat
C:\>

The build issue is fixed, though I still feel that having prebuilt windows binaries download as part of the install would be best.

@tracker1 tracker1 closed this Oct 23, 2012

Owner

astro commented Oct 25, 2012

I don't have a machine to build them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment