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

when manually building on windows, node-gyp generated .dll, but not .node #442

Open
thamizh-qwerty opened this issue Jan 26, 2024 · 19 comments

Comments

@thamizh-qwerty
Copy link

node: v20
node-gyp: v10
msvs_version: 2019

`run: node-gyp rebuild --msvs_version=2019

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.12.1 found at "C:\Users\12345\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.8.34511.84) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\12345\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\12345\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\12345\Documents\GitHub\new-iohook\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\12345\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\12345\AppData\Local\node-gyp\Cache\20.11.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\12345\AppData\Local\node-gyp\Cache\20.11.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\12345\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\12345\AppData\Local\node-gyp\Cache\20.11.0\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\12345\Documents\GitHub\new-iohook',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\12345\Documents\GitHub\new-iohook\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build\uiohook.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]

logger.c
input_helper.c
input_hook.c
post_event.c
system_properties.c
win_delay_load_hook.cc
Creating library C:\Users\12345\Documents\GitHub\new-iohook\build\Release\uiohook.lib and object C:\Users\12345\Do
cuments\GitHub\new-iohook\build\Release\uiohook.exp
Generating code
Previous IPDB not found, fall back to full compilation.
All 48 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
uiohook.vcxproj -> C:\Users\12345\Documents\GitHub\new-iohook\build\Release\uiohook.dll
gyp info ok`

@thamizh-qwerty
Copy link
Author

@lacymorrow help!

@lacymorrow
Copy link
Collaborator

lacymorrow commented Jan 26, 2024 via email

@thamizh-qwerty
Copy link
Author

thamizh-qwerty commented Jan 27, 2024

node: v20 and node-gyp: v10 generates builds on linux (Ubuntu OS v22, Windowing system: x11).

I tried with node v18 on windows 10 pro --msvs_version=2019, the same result. So is this something you can look into now or is this going to backlog?

@lacymorrow

@thamizh-qwerty
Copy link
Author

@WilixLead @lacymorrow you have any suggestions?

@lacymorrow
Copy link
Collaborator

I don't have the resources to debug these issues currently

@ToothpickFactory
Copy link

I'm running into this issue as well. I am using the following specs

Build makes it all the way to this file, generates the uiohook.dll but fails to create the iohook.node
Path to build file - build\iohook.vcxproj

The build\iohook.vcxproj is called by the build/uiohook.sln

These are the contents of that file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2015
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uiohook", "uiohook.vcxproj", "{98D3FACE-1290-359D-BF75-CBDF86F90F06}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Release|x64 = Release|x64
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{98D3FACE-1290-359D-BF75-CBDF86F90F06}.Debug|x64.ActiveCfg = Debug|x64
		{98D3FACE-1290-359D-BF75-CBDF86F90F06}.Debug|x64.Build.0 = Debug|x64
		{98D3FACE-1290-359D-BF75-CBDF86F90F06}.Release|x64.ActiveCfg = Release|x64
		{98D3FACE-1290-359D-BF75-CBDF86F90F06}.Release|x64.Build.0 = Release|x64
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

Poking around to see where in the code it determines to skip building the iohook.node file.

@ToothpickFactory
Copy link

Here is the verbose output of the build step from node-gyp


Project "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\uiohook.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\uiohook.sln" (1) is building "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\uiohook.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "Release\obj\uiohook\".
  Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
  Creating directory "Release\obj\uiohook\uiohook.tlog\".
InitializeBuildStatus:
  Creating "Release\obj\uiohook\uiohook.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
  Touching "Release\obj\uiohook\uiohook.tlog\unsuccessfulbuild".
