Skip to content
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
Closed

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

tasoss opened this issue Jun 13, 2016 · 5 comments
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.

Comments

@tasoss
Copy link

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

@saghul saghul added windows Issues and PRs related to the Windows platform. build Issues and PRs related to build files or the CI. labels Jun 13, 2016
@eljefedelrodeodeljefe
Copy link
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
Copy link
Contributor

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

@eljefedelrodeodeljefe
Copy link
Contributor

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

@tasoss
Copy link
Author

tasoss commented Jun 13, 2016

thank you both!

@beatgrabe
Copy link

I opened a SO Question with a workaround

tvrprasad added a commit to tvrprasad/tedious that referenced this issue Feb 1, 2017
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
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

5 participants