-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install fails at node-gyp rebuild on Windows #33
Comments
Added undefine to remove _HAS_EXCEPTIONS from generated VS project files. See Issue 33 (creatale#33) and https://connect.microsoft.com/VisualStudio/feedback/details/811347/compiling-vc-12-0-with-has-exceptions-0-and-including-concrt-h-causes-a-compiler-error
Got CI with appveyor to run and could reproduce this error. |
A branch has been merged, is the issue fixed? |
I am trying to install on windows 10 x64 almost same error. |
Hi! I've had a quick look at your debug and I think you are getting further than I was, so you may have a different problem. The issue is that the 'Failed at node-gyp rebuild' is such a generic error that it could be almost anything. I actually wound up installing node-gyp (npm install -g node-gyp) then cloned the repository with git clone (somewhere outside of your node project) in order to run 'node gyp configure' then 'node gyp build' by hand; that then revealed the exact error (which, unless I am missing it, I can't see in your debug.txt) When it compiles you can then npm install (folder path) from your node project. If it helps any, I have a pre-fixed branch - feel free to clone that one instead. |
Hi, |
Very weird, but as long as it works! There is an error in the Zxing barcode reader that we’ve just discovered too by the way – it’s a memory leak and it crashes after parsing a number of images. We have a fix, I’ll open a new issue for it shortly. |
Thank you very much |
@Brigadier1-9 FWIW, your fork fixed by build issue as well. win 10 x64, node 6.2.1, npm 3.9.3 |
My issue is that 'npm install dv' fails on Windows 10 with VS2013.
The error displayed is:
npm ERR! [email protected] install:
node-gyp rebuildnpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. <snip>
If you watch the compiler output or check the logs you see:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h(4774): error C3861: '__uncaught_exception': identifier not found (..\..\..\deps\opencv\modules\core\src\parallel.cpp) [C:\Development\temp1\node_modules\dv\build\deps \opencv\libopencv.vcxproj]
I've had a dig and suspect the issue is actually coming from node-gyp; the pre-processor options in the vcxproj files generated by node-gyp include the '_HAS_EXCEPTIONS=0' flag (in pre-processor options) which, according to Microsoft, is an undocumented option that is evil and should not be used (OK, I'm oversimplifying here - see https://connect.microsoft.com/VisualStudio/feedback/details/811347/compiling-vc-12-0-with-has-exceptions-0-and-including-concrt-h-causes-a-compiler-error)
This option tells the compiler the code has no exception handling, and then causes issues with exception macros like '__uncaught_exception'
I can find no obvious option in the dv gyp files that would be responsible for putting that option in, and am almost at the limit of my node-gyp knowledge....
However, I have managed to fix this in dv by changing common.gyp to remove the _HAS_EXCEPTIONS=0 using a 'defines!' (undefine):
....['OS=="win"',
{ 'defines!' : [ '_HAS_EXCEPTIONS=0' ],
'configurations': {....
In theory, it may be better to define this only in the opencv.gyp, as that is the only module that causes this error, but I didn't for several reasons:
I don't have access to other build windows environment combinations (only one Windows dev PC here, the others are OSX or Linux) so I can't easily do proper testing on combinations of node-gyp/msvc/msbuild etc, so reluctant to issue a pull request - just throwing this out there to see if it helps others with the same problem.
After making the change to common.gyp, I can issue a 'node-gyp rebuild' and then an 'npm test' and they all pass.
My versions:
Node: 4.2.1
Node-gyp: 3.3.0 (I installed this with -g so I could manually run node-gyp configure and check the generated project files)
Visual Studio: 12.0.40629.00 Update 5
The text was updated successfully, but these errors were encountered: