node-syslog icon indicating copy to clipboard operation
node-syslog copied to clipboard

can't install by node 6

Open pwxwabcd opened this issue 7 years ago • 1 comments

npm 4.4.4,node 6.10.1,ubuntu Ubuntu 14.04.5 LTS npm install node-syslog

[email protected] install /home/wangxiaowei/node_modules/node-syslog node-gyp rebuild

make:进入目录'/home/wangxiaowei/node_modules/node-syslog/build' CXX(target) Release/obj.target/syslog/syslog.o In file included from ../node-syslog.h:13:0, from ../syslog.cc:1: ../compat.h:27:2: error: #error "Unsupported node.js version." #error "Unsupported node.js version." ^ ../compat.h:62:53: error: ‘FunctionCallback’ has not been declared FunctionCallback callback = ^ ../compat.h:123:47: error: ‘ArgumentType’ does not name a type inline explicit ReturnableHandleScope(const ArgumentType& args); ^ ../compat.h:123:61: error: ISO C++ forbids declaration of ‘args’ with no type [- fpermissive] inline explicit ReturnableHandleScope(const ArgumentType& args); ^ ../compat.h:124:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(); ^ ../compat.h:125:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(bool value); ^ ../compat.h:126:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(intptr_t value); ^ ../compat.h:127:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(int value); ^ ../compat.h:128:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(double value); ^ ../compat.h:129:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(const char* value); ^ ../compat.h:130:10: error: ‘ReturnType’ does not name a type inline ReturnType Return(v8::Localv8::Value value); ^ ../compat.h:134:9: error: ‘ArgumentType’ does not name a type const ArgumentType& args_; ^ In file included from ../syslog.cc:1:0: ../node-syslog.h:23:9: error: ‘ReturnType’ in namespace ‘C’ does not name a type static C::ReturnType init (const C::ArgumentType& args); ^ ../node-syslog.h:24:9: error: ‘ReturnType’ in namespace ‘C’ does not name a type static C::ReturnType log (const C::ArgumentType& args); ^ ../node-syslog.h:25:9: error: ‘ReturnType’ in namespace ‘C’ does not name a type static C::ReturnType setMask (const C::ArgumentType& args); ^ ../node-syslog.h:26:9: error: ‘ReturnType’ in namespace ‘C’ does not name a type static C::ReturnType destroy (const C::ArgumentType& args); ^ In file included from ../syslog.cc:2:0: ../compat-inl.h:80:27: error: ‘FunctionCallback’ has not been declared v8::Isolate* isolate, FunctionCallback callback) { ^ ../compat-inl.h: In static member function ‘static v8::Local<v8::FunctionTemplat e> compat::FunctionTemplate::New(v8::Isolate*, int)’: ../compat-inl.h:82:60: error: invalid conversion from ‘int’ to ‘v8::FunctionCall back {aka void ()(const v8::FunctionCallbackInfov8::Value&)}’ [-fpermissive] return v8::FunctionTemplate::New(COMPAT_ISOLATE_ callback); ^ In file included from /home/wangxiaowei/.node-gyp/6.10.1/include/node/node.h:42: 0, from ../node-syslog.h:4, from ../syslog.cc:1: /home/wangxiaowei/.node-gyp/6.10.1/include/node/v8.h:4484:34: error: initializ ing argument 2 of ‘static v8::Localv8::FunctionTemplate v8::FunctionTemplate:: New(v8::Isolate, v8::FunctionCallback, v8::Localv8::Value, v8::Local<v8::Sign ature>, int)’ [-fpermissive] static Local<FunctionTemplate> New( ^ In file included from ../syslog.cc:2:0: ../compat-inl.h: At global scope: ../compat-inl.h:119:1: error: ‘ReturnType’ does not name a type ReturnType ReturnableHandleScope::Return(bool value) { ^ ../compat-inl.h:123:1: error: ‘ReturnType’ does not name a type ReturnType ReturnableHandleScope::Return(intptr_t value) { ^ ../compat-inl.h:127:1: error: ‘ReturnType’ does not name a type ReturnType ReturnableHandleScope::Return(int value) { ^ ../compat-inl.h:131:1: error: ‘ReturnType’ does not name a type ReturnType ReturnableHandleScope::Return(double value) { ^ ../compat-inl.h:135:1: error: ‘ReturnType’ does not name a type ReturnType ReturnableHandleScope::Return(const char* value) { ^ ../compat-inl.h: In member function ‘v8::Isolate* compat::ReturnableHandleScope: :isolate() const’: ../compat-inl.h:140:10: error: ‘args_’ was not declared in this scope return args_.GetIsolate(); ^ ../syslog.cc: At global scope: ../syslog.cc:5:15: error: ‘compat::ReturnType’ has not been declared using compat::ReturnType; ^ ../syslog.cc:6:15: error: ‘compat::ArgumentType’ has not been declared using compat::ArgumentType; ^ ../syslog.cc:10:8: error: ‘ReturnType’ does not name a type static ReturnType ThrowException(const ArgumentType& args, const char* m) { ^ ../syslog.cc: In static member function ‘static void Syslog::Initialize(v8::Hand lev8::Object)’: ../syslog.cc:29:34: error: ‘init’ is not a member of ‘Syslog’ NODE_SET_METHOD(target, "init", Syslog::init); ^ ../syslog.cc:30:33: error: ‘log’ is not a member of ‘Syslog’ NODE_SET_METHOD(target, "log", Syslog::log); ^ ../syslog.cc:31:37: error: ‘setMask’ is not a member of ‘Syslog’ NODE_SET_METHOD(target, "setMask", Syslog::setMask); ^ ../syslog.cc:32:35: error: ‘destroy’ is not a member of ‘Syslog’ NODE_SET_METHOD(target, "close", Syslog::destroy); ^ ../syslog.cc: At global scope: ../syslog.cc:35:1: error: ‘ReturnType’ does not name a type ReturnType ^ ../syslog.cc:75:1: error: ‘ReturnType’ does not name a type ReturnType ^ ../syslog.cc:107:1: error: ‘ReturnType’ does not name a type ReturnType ^ ../syslog.cc:122:1: error: ‘ReturnType’ does not name a type ReturnType ^ ../syslog.cc:65:13: warning: ‘void UV_AfterLog(uv_work_t*, int)’ defined but not used [-Wunused-function] static void UV_AfterLog(uv_work_t req, int) { ^ ../syslog.cc:69:13: warning: ‘void UV_Log(uv_work_t)’ defined but not used [-Wu nused-function] static void UV_Log(uv_work_t *req) { ^ make: *** [Release/obj.target/syslog/syslog.o] 错误 1 make:离开目录“/home/wangxiaowei/node_modules/node-syslog/build” gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_module s/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:215:12) gyp ERR! System Linux 4.4.0-31-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node- gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/wangxiaowei/node_modules/node-syslog gyp ERR! node -v v6.10.1 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open '/home/wangxiaowei/packa ge.json' npm WARN wangxiaowei No description npm WARN wangxiaowei No repository field. npm WARN wangxiaowei No README data npm WARN wangxiaowei No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-syslog package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-syslog npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-syslog npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/wangxiaowei/.npm/_logs/2017-04-06T01_59_24_477Z-debug.log

pwxwabcd avatar Apr 06 '17 02:04 pwxwabcd

@pwxwabcd See #49. (EDIT: And #52 - long story short, use modern-syslog.)

bnoordhuis avatar Apr 06 '17 10:04 bnoordhuis

Old issue

schamane avatar Feb 23 '24 09:02 schamane