node-curl
node-curl copied to clipboard
Compiler error with Node v0.12.0
I get a whole bunch of errors when attempting to install with Node v0.12.0 OSX Yosemite. Is anyone else seeing these? To my untrained eye, it looks as if an update to V8 has broken things.
> [email protected] install /Users/james/Dropbox/carmm_shared/ServerWatcher_James/node-checker/node_modules/node-curl
> sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)
extract constants from /usr/include/curl/curl.h
generate src/integer_options.h
generate src/string_options.h
generate src/integer_infos.h
generate src/string_infos.h
generate src/double_infos.h
child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/node-curl/src/node-curl.o
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:178:43: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> close(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:265:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> getinfo(const v8::Arguments &args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:278:49: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> getinfo_int(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:283:49: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> getinfo_str(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:288:52: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> getinfo_double(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:293:51: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> getinfo_slist(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:330:48: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> setopt_int(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:335:48: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> setopt_str(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:347:50: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> setopt_slist(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:355:53: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> setopt_httppost(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:426:41: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> New(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:433:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> process(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:476:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> perform(const v8::Arguments & args)
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:496:47: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
static v8::Handle<v8::Value> get_count(const v8::Arguments & args )
^~~~~~~~~~~~~
v8::internal::Arguments
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:124:11: error: no member named 'AdjustAmountOfExternalAllocatedMemory' in 'v8::V8'
v8::V8::AdjustAmountOfExternalAllocatedMemory(2*4096);
~~~~~~~~^
../src/node-curl.h:125:11: error: no member named 'SetPointerInInternalField' in 'v8::Object'; did you mean 'SetAlignedPointerInInternalField'?
object->SetPointerInInternalField(0, this);
^~~~~~~~~~~~~~~~~~~~~~~~~
SetAlignedPointerInInternalField
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:2266:8: note: 'SetAlignedPointerInInternalField' declared here
void SetAlignedPointerInInternalField(int index, void* value);
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:126:40: error: 'New' is a private member of 'v8::PersistentBase<v8::Object>'
handle = v8::Persistent<v8::Object>::New(object);
^
/Users/james/.node-gyp/0.12.0/deps/v8/include/v8.h:572:23: note: declared private here
V8_INLINE static T* New(Isolate* isolate, T* that);
^
In file included from ../src/node-curl.cc:1:
../src/node-curl.h:126:12: error: too few arguments to function call, expected 2, have 1; did you mean '::NodeCurl::New'?
handle = v8::Persistent<v8::Object>::New(object);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::NodeCurl::New
../src/node-curl.h:426:31: note: '::NodeCurl::New' declared here
static v8::Handle<v8::Value> New(const v8::Arguments & args)
^
../src/node-curl.h:127:10: error: no member named 'MakeWeak' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
handle.MakeWeak(this, destructor);
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I am too facing this issue....
Having the same issue here
same issue...
Same issue on Mac OS 10.9.
The end of my log looks like: ../src/node-curl.h:127:10: error: no member named 'MakeWeak' in
'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
handle.MakeWeak(this, destructor);
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/node-curl/src/node-curl.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/twl/node_modules/node-curl
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
sh: node-waf: command not found
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "node-curl"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script 'sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)'.
npm ERR! This is most likely a problem with the node-curl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! sh src/generate_curl_options_list.sh && (node-gyp rebuild || node-waf configure build)
npm ERR! You can get their info via:
npm ERR! npm owner ls node-curl
npm ERR! There is likely additional logging output above.
Whole log here: https://gist.github.com/anonymous/c6746ec99527318b4eb7
Same issue here.
+1
+1
Is there a solution to this error?
+1 !
The code above needs a fairly healthy upgrade rewrite. V8 has changed the way function callbacks work https://strongloop.com/strongblog/node-js-v0-12-c-apis-breaking/
In Node v0.10, you write:
v8::Handle<v8::Value> FortyTwo(const v8::Arguments& args) {
v8::HandleScope handle_scope;
return handle_scope.Close(v8::Integer::New(42));
}
In Node v0.12, you write:
void FortyTwo(const v8::FunctionCallbackInfo<v8::Value>& info) {
// Don't need a HandleScope in this particular example.
info.GetReturnValue().Set(42);
}
results no longer return from the function but are set on the args with .GetReturnValue().Set(instance); This is with the new harmony switch from nodejs v0.11.x and is now released in v0.12 with the big change in the v8. There is no longer a MakeWeak on Persistent; there is a SetWeak and a SetPhantom[I haven't worked with them] There looks like a fork that people have been upgrading to v0.12 https://github.com/JCMais/node-libcurl/tree/develop They went with nan to do it https://github.com/iojs/nan
Same on iojs 1.8.1
Same problem with digitalocean nodejs built
Hi @rimmartin ,
do you know how to fix it for node-curl? I can do a PR if you can point me to the changes (I am not familiar at node-curl logic)
Are you looking for the compare? https://github.com/jiangmiao/node-curl/compare/master...JCMais:develop it says it is "This branch is 84 commits ahead, 4 commits behind jiangmiao:master" and that it can't automatically merge so not sure of the status of testing on both.
I have a friend who is familar with github I can ask what would be the procedure.
Maybe you'd have to fork and address the merge before it goes back to the main branch as a pull request
+1 does anyone know solution for this error?
@tarek-salah the solution is already in a fork; would be good to get these back together
+1 ... anyone know the status of this issue/fork/merging?
Delete this project or pass ownership to someone else if you aren't going to maintain it.
Agreed... PLEASE do something with this project or pass it on to someone else.
node-libcurl seems to be a much more updated fork of this dead project.
I couldn't wait around for this to be fixed, so I created my own Promise wrapper around command-line curl to do what I needed it to do. In case anyone else finds it useful, I've uploaded it as a gist.
Okay thanks. I was looking for a fork but didn't find one. node-libcurl looks exactly like what I need. :)
Wyatt
On Tue, Sep 15, 2015 at 4:31 PM James Sinclair [email protected] wrote:
I couldn't wait around for this to be fixed, so I created my own Promise wrapper around command-line curl https://gist.github.com/jrsinclair/ce1eba854ab4e31720d4 to do what I needed it to do. In case anyone else finds it useful, I've uploaded it as a gist. https://gist.github.com/jrsinclair/ce1eba854ab4e31720d4
— Reply to this email directly or view it on GitHub https://github.com/jiangmiao/node-curl/issues/38#issuecomment-140580244.