You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use npm's which (npm install -g which), that seemed to get me past the initial inability to detect python. However, after that you'll probably get the same problem I am getting:
[nodegit] Downloading libgit2 dependency.
[nodegit] Building libgit2 dependency.
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
I'm seeing this issue when I try and use the installer, I'm not familiar enough with the binding.gyp file to know what msbuild setting I should be adding/changing.
Looks to be like I need to change the configuration to Release instead of Debug.
@caolan yeah that's the same problem i posted above. i'm not entirely sure why either. if i run msbuild manually I can get it to build no problem. i think this may be an issue with node-gyp
Now you have your compiled .node bindings file! The compiled bindings end up in build/Debug/ or build/Release/, depending on the build mode. At this point you can require the .node file with Node and run your tests!
Note: To create a Debug build of the bindings file, pass the --debug (or -d) switch when running the either configure or build command.
What was happening with libraries was that -L gets mangled (if you npm install --verbose you see it doesn't recognise the option and chooses to ignore it). So when @caolan was setting libraries to only contain a -L it as the same as having an empty libraries.
We tried to find a way to pass /LIBPATH: to the linker, but the docs weren't very clear on how you might do that - and it node-gyp kept mangling it to end in .lib or some other horror.
In my environment I can see that it's now finding git2.lib (because if i tell it to use gitX.lib it complains the file doesnt exist) but that it's not finding the symbols within the git2.lib.
So i'm wondering if the C++ bindings are trying to use the wrong calling conventions. Perhaps the functions declared in the includes aren't getting wrapped in extern "C" {} (there are macros to do this in the git2 headers, but they might use defines that aren't defined when using node-gyp??).
@tbranyen excellent to hear! I tried it out in a VM but had some problems with it detecting my Python install. Probably just me doing something stupid...
Activity
Oodar commentedon Jul 13, 2013
You can use npm's which (npm install -g which), that seemed to get me past the initial inability to detect python. However, after that you'll probably get the same problem I am getting:
[nodegit] Downloading libgit2 dependency.
[nodegit] Building libgit2 dependency.
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
tbranyen commentedon Aug 14, 2013
I've been rewriting our installer in preparation for our next release.
My goals are:
caolan commentedon Nov 28, 2013
@tbranyen any news on Windows support? just tried this myself, would be really nice to have!
tbranyen commentedon Nov 28, 2013
Hey @caolan I just pushed up the work I did on the new installer. https://github.com/nodegit/nodegit/compare/new-installer
Could you give this a shot with
node test-installerand see if it works for you. I was testing in a Windows 7 x64 virtual machine.tbranyen commentedon Nov 28, 2013
I'm seeing this issue when I try and use the installer, I'm not familiar enough with the binding.gyp file to know what msbuild setting I should be adding/changing.
Looks to be like I need to change the configuration to Release instead of Debug.
caolan commentedon Nov 29, 2013
hmm, not sure what I'm doing wrong but it doesn't find git2.lib - I've fetched the git submodule, do I need to do anything else?
caolan commentedon Dec 3, 2013
Here's what I tried on Windows, using "Visual Studio Command Prompt (2010)"
I first installed:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
http://www.cmake.org/cmake/resources/software.html
http://www.python.org/getit/
tbranyen commentedon Dec 3, 2013
@caolan yeah that's the same problem i posted above. i'm not entirely sure why either. if i run msbuild manually I can get it to build no problem. i think this may be an issue with node-gyp
caolan commentedon Dec 4, 2013
Changing the 'libraries' section in binding.gyp to this:
Seemed to find git2.lib, but now I get lots of errors like this:
caolan commentedon Dec 12, 2013
The above
librariessetting doesn't actually include the file it seems, since usinglibraries: []yeilds the same errors.Interestingly, attempting to build in
C:\NodeGityields a different error, presumably something to do with spaces in paths?tbranyen commentedon Dec 12, 2013
@caolan if you run msbuild manually like I did, are you able to get it to build? (I agree I think it's incorrect paths)
caolan commentedon Dec 12, 2013
if I use msbuild directly it doesn't find node.lib
tbranyen commentedon Dec 12, 2013
Okay cool, so we're seeing the same issue.
I think this piece on node-gyp might be helpful:
Now you have your compiled .node bindings file! The compiled bindings end up in build/Debug/ or build/Release/, depending on the build mode. At this point you can require the .node file with Node and run your tests!
Note: To create a Debug build of the bindings file, pass the --debug (or -d) switch when running the either configure or build command.
I'm trying out
--debugright now.tbranyen commentedon Dec 12, 2013
Okay few things. You probably didn't notice
librariesdoing anything since you forgot anode-gyp configuremaybe?I changed the libraries path to:
Looks like it's relative to the
builddirectory where the visual studio project is.I ran with the path fix and that got past the error, but now it's exploding on compiling our library. Getting there...
Jc2k commentedon Dec 12, 2013
What was happening with
librarieswas that-Lgets mangled (if younpm install --verboseyou see it doesn't recognise the option and chooses to ignore it). So when @caolan was settinglibrariesto only contain a-Lit as the same as having an emptylibraries.We tried to find a way to pass
/LIBPATH:to the linker, but the docs weren't very clear on how you might do that - and it node-gyp kept mangling it to end in .lib or some other horror.Your solution neatly avoids this :)
caolan commentedon Dec 12, 2013
using
I get lots of these errors again:
Jc2k commentedon Dec 13, 2013
In my environment I can see that it's now finding git2.lib (because if i tell it to use gitX.lib it complains the file doesnt exist) but that it's not finding the symbols within the git2.lib.
As per: http://stackoverflow.com/questions/488809/tools-for-inspecting-lib-files I checked the symbols were actually there, and can see them.
So i'm wondering if the C++ bindings are trying to use the wrong calling conventions. Perhaps the functions declared in the includes aren't getting wrapped in
extern "C" {}(there are macros to do this in the git2 headers, but they might use defines that aren't defined when using node-gyp??).tbranyen commentedon Mar 23, 2014
@caolan The branch https://github.com/nodegit/nodegit/tree/new-installer is up with the latest code, please spread the word to someone knowledgeable in this area of Windows node-gyp linking, because it's beyond my capabilities now.
tbranyen commentedon Mar 23, 2014
#140 has more details on how to run and hit the issues.
tbranyen commentedon Apr 30, 2014
If anyone is still interested, I just pushed some changes to master that should allow for installation in Windows. Let me know how it goes!
caolan commentedon May 2, 2014
@tbranyen excellent to hear! I tried it out in a VM but had some problems with it detecting my Python install. Probably just me doing something stupid...
tbranyen commentedon May 2, 2014
@caolan just for testing can you do:
Also, make sure it's Python 2.6 or 2.7.
Sidenote: I'll be publishing prebuilt binaries for Windows soon, so this won't be an issue ;-)
alessioalex commentedon May 5, 2014
@tbranyen that would be awesome, Windows is such a pain.