Comments (5)
Hey @arturadib, so except for the last one, these are more or less expected:
Problem 1
At first node-gyp seems to look for a
bindings.gyp
file rather thanbinding.gyp
:
Yes this is actually expected, and arguably a usability bug in node-gyp. But basically the Windows target generates a <name of gyp file>.sln
, whereas the Make target generates a (hard-coded predictable name) Makefile.gyp
file. I've been meaning to change Windows to glob for the first .sln
file in the cwd but haven't done that yet. (You can currently specify which sln to use with node-gyp build --solution=binding.sln
, but ideally you don't need that).
Problem 2
If I rename
binding.gyp
tobindings.gyp
then it seems to build OK, except for a warning message concerning a mismatch of extensions (.dll
vs.node
):
This is also expected. Node renames the resulting shared object to .node
rather than .dll
. MSVC decides to complain about that. Not sure if there's a way to silence that warning..
Problem 3
Since the build was seemingly OK, I tried to run
test.js
, but it complains that there is no binary in./out/Release/binding
. Instead, the binary was produced in./Release/binding
.
Again, this is just a Windows-ism of the build system. The same thing happens when building node.exe itself! There is never an out
directory, just top level Debug
and Release
. This also may be fixable (in the node repo), but I'm not sure really. Note that node-bindings
takes care of normalizing that for you at runtime.
Problem 4
Fixing the path issue above and running
test.js
again now leads to the following error:node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: unknown error
"unknown error", lovely :
I haven't actually ever seen that one yet! Are you trying out the 64-bit node.exe or something? I doubt it's related to the .dll vs .node thing. I'll fire up my Windows VM in a bit to verify that the Hello World addon builds properly...
from node-gyp.
So Problem #4 is fixed by nodejs/node-v0.x-archive#2828.
I'll open a new issue to glob for .sln files on Windows, so that the --solution
argument is not necessary.
Closing.
from node-gyp.
@arturadib Check out nodejs/node-v0.x-archive#2833 which fixes Windows to build addons properly in the out
dir. Cheers!
from node-gyp.
@TooTallNate Awesome, thanks Nate. I was actually going to ask you about those random files scattered around root :)
I suppose this feature will not work when the user has older versions of Node installed, right? (Since as I understand it, node-gyp will download the corresponding minor version source, which won't have the new features in yet).
from node-gyp.
@arturadib You're correct about node-gyp downloading the source tarball, however node-gyp also copies over newer versions of the gyp config files when they exist from its "legacy" dir. Eventually this "fixing" hopefully won't be necessary, and node-gyp can just use the node version's gypi files as they come, but for now (at least until 0.8) node-gyp has to do some "cleanup" on the dev files.
from node-gyp.
Related Issues (20)
- Package including other binding.gyp files fails to build on native Windows with "No such file or directory" for binding.sln.gyp.9gyrmwpe.tmp HOT 3
- Compiling on x64 for arm64
- ... .... .- -... ..
- Getting error while installing canvas using npm HOT 6
- Error while installing canvas with npm HOT 1
- Walrus operator only supported in Python 3.8 HOT 1
- Unable to run `node-gyp configure` HOT 1
- node-gyp rebuild command failure HOT 1
- error: failed to commit transaction (conflicting files) HOT 1
- How to enable OpenMP on macOS (clang)
- make error when run without access to `/proc`
- Why is `package-lock.json` ignored?
- Inconsistent Order of build_files in WriteAutoRegenerationRule Causes CI Failures HOT 2
- Could not find any Visual Studio installation to use HOT 1
- node-gyp build fails obscurely if no Xcode or CLT are found
- Can't get node headers HOT 4
- Python >= v3.12 requires node-gyp >= v10 HOT 3
- Error C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 HOT 2
- The installed files are not consistent
- Please fix your detection of armhf aka arm32 aka armv6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gyp.