MakeDirsForCl:
  Creating directory "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\obj\uiohook\libuiohook\src".
  Creating directory "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\obj\uiohook\libuiohook\src\windows".
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\libuiohook\src\logger.obj" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 ..\libuiohook\src\logger.c
  logger.c
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\libuiohook\src\windows\input_helper.obj" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 ..\libuiohook\src\windows\input_helper.c
  input_helper.c
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\libuiohook\src\windows\input_hook.obj" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 ..\libuiohook\src\windows\input_hook.c
  input_hook.c
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\libuiohook\src\windows\post_event.obj" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 ..\libuiohook\src\windows\post_event.c
  post_event.c
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\libuiohook\src\windows\system_properties.obj" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 ..\libuiohook\src\windows\system_properties.c
  system_properties.c
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe /c /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\include\node" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\src" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\config" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\openssl\openssl\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\uv\include" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\zlib" /I"C:\Users\my_user\AppData\Local\node-gyp\Cache\21.6.2\deps\v8\include" /I..\node_modules\nan /I..\libuiohook\include /I..\libuiohook\src /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=uiohook /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\uiohook\\" /Fd"Release\obj\uiohook\vc143.pdb" /external:W3 /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++17 "C:\Users\my_user\Desktop\dev\iohook-test\iohook\node_modules\node-gyp\src\win_delay_load_hook.cc"
  win_delay_load_hook.cc
Link:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\uiohook.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib DelayImp.lib "C:\\Users\\my_user\\AppData\\Local\\node-gyp\\Cache\\21.6.2\\x64\\node.lib" Delayimp.lib /DELAYLOAD:node.exe /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\uiohook.pdb" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\uiohook.lib" /MACHINE:X64 /LTCG:INCREMENTAL /ignore:4199 /DLL Release\obj\uiohook\win_delay_load_hook.obj
  Release\obj\uiohook\\libuiohook\src\logger.obj
  Release\obj\uiohook\\libuiohook\src\windows\input_helper.obj
  Release\obj\uiohook\\libuiohook\src\windows\input_hook.obj
  Release\obj\uiohook\\libuiohook\src\windows\post_event.obj
  Release\obj\uiohook\\libuiohook\src\windows\system_properties.obj
     Creating library C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\uiohook.lib and object C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\uiohook.exp
  Generating code
  Previous IPDB not found, fall back to full compilation.
  All 48 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
  Finished generating code
  uiohook.vcxproj -> C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\Release\\uiohook.dll
FinalizeBuildStatus:
  Deleting file "Release\obj\uiohook\uiohook.tlog\unsuccessfulbuild".
  Touching "Release\obj\uiohook\uiohook.tlog\uiohook.lastbuildstate".
Done Building Project "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\uiohook.vcxproj" (default targets).
Done Building Project "C:\Users\my_user\Desktop\dev\iohook-test\iohook\build\uiohook.sln" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

@thamizh-qwerty
Copy link
Author

@ToothpickFactory, do you have any other ideas to fix this issue? We can try to work on this.
Also, what are the other node versions you had tried?

@thamizh-qwerty
Copy link
Author

I don't have the resources to debug these issues currently

@lacymorrow Is it possible for you to loop in someone from this community to check whether it's due to node-gyp configuration? If not, do you have anything I can try? I can try it myself and post an update here.

@lacymorrow
Copy link
Collaborator

I would check here, it looks like someone was able to get builds working for node 17-18
#363

@lacymorrow
Copy link
Collaborator

Also here: #387

@Rydez
Copy link

Rydez commented Apr 3, 2024

Were any solutions found here? Have spent many hours trying to figure it out, but can't determine why the .node file isn't created.

@thamizh-qwerty
Copy link
Author

no, @Rydez
I think we need to change the .gyp configurations, but cannot figure what change we need to do.

@tduangbo
Copy link

Hi, I am currently at the same place that only .dll is generated, but .node. Any solutions on this, please and thanks!

elease\uiohook.exp
Generating code
Previous IPDB not found, fall back to full compilation.
All 48 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
uiohook.vcxproj -> C:\Users\thongphanhduangboudd\Documents\Electron\native\native\iohook\build\Release\uiohook.dll
FinalizeBuildStatus:
Deleting file "Release\obj\uiohook\uiohook.tlog\unsuccessfulbuild".
Touching "Release\obj\uiohook\uiohook.tlog\uiohook.lastbuildstate".
Done Building Project "C:\Users\thongphanhduangboudd\Documents\Electron\native\native\iohook\build\uiohook.vcxproj" (default targets).

