neon: Linker error on Win10
Hello,
I don’t have a lot of experience with all things JS, nor am I particularly well versed in all things Windows, but we need the Windows build and although it did build at one point it now doesn’t do and I’ve been fighting with it for hours, so if there’s anything you can tell me about the following error I’d be really thankful for it.
Build environment is Win10 Education N Version 20H2 OS build 19042.572. Everything is correctly pathed from what I can see, I’m using the git bash that comes with git on Windows. That said, the error is the same on the Windows Powershell.
Environment
$ rustup show
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\flrn\.rustup
stable-x86_64-pc-windows-msvc (default)
rustc 1.47.0 (18bf6b4f0 2020-10-07)
$ node --version
v15.0.1
$ npm --version
7.0.3
$ yarn --version
1.22.10
$ python --version
Python 3.9.0
Error
$ yarn build_native
yarn run v1.22.10
$ electron-build-env neon build checkmate --release
neon info forcing rebuild for new build settings
neon info running cargo
Compiling autocfg v1.0.1
Compiling memchr v2.3.4
Compiling lazy_static v1.4.0
Compiling regex-syntax v0.6.21
Compiling cfg-if v0.1.10
Compiling cc v1.0.61
Compiling version_check v0.9.2
Compiling proc-macro2 v1.0.24
Compiling unicode-xid v0.2.1
Compiling cfg-if v1.0.0
Compiling syn v1.0.48
Compiling ryu v1.0.5
Compiling bitflags v1.2.1
Compiling libc v0.2.80
Compiling serde_derive v1.0.117
Compiling lexical-core v0.7.4
Compiling gimli v0.23.0
Compiling crc32fast v1.2.1
Compiling unicode-xid v0.0.4
Compiling adler v0.2.3
Compiling semver-parser v0.7.0
Compiling static_assertions v1.1.0
Compiling object v0.22.0
Compiling arrayvec v0.5.2
Compiling serde v1.0.117
Compiling quote v0.3.15
Compiling rustc-demangle v0.1.18
Compiling rle-decode-fast v1.0.1
Compiling cslice v0.2.0
Compiling adler32 v1.2.0
Compiling libflate_lz77 v1.0.0
Compiling thread_local v1.0.1
Compiling neon-build v0.4.0
Compiling neon-build v0.5.1
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling miniz_oxide v0.4.3
Compiling num-rational v0.2.4
Compiling num-iter v0.1.42
Compiling num-complex v0.2.4
Compiling error-chain v0.12.4
Compiling nom v5.1.2
Compiling synom v0.11.3
Compiling semver v0.9.0
Compiling addr2line v0.14.0
Compiling syn v0.11.11
Compiling aho-corasick v0.7.15
Compiling quote v1.0.7
Compiling libflate v1.0.3
Compiling libmate v0.1.0 (C:\Users\flrn\workbench\datalyzer\node_modules\checkmate\native)
Compiling regex v1.4.2
Compiling num-traits v0.1.43
Compiling backtrace v0.3.54
Compiling enum-primitive-derive v0.1.2
Compiling neon-sys v0.4.0
Compiling num v0.2.1
Compiling matfile v0.2.1
error: failed to run custom build command for `neon-sys v0.4.0`
Caused by:
process didn't exit successfully: `C:\Users\flrn\workbench\datalyzer\node_modules\checkmate\native\target\release\build\neon-sys-1096345010ae9bf1\build-script-build` (exit code: 1)
--- stdout
> preinstall
> echo 'Skipping node-gyp installation as part of npm install.'
'Skipping node-gyp installation as part of npm install.'
cargo:node_arch=x64
cargo:node_root_dir=C:\\Users\\flrn\\.electron-gyp\\10.1.4
cargo:node_lib_file=C:\\Users\\flrn\\.electron-gyp\\10.1.4\\<(target_arch)\\node.lib
> build-release
> node-gyp build
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
AR_x86_64-pc-windows-msvc = None
AR_x86_64_pc_windows_msvc = None
HOST_AR = None
AR = None
running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX64\\x64\\lib.exe" "-out:C:\\Users\\flrn\\workbench\\datalyzer\\node_modules\\checkmate\\native\\target\\release\\build\\neon-sys-2c4c217e95a9ae54\\out\\libneon.a" "-nologo" "C:\\Users\\flrn\\workbench\\datalyzer\\node_modules\\checkmate\\native\\target\\release\\build\\neon-sys-2c4c217e95a9ae54\\out\\native\\build\\Release\\obj\\neon\\neon.obj"
LINK : fatal error LNK1181: cannot open input file 'C:\Users\flrn\workbench\datalyzer\node_modules\checkmate\native\target\release\build\neon-sys-2c4c217e95a9ae54\out\native\build\Release\obj\neon\neon.obj'
exit code: 1181
--- stderr
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@15.0.1 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\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 ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:269:19)
gyp ERR! stack at onErrorNT (node:internal/child_process:465:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:80:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\flrn\\workbench\\datalyzer\\node_modules\\checkmate\\native\\target\\release\\build\\neon-sys-2c4c217e95a9ae54\\out\\native\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\flrn\workbench\datalyzer\node_modules\checkmate\native\target\release\build\neon-sys-2c4c217e95a9ae54\out\native
gyp ERR! node -v v15.0.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm ERR! code 7
npm ERR! path C:\Users\flrn\workbench\datalyzer\node_modules\checkmate\native\target\release\build\neon-sys-2c4c217e95a9ae54\out\native
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c "node-gyp build"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\flrn\AppData\Local\npm-cache\_logs\2020-11-03T23_44_10_722Z-debug.log
error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX64\\x64\\lib.exe" "-out:C:\\Users\\flrn\\workbench\\datalyzer\\node_modules\\checkmate\\native\\target\\release\\build\\neon-sys-2c4c217e95a9ae54\\out\\libneon.a" "-nologo" "C:\\Users\\flrn\\workbench\\datalyzer\\node_modules\\checkmate\\native\\target\\release\\build\\neon-sys-2c4c217e95a9ae54\\out\\native\\build\\Release\\obj\\neon\\neon.obj" with args "lib.exe" did not execute successfully (status code exit code: 1181).
warning: build failed, waiting for other jobs to finish...
error: build failed
neon ERR! cargo build failed
Error: cargo build failed
at Target.<anonymous> (C:\Users\flrn\workbench\datalyzer\node_modules\neon-cli\lib\target.js:98:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\flrn\workbench\datalyzer\node_modules\neon-cli\lib\target.js:24:58)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
electron-build-env error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
As I’ve said, any help is welcome. Thanks.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (10 by maintainers)
I get the same “missing neon.obj” error locally on Windows 10. It looks like the legacy runtime for Neon does not work with Node.js 15 right now.
I tried running CI on a branch with Node.js 15 to confirm: https://github.com/neon-bindings/neon/runs/1363852935?check_suite_focus=true that gives yet another different error: