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

Cannot open input file node.lib #65

Closed
bryiac opened this issue Jun 6, 2022 · 4 comments
Closed

Cannot open input file node.lib #65

bryiac opened this issue Jun 6, 2022 · 4 comments

Comments

@bryiac
Copy link

bryiac commented Jun 6, 2022

Getting this error only on windows builds? LINK : fatal error LNK1181: cannot open input file 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\prebuildify\\node\\18.0.0\\x86\\node.lib' [D:\a\libuiohook\libuiohook\build\kryuk.vcxproj]

log

@vweevers
Copy link
Member

vweevers commented Jun 6, 2022

Node.js 18.0.0 did not support 32-bit Windows (nodejs/node#42666). Was restored in 18.3.0 (nodejs/node#42740).

@bryiac
Copy link
Author

bryiac commented Jun 6, 2022

ahh thanks so much I would have never known that was setting up a ci 😁

@bryiac bryiac closed this as completed Jun 6, 2022
@bryiac
Copy link
Author

bryiac commented Jun 6, 2022

Hey sorry for opening this back up again but im still having issues related to the node.lib using version 18.3.0

@vweevers

$ prebuildify --napi --target=18.3.0 --arch=x8[6](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:7)
D:\a\libuiohook\libuiohook>if not defined npm_config_node_gyp (node "C:\hostedtoolcache\windows\node\18.3.0\x64\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --target=18.3.0 --devdir=C:\Users\RUNNER~1\AppData\Local\Temp\prebuildify\node --arch=x86 --release )  else (node "" rebuild --target=18.3.0 --devdir=C:\Users\RUNNER~1\AppData\Local\Temp\prebuildify\node --arch=x86 --release ) 
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.9.13 found at "C:\hostedtoolcache\windows\Python\3.9.13\x64\python3.exe"
gyp http GET https://nodejs.org/download/release/v18.3.0/node-v18.3.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v18.3.0/node-v18.3.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v18.3.0/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v18.3.0/win-x86/node.lib
gyp http GET https://nodejs.org/download/release/v18.3.0/win-x64/node.lib
gyp http GET https://nodejs.org/download/release/v18.3.0/win-arm64/node.lib
gyp http 200 https://nodejs.org/download/release/v18.3.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v18.3.0/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v18.3.0/win-x64/node.lib
gyp http 404 https://nodejs.org/download/release/v18.3.0/win-arm64/node.lib
gyp info find VS using VS2022 (1[7](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:8).2.32519.379) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\hostedtoolcache\windows\Python\3.9.13\x64\python3.exe
gyp info spawn args [
gyp info spawn args   'C:\\hostedtoolcache\\windows\\node\\1[8](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:9).3.0\\x64\\node_modules\\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   'D:\\a\\libuiohook\\libuiohook\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\hostedtoolcache\\windows\\node\\18.3.0\\x64\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\prebuildify\\node\\18.3.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\\RUNNER~1\\AppData\\Local\\Temp\\prebuildify\\node\\18.3.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\hostedtoolcache\\windows\\node\\18.3.0\\x64\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\RUNNER~1\\\\AppData\\\\Local\\\\Temp\\\\prebuildify\\\\node\\\\18.3.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\a\\libuiohook\\libuiohook',
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   'D:\\a\\libuiohook\\libuiohook\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Enterprise\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=Win32'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  nothing.c
  win_delay_load_hook.cc
  nothing.vcxproj -> D:\a\libuiohook\libuiohook\build\Release\\nothing.lib
  Copying libuiohook/win/x86/bin/uiohook.dll to ..\build\Release
          1 file(s) copied.
  index.cc
  win_delay_load_hook.cc
LINK : fatal error LNK1181: cannot open input file 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\prebuildify\\node\\18.3.0\\x86\\node.lib' [D:\a\libuiohook\libuiohook\build\kryuk.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\hostedtoolcache\windows\node\18.3.0\x64\node_modules\npm\node_modules\node-gyp\lib\build.js:1[9](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:10)4:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT [10](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:11).0.20348
gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\[18](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:19).3.0\\x[64](https://github.com/coloredwax/libuiohook/runs/6764740183?check_suite_focus=true#step:5:65)\\node.exe" "C:\\hostedtoolcache\\windows\\node\\18.3.0\\x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=18.3.0" "--devdir=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\prebuildify\\node" "--arch=x86" "--release"
gyp ERR! cwd D:\a\libuiohook\libuiohook
gyp ERR! node -v v18.3.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok 
node-gyp exited with 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@vweevers
Copy link
Member

vweevers commented Jun 7, 2022

Try --arch ia32 instead, to match what process.arch would return on 32-bit node. Alternatively don't specify --arch at all, instead change your CI to use a 32-bit node process. E.g.:

- name: Set up node
  uses: actions/setup-node@v3
  with:
    node-version: 18
    architecture: x86

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

2 participants