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

node-gyp problem building with vs2015 w/ update3 #7286

Closed
tasoss opened this Issue Jun 13, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@tasoss

tasoss commented Jun 13, 2016

Hello.I'm using vs2015 update3.
When i try to install libxmljs(which uses node-gyp) i get following error:

C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [D:\node\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]

I have checked delayimp.h and i see

// Prior to Visual Studio 2015 Update 3, these hooks were non-const.  They were
// made const to improve security (global, writable function pointers are bad).
// If for backwards compatibility you require the hooks to be writable, define
// the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this header and
// provide your own non-const definition of the hooks.
ExternC
#ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS
const
#endif
PfnDliHook   __pfnDliNotifyHook2;

Maybe the compilation error has to do with update 3?
Any ideas?
Thanks!

EDIT(@eljefedelrodeodeljefe): decent markdown code blocks

@eljefedelrodeodeljefe

This comment has been minimized.

Show comment
Hide comment
@eljefedelrodeodeljefe

eljefedelrodeodeljefe Jun 13, 2016

Contributor

@tasoss have you tried to contact both node-gyp and libxmls maintainers? Can you reproduce your wanted behaviour with an older version of Visual Studio?

In any case I think a ticket for the above repos is more likely to succeed, since likely only there can be the fix.

Contributor

eljefedelrodeodeljefe commented Jun 13, 2016

@tasoss have you tried to contact both node-gyp and libxmls maintainers? Can you reproduce your wanted behaviour with an older version of Visual Studio?

In any case I think a ticket for the above repos is more likely to succeed, since likely only there can be the fix.

@orangemocha

This comment has been minimized.

Show comment
Hide comment
@orangemocha

orangemocha Jun 13, 2016

Member

This was already reported and fixed in node-gyp. However, we still need to propagate the change to npm and node.

Member

orangemocha commented Jun 13, 2016

This was already reported and fixed in node-gyp. However, we still need to propagate the change to npm and node.

@eljefedelrodeodeljefe

This comment has been minimized.

Show comment
Hide comment
@eljefedelrodeodeljefe

eljefedelrodeodeljefe Jun 13, 2016

Contributor

Then closing this in favor for nodejs/node-gyp#949

Contributor

eljefedelrodeodeljefe commented Jun 13, 2016

Then closing this in favor for nodejs/node-gyp#949

@tasoss

This comment has been minimized.

Show comment
Hide comment
@tasoss

tasoss Jun 13, 2016

thank you both!

tasoss commented Jun 13, 2016

thank you both!

@beatgrabe

This comment has been minimized.

Show comment
Hide comment
@beatgrabe

beatgrabe Jul 1, 2016

I opened a SO Question with a workaround

beatgrabe commented Jul 1, 2016

I opened a SO Question with a workaround

tvrprasad added a commit to tvrprasad/tedious that referenced this issue Feb 1, 2017

Fix installation failures for versions 0.10.48, 0.12.18 and 5.12.0.
npm install for these versions is failing due to a bug that causes
installation of native modules to fail with the error:
C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34):
error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers
[C:\projects\tedious\node_modules\sspi-client\build\sspi-client.vcxproj]

This seems to be a known issue with certain npm/node-gyp versions:
nodejs/node-gyp#972
nodejs/node#7286

Fixing this by installing the latest version of npm before running the
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment