Repository navigation
Cannot install on OSX #49
Description
$ sudo npm install nodegit
npm http GET https://registry.npmjs.org/nodegit
npm http 304 https://registry.npmjs.org/nodegit
nodegit@0.0.7 preinstall /Users/alexandruvladutu/www/libgit2/node_modules/nodegit
./build.sh
Cloning libgit2
Cloning into '/Users/alexandruvladutu/www/libgit2/node_modules/nodegit/vendor/libgit2'...
remote: Counting objects: 31919, done.
remote: Compressing objects: 100% (9629/9629), done.
remote: Total 31919 (delta 22743), reused 30468 (delta 21492)
Receiving objects: 100% (31919/31919), 8.52 MiB | 1.80 MiB/s, done.
Resolving deltas: 100% (22743/22743), done.
Note: checking out 'v0.15.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 3eaf34f... libgit2 v0.15.0 "Das Wunderbar Release"
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for program g++ or c++ : /usr/bin/g++
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /Users/alexandruvladutu/.node_libraries
Checking for node prefix : ok /Users/alexandruvladutu/.nvm/v0.8.11
/bin/sh: cmake: command not found
'configure' finished successfully (0.075s)
Waf: Entering directory /Users/alexandruvladutu/www/libgit2/node_modules/nodegit/build' /bin/sh: cmake: command not found [ 1/13] cxx: src/base.cc -> build/Release/src/base_1.o [ 2/13] cxx: src/sig.cc -> build/Release/src/sig_1.o [ 3/13] cxx: src/blob.cc -> build/Release/src/blob_1.o [ 4/13] cxx: src/error.cc -> build/Release/src/error_1.o [ 5/13] cxx: src/object.cc -> build/Release/src/object_1.o [ 6/13] cxx: src/reference.cc -> build/Release/src/reference_1.o [ 7/13] cxx: src/repo.cc -> build/Release/src/repo_1.o [ 8/13] cxx: src/commit.cc -> build/Release/src/commit_1.o [ 9/13] cxx: src/oid.cc -> build/Release/src/oid_1.o [10/13] cxx: src/revwalk.cc -> build/Release/src/revwalk_1.o [11/13] cxx: src/tree.cc -> build/Release/src/tree_1.o [12/13] cxx: src/tree_entry.cc -> build/Release/src/tree_entry_1.o [13/13] cxx_link: build/Release/src/base_1.o build/Release/src/sig_1.o build/Release/src/blob_1.o build/Release/src/error_1.o build/Release/src/object_1.o build/Release/src/reference_1.o build/Release/src/repo_1.o build/Release/src/commit_1.o build/Release/src/oid_1.o build/Release/src/revwalk_1.o build/Release/src/tree_1.o build/Release/src/tree_entry_1.o -> build/Release/nodegit.node ld: library not found for -lgit2 collect2: ld returned 1 exit status Waf: Leaving directory/Users/alexandruvladutu/www/libgit2/node_modules/nodegit/build'
Build failed: -> task failed (err #1):
{task: cxx_link base_1.o,sig_1.o,blob_1.o,error_1.o,object_1.o,reference_1.o,repo_1.o,commit_1.o,oid_1.o,revwalk_1.o,tree_1.o,tree_entry_1.o -> nodegit.node}
make: *** [build] Error 1
npm ERR! nodegit@0.0.7 preinstall: ./build.sh
npm ERR! sh "-c" "./build.sh" failed with 2
node -v && npm -v
v0.8.11
1.1.62
Activity
faceleg commentedon Mar 3, 2013
It seems that you don't have
cmakeinstalled (/bin/sh: cmake: command not found). What is the output ofI'm working on porting the installation script to
node-gyp, and will try to get an update out tonight. I will update this issue with further instructions when I've done this.alessioalex commentedon Mar 4, 2013
$ which cmake
/usr/local/bin/cmake
faceleg commentedon Mar 4, 2013
@alessioalex hmm... I'll try my best to get a new version out tonight, it uses a completely different (current - what is released was deprecated awhile ago) build system. Fingers crossed it'll help you.
ctrimble commentedon Mar 18, 2013
I successfully got this installing on MacOSX last week. I had a lot of problems with the new version of XCode from the App Store, since it has moved the SDKs to
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/. Upgrading tocmake version 2.8.10.2resolved the issues I was having.faceleg commentedon Mar 21, 2013
Fixed in v0.0.74.
alessioalex commentedon Mar 22, 2013
Unfortunately there's still a minor issue:
faceleg commentedon Mar 22, 2013
Installation requires
python2, do you have that installed?faceleg commentedon Mar 25, 2013
@alessioalex I've published an update, does it install for you now?
alessioalex commentedon Mar 26, 2013
Works great on OSX (it install well and I've used it), installs on Ubuntu but does not work on require, see example:
alessioalex commentedon Mar 26, 2013
There is something strange happening here, I just successfully installed and ran the module on another Ubuntu installation and it works.
The error I pasted above happens on a VPS from digitalocean with Ubuntu. Is there something I can do to "clean" it perhaps? Is the error happening because something is cached somewhere?
Thanks
faceleg commentedon Mar 26, 2013
Hi @alessioalex, sorry I haven't had a chance to look at this yet. I did encounter a similar issue with other modules, I resolved it by removing all traces of the offending module & reinstalling.
I do plan on trying to replicate your issue on one of my Ubuntu machines, I'm just in the middle of some major refactoring, and won't be able to test until I'm done with that.
alessioalex commentedon Mar 26, 2013
Really appreciate you looking into this. Anyway it must be a small thing I guess, since I've managed to install & run it on 2 out of 3 machines (OSX, Ubuntu vs Ubuntu).
Can you please tell me what exactly do you mean by "removing all traces of the offending module"? Thanks!
faceleg commentedon Apr 2, 2013
@alessioalex I've tried the current version on my Ubuntu machine (12.10), and it worked. Could you please paste some Node code that replicates the issue you're experiencing?
alessioalex commentedon Apr 2, 2013
Installed the latest version, and when I require the module I get this
Additional info:
faceleg commentedon Apr 5, 2013
I've published v0.79, do you still get this error?
alessioalex commentedon Apr 5, 2013
Everything works great now, I was able to install it on that Ubuntu machine which didn't previously work. AWESOME! Thanks for sticking with me all this time 👍 appreciate it !