question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

5.3.0 breaks prebuild tests

See original GitHub issue

Over at prebuild I noticed AppVeyor builds starting failing on integration tests with cmake-js. I then tested it locally and found that cmake-js@5.2.0 is the last known working version. Apologies I can’t get more specific than that. Though I help to maintain prebuild I’m not familiar with its cmake-js integration or cmake-js itself.

To reproduce (with Visual Studio 2015, which is AppVeyor’s default), run:

git clone git@github.com:prebuild/prebuild.git && cd prebuild
npm i && npm t

Relevant log:

Click to expand
prebuild info begin Prebuild version 9.0.0
prebuild info build Preparing to prebuild native@1.0.0 for node 8.11.1 on win32-x64 using cmake-js
ERR! OMG Command failed: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationVersion
ERR! OMG The system cannot find the path specified.
ERR! OMG 
ERR! OMG The system cannot find the path specified.
ERR! OMG 
ERR! OMG Command failed: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationVersion
ERR! OMG The system cannot find the path specified.
ERR! OMG 
ERR! OMG The system cannot find the path specified.
ERR! OMG 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vweeverscommented, Aug 10, 2019

If understand it correctly: in 5.2.0 and below, the process arch of node unintentionally triggered the right toolset to be selected? IMO that’s actually desirable.

It’s how various prebuild* tools work as well. In CI it makes it easy to prebuild binaries for different architectures (with a single package.json). It’s also a good practice for local usage; matching up the bitness of a native module to the bitness of node just avoids a whole lot of issues.

0reactions
vweeverscommented, Aug 21, 2019

Still failing:

Click to expand
info TOOL Using Visual Studio 14 2015 ARM generator.
info CMD CLEAN
info RUN cmake -E remove_directory "D:\Projecten\GitHub\prebuild\prebuild\test\native-module-cmake\build"
info CMD CONFIGURE
info RUN cmake "D:\Projecten\GitHub\prebuild\prebuild\test\native-module-cmake" --no-warn-unused-cli -G"Visual Studio 14 2015 ARM" -DCMAKE_JS_VERSION="5.3.2" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="D:\Projecten\GitHub\prebuild\prebuild\test\native-module-cmake\build" -DCMAKE_JS_INC="C:\Users\vweevers\.cmake-js\node-ia32\v8.11.1\include\node" -DCMAKE_JS_SRC="D:/Projecten/GitHub/prebuild/prebuild/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="8.11.1" -DNODE_ARCH="ia32" -DCMAKE_JS_LIB="C:\Users\vweevers\.cmake-js\node-ia32\v8.11.1\win-x86\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE /SAFESEH:NO"
info CMD BUILD
info RUN cmake --build "D:\Projecten\GitHub\prebuild\prebuild\test\native-module-cmake\build" --config Release
ERR! OMG Process terminated: 1

Might be a separate issue. cmake-js doesn’t show the error (only an exit code of 1) but running its last step manually reveals:

Click to expand
$ cmake --build "D:\Projecten\GitHub\prebuild\prebuild\test\native-module-cmake\build" --config Release
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

node.lib(node.exe) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'ARM' [D:\Projecten\Gi tHub\prebuild\prebuild\test\native-module-cmake\build\native.vcxproj]

Do you want to continue discussion over at #188?

Read more comments on GitHub >

github_iconTop Results From Across the Web

5.3.1 breaks MSVC electron builds · Issue #188 · cmake-js ...
Build of native node modules for electron with cmake-js version 5.2.0 worked both on linux/gcc and windows/msvc, but breaks at least since ...
Read more >
70001 – [5 Regression] Infinity compilation time
Created attachment 37814 [details] (Sample code to produce bug). I've found the program which compilation time is infinity (at least > 30 ...
Read more >
Gatsby Changelog | 5.3.0
This broken functionality is now fixed with PR #34433 and changed images will now directly show during gatsby develop and gatsby build ....
Read more >
ember-exam | Yarn - Package Manager
Ember Exam is an addon to allow you more control over how you run your tests when used in conjunction with Ember QUnit...
Read more >
React application build error from AWS Amplify
version: 1 frontend: phases: preBuild: commands: - npm install build: ... "build": "react-scripts build", "test": "react-scripts test ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found