Done Building Project "C:\Users\thongphanhduangboudd\Documents\Electron\native\native\iohook\build\uiohook.sln" (default targets).

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:04.72
gyp info ok

@thamizh-qwerty
Copy link
Author

@tduangbo no solution till now

@tduangbo
Copy link

tduangbo commented Apr 30, 2024

@thamizh-qwerty

Hey, got it to compile for Electron 28, and some of those PR for Electron 18-19 (DO NOT USE NODE-GYP 10) use 9.4 and 2019 build tools

here is the build:
Key: node-gyp10.1.0 will not generate .node

PS C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook> node build.js --upload=false --runtime electron --version 28.2.0 --abi 119 --verbose
Building iohook for alternative electron v28.2.0>>>>
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.11.4 found at "C:\Users\thongphanhduangboudd\AppData\Local\Programs\Python\Python311-arm64\python.exe"
gyp info find VS using VS2019 (16.11.34729.46) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\thongphanhduangboudd\AppData\Local\Programs\Python\Python311-arm64\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-I', gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\thongphanhduangboudd\AppData\Local\node-gyp\Cache\28.2.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\thongphanhduangboudd\AppData\Local\node-gyp\Cache\28.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\thongphanhduangboudd\\AppData\\Local\\node-gyp\\Cache\\28.2.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info find Python using Python version 3.11.4 found at "C:\Users\thongphanhduangboudd\AppData\Local\Programs\Python\Python311-arm64\python.exe"
gyp info find VS using VS2019 (16.11.34729.46) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\thongphanhduangboudd\AppData\Local\Programs\Python\Python311-arm64\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\thongphanhduangboudd\AppData\Local\node-gyp\Cache\28.2.0\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\thongphanhduangboudd\AppData\Local\node-gyp\Cache\28.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\thongphanhduangboudd\\AppData\\Local\\node-gyp\\Cache\\28.2.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
logger.c
dispatch_event.c
input_helper.c
input_hook.c
post_event.c
system_properties.c
monitor_helper.c
win_delay_load_hook.cc
Creating library C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\uiohook.lib and object C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\uiohook.exp
Generating code
Previous IPDB not found, fall back to full compilation.
All 50 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
uiohook.vcxproj -> C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\uiohook.dll
iohook.cc
C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\node_modules\nan\nan.h(688,37): warning C4996: 'v8::Isolate::IdleNotificationDeadline': Use MemoryPressureNotification() to influence the GC schedule. [C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\iohook.vcxproj]
C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\src\iohook.cc(487,13): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\iohook.vcxproj]
win_delay_load_hook.cc
Creating library C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\iohook.lib and object C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\iohook.exp
Generating code
Previous IPDB not found, fall back to full compilation.
All 412 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Finished generating code
iohook.vcxproj -> C:\Users\thongphanhduangboudd\Documents\Electron\native\native\alternative\iohook\build\Release\iohook.node
gyp info ok

I used this fork:
https://www.npmjs.com/package/@mhgbrown/iohook

https://github.com/mhgbrown/iohook

@thamizh-qwerty
Copy link
Author

Hey, got it to compile for Electron 28, and some of those PR for Electron 18-19 (DO NOT USE NODE-GYP 10) use 9.4 and 2019 build tools

here is the build: Key: node-gyp10.1.0 will not generate .node

@tduangbo Awesome work! I will check this and get back to you in couple of days.

@tduangbo
Copy link

tduangbo commented May 3, 2024

Hey, got it to compile for Electron 28, and some of those PR for Electron 18-19 (DO NOT USE NODE-GYP 10) use 9.4 and 2019 build tools
here is the build: Key: node-gyp10.1.0 will not generate .node

@tduangbo Awesome work! I will check this and get back to you in couple of days.

line 174(in build.js): I changed from 2017 to 2019
process.env.msvs_version = argv.msvs_version || 2019;

@thamizh-qwerty
Copy link
Author

@tduangbo thanks for the note. I will ping you if i need any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants