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

Appveyor x86 fails #15

Closed
aminya opened this issue Sep 2, 2020 · 6 comments
Closed

Appveyor x86 fails #15

aminya opened this issue Sep 2, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@aminya
Copy link
Member

aminya commented Sep 2, 2020

For some reason, Appveyor x86 fails to build the native modules

https://ci.appveyor.com/project/aminya/fuzzaldrin-plus-fast-se2je

> node-gyp-build
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 -> C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\Release\\nothing.lib
  SourceMap.cpp
  MappingContainer.cpp
  MappingLine.cpp
  Mapping.cpp
  win_delay_load_hook.cc
     Creating library C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\Release\sourcemap.lib and object C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\Release\sourcemap.exp
SourceMap.obj : error LNK2001: unresolved external symbol "struct std::atomic<bool> Napi::details::needs_objectwrap_destructor_fix" (?needs_objectwrap_destructor_fix@details@Napi@@3U?$atomic@_N@std@@A) [C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\sourcemap.vcxproj]
C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\Release\sourcemap.node : fatal error LNK1120: 1 unresolved externals [C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map\build\sourcemap.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\projects\\fuzzaldrin-plus-fast-se2je\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\projects\fuzzaldrin-plus-fast-se2je\node_modules\@parcel\source-map
gyp ERR! node -v v14.6.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @parcel/source-map@2.0.0-alpha.4.13 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @parcel/source-map@2.0.0-alpha.4.13 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\appveyor\AppData\Roaming\npm-cache\_logs\2020-09-02T05_31_48_721Z-debug.log
Command exited with code 1
@rajendrant
Copy link
Collaborator

The x86 build passes in my fork
https://ci.appveyor.com/project/rajendrant/fuzzaldrin-plus-fast

Could you try again.

@aminya
Copy link
Member Author

aminya commented Sep 2, 2020

Your solution seems strange. You're using an x64 node on an x86 platform

@rajendrant
Copy link
Collaborator

Right. Its not the right solution.
I should revert this change, and try other approaches.

@aminya
Copy link
Member Author

aminya commented Oct 20, 2020

I updated the Appveyor job to add Node 12 and 10, and also fix the scripts since it was using the wrong scripts.

Both x64 and x86 fail now on Node 12 and 10.

npm : gyp: name 'v8_enable_pointer_compression' is not defined while evaluating condition 'v8_enable_pointer_compression == 1' in binding.gyp while trying to load binding.gyp
At line:1 char:32
+ If ($env:platform -eq "x64") { npm run native:prebuild }
+                                ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (gyp: name 'v8_e...oad binding.gyp:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
gyp
 ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\projects\fuzzaldrin-plus-fast-26mib\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\projects\\fuzzaldrin-plus-fast-26mib\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=14.0.0" 
"--devdir=C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\prebuildify\\node" "--target_arch=x64" "--release"
gyp ERR! cwd C:\projects\fuzzaldrin-plus-fast-26mib
gyp ERR! node -v v10.22.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok 
node-gyp exited with 1
npm
 ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] native:prebuild: `prebuildify --napi --electron-compat --strip`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] native:prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\appveyor\AppData\Roaming\npm-cache\_logs\2020-10-20T01_18_39_283Z-debug.log
Command executed with exception: npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\appveyor\AppData\Roaming\npm-cache\_logs\2020-10-20T01_18_39_283Z-debug.log

https://ci.appveyor.com/project/aminya/fuzzaldrin-plus-fast-26mib/builds/35842442

Node 14 passes:
https://ci.appveyor.com/project/aminya/fuzzaldrin-plus-fast-26mib/builds/35842442

@aminya
Copy link
Member Author

aminya commented Oct 20, 2020

I found the reason. When we use napi it uses the latest Node (14.0.0), so it works on Node 14. We need to use prebuild directly since prebuildify currently only builds against the latest abi:

https://github.com/prebuild/prebuildify/blob/eac4e782fb0d6109b460de6e2608012aecffadd7/index.js#L297

@aminya
Copy link
Member Author

aminya commented Oct 28, 2020

This was fixed in 698d5e1 and 84bb4d2

@aminya aminya closed this as completed Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants