Closed andreasbotsikas closed 12 years ago
This looks great, everything works for node-gyp, except I get an error when attempting to install with npm:
┌─[sshull@sshull-mbp] - [/Volumes/Storage/Projects/node-proxy] - [git:windows-build ✗ Changed ✗]
└─[$]>➜ sudo npm install -g .
> node-proxy@0.5.2 install /usr/local/lib/node_modules/node-proxy
> node-gyp configure build
info it worked if it ends with ok
spawn python [ '/Users/sshull/.node-gyp/0.6.14/tools/gyp_addon',
'binding.gyp',
'-I/usr/local/lib/node_modules/node-proxy/build/config.gypi',
'build',
'-f',
'make' ]
Traceback (most recent call last):
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp_addon", line 38, in
rc = gyp.main(gyp_args)
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp/pylib/gyp/__init__.py", line 471, in main
options.circular_check)
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp/pylib/gyp/__init__.py", line 111, in Load
depth, generator_input_info, check, circular_check)
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp/pylib/gyp/input.py", line 2289, in Load
depth, check)
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp/pylib/gyp/input.py", line 361, in LoadTargetBuildFile
includes, True, check)
File "/Users/sshull/.node-gyp/0.6.14/tools/gyp/pylib/gyp/input.py", line 206, in LoadOneBuildFile
build_file_contents = open(build_file_path).read()
IOError: [Errno 21] Is a directory: 'build'
ERR! Error: `gyp_addon` failed with exit code: 1
at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:196:18)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok
npm ERR! node-proxy@0.5.2 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 1
npm ERR!
npm ERR! Failed at the node-proxy@0.5.2 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "."
npm ERR! cwd /Volumes/Storage/Projects/node-proxy
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.12
npm ERR! code ELIFECYCLE
npm ERR! message node-proxy@0.5.2 install: `node-gyp configure build`
npm ERR! message `sh "-c" "node-gyp configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Volumes/Storage/Projects/node-proxy/npm-debug.log
npm not ok
Can you crosscheck that you have installed node-gyp correctly? I have created a wiki page for another project I have helped adding node-gyp support. The steps are:
node cli.js install npm -gf npm update -g npm npm install -g node-gyp
I see you use node 0.6.14. I will get this version and do some tests to let you know. I have tested it on 0.7.something
Ok, so doing npm install -g would fail due to the comma but after fixing it, it worked like a charm in node 0.6.14 in windows. As far as I can tell from the log, npm calls node-gyp (as expected) and then node-gyp fails producing this error. If you run sudo node-gyp configure build does it produce any errors?
If you see http://piscisaureus.no.de/libuv/2012-04-11#22:02:43.806 the discussion between TooTallNate (author of node-gyp) and bnoordhuis they have the same error: IOError: [Errno 21] Is a directory: 'build' I will investigate further and report back
On a 32bit ubuntu I get the following successful build:
webinos@webinosKUbuntu:~/test/node-proxy$ sudo npm install -g
> node-proxy@0.5.2 install /usr/local/lib/node_modules/node-proxy
> node-gyp configure build
info it worked if it ends with ok
info downloading: http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
spawn python [ '/home/webinos/.node-gyp/0.6.8/tools/gyp_addon',
'binding.gyp',
'-I/usr/local/lib/node_modules/node-proxy/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/usr/local/lib/node_modules/node-proxy/build'
CXX(target) Release/obj.target/nodeproxy/src/node-proxy.o
../src/node-proxy.cc: In static member function ‘static v8::Handle<v8::Value> v8::NodeProxy::GetNamedProperty(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../src/node-proxy.cc:816:1: warning: control reaches end of non-void function [-Wreturn-type]
SOLINK_MODULE(target) Release/obj.target/nodeproxy.node
SOLINK_MODULE(target) Release/obj.target/nodeproxy.node: Finished
COPY Release/nodeproxy.node
make: Leaving directory `/usr/local/lib/node_modules/node-proxy/build'
info done ok
node-proxy@0.5.2 /usr/local/lib/node_modules/node-proxy
What is your machine configuration? Mac x64?
It appears that npm was the issue. Updated npm and npm install -g
is working as expected now. I do have a couple requests before I merge this pull request though.
After that, I will merge, give it a version bump, and push the update to npm.
Ah, ok, it wasn't installed globally, so I thought it was a dependency, but I see from your link that npm adds it to the path. Probably is better to specify the npm version then.
Removed the wscript and Makefile, replacing them with a simple binding.gyp file. To build you must run:
Added a ifdef preprocessor to apply the patch for windows in order to avoid the C2466 error.
Added intermediate node-proxy.js file to load the native .node file.