-
Notifications
You must be signed in to change notification settings - Fork 1.3k
AVX extensions required for bindings on win32-x64 #1854
Comments
@am11 are you able to translate this for the non-windows folk? |
@algol-fi, some questions:
|
I determined where the fault is happening by running
under windbg. The content of mystyle.sass is probably not very relevant, but I can try to reproduce the effect with a minimal example. The stack trace is the following:
The referenced pow.asm is using AVX, since the current executing instruction is
and c5 is the 2-byte VEX prefix used for AVX instructions. |
Thanks for the details and stack trace @algol-fi, it does look like the case. The exception site ( Can you please try rebuilding the source locally, to see if this issue is still reproducible (i.e. confirming our compiler/linker flags are all set correctly and that we only need a build machine for non-SSE128 binaries). Instructions to build are available here: https://github.com/sass/node-sass#rebuilding-binaries (you will need VC build tools or VS2013+). |
I rebuilt the source locally, replaced the binding.node in the package with the built one and everything seems to be working fine. No illegal instruction and a correct CSS file in output. |
Thanks for the confirmation @algol-fi! @xzyfer, this was a bug in VS2013, that was fixed in VS2015 https://connect.microsoft.com/VisualStudio/Feedback/Details/981479 (see last comment from Microsoft team) Solution: // in LibSass -> util.cpp, after #include<cmath> statement:
#if defined(_MSC_VER) && _MSC_VER >= 1800 && _MSC_VER < 1900 && defined(_M_X64) || defined(__x86_64__)
// FIXME: Remove this workaround when we switch to VS2015+.
_set_FMA3_enable(0);
#endif FTR, the AVX instructions were also causing issues in node.js (when it is turned off in Boot Configuration Data by the user/admin: |
@am11 thank you for your analysis. I believe the stacktrace is correct and identifies the problem. We should switch to VS2015 for all nodes starting from I believe v6.2.0 - this is when node itself switched to VS2015. The next workaround I would try is to use msvcr120.dll from vs2015, if that works at all. |
Node change to Visual Studio 2015 when Node 6 went to LTS. See nodejs/node#7989 Fixes sass#1854
Node change to Visual Studio 2015 when Node 6 went to LTS. See nodejs/node#7989 Fixes sass#1854
Node change to Visual Studio 2015 when Node 6 went to LTS. See nodejs/node#7989 Fixes sass#1854
@am11 can you create a PR for libsass to include the hotfix? I guess it doesn't hurt to include it if it fixes a possible bug. I guess there are no real side effects from this change? Thanks! |
Installing node-sass via npm install on Windows Server 2012:
npm install node-sass
downloads a native bindings library for win32-x64. This library, when node-sass is run on a box that does not have AVX enabled, exits with a STATUS_ILLEGAL_INSTRUCTION (0xC000001D). Is it possible to have a different version (compiled without AVX instructions) of the bindings installed if the platform does not support them?
System information:
The text was updated successfully, but these errors were encountered: