Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not build on Node v4 #12

Open
pgaubatz opened this issue Sep 28, 2015 · 1 comment
Open

Does not build on Node v4 #12

pgaubatz opened this issue Sep 28, 2015 · 1 comment

Comments

@pgaubatz
Copy link

Hi!

I just wanted you to know that the module is not buildable on Node v4.0.0.
Trying to do so yields the following error(s):

patrick@blubb:~/tmp$ git clone https://github.com/systemd/node-systemd.git
Cloning into 'node-systemd'...
remote: Counting objects: 135, done.
remote: Total 135 (delta 0), reused 0 (delta 0), pack-reused 135
Receiving objects: 100% (135/135), 20.22 KiB | 0 bytes/s, done.
Resolving deltas: 100% (74/74), done.
Checking connectivity... done.
patrick@blubb:~/tmp$ cd node-systemd/
patrick@blubb:~/tmp/node-systemd$ npm i

> [email protected] preinstall /tmp/patrick/node-systemd
> node-gyp clean && node-gyp configure


> [email protected] install /tmp/patrick/node-systemd
> node-gyp build

make: Entering directory '/tmp/patrick/node-systemd/build'
  CXX(target) Release/obj.target/journald_cpp/src/journald_cpp.o
../src/journald_cpp.cc:19:27: error: ‘Arguments’ does not name a type
 Handle<Value> Async(const Arguments& args);
                           ^
../src/journald_cpp.cc:20:16: error: variable or field ‘AsyncWork’ declared void
 void AsyncWork(uv_work_t* req);
                ^
../src/journald_cpp.cc:20:16: error: ‘uv_work_t’ was not declared in this scope
../src/journald_cpp.cc:20:27: error: ‘req’ was not declared in this scope
 void AsyncWork(uv_work_t* req);
                           ^
../src/journald_cpp.cc:21:17: error: variable or field ‘AsyncAfter’ declared void
 void AsyncAfter(uv_work_t* req);
                 ^
../src/journald_cpp.cc:21:17: error: ‘uv_work_t’ was not declared in this scope
../src/journald_cpp.cc:21:28: error: ‘req’ was not declared in this scope
 void AsyncAfter(uv_work_t* req);
                            ^
../src/journald_cpp.cc:24:5: error: ‘uv_work_t’ does not name a type
     uv_work_t request;
     ^
../src/journald_cpp.cc:37:35: error: ‘Arguments’ does not name a type
 Handle<Value> SdJournalSend(const Arguments& args) {
                                   ^
In file included from /home/patrick/.node-gyp/4.0.0/include/node/node.h:42:0,
                 from ../src/journald_cpp.cc:11:
/home/patrick/.node-gyp/4.0.0/include/node/v8.h: In function ‘v8::Handle<v8::Value> SdJournalSend(const int&)’:
/home/patrick/.node-gyp/4.0.0/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/journald_cpp.cc:38:15: error: within this context
   HandleScope scope;
               ^
../src/journald_cpp.cc:39:19: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
   int argc = args.Length();
                   ^
../src/journald_cpp.cc:45:18: error: invalid types ‘const int[int]’ for array subscript
   if (args[argc-1]->IsFunction()) {
                  ^
../src/journald_cpp.cc:55:27: error: ‘New’ is not a member of ‘v8::String’
     return ThrowException(String::New("Out of memory"));
                           ^
../src/journald_cpp.cc:55:55: error: ‘ThrowException’ was not declared in this scope
     return ThrowException(String::New("Out of memory"));
                                                       ^
../src/journald_cpp.cc:58:33: error: invalid types ‘const int[int]’ for array subscript
     Local<String> v8str = args[i]->ToString();
                                 ^
../src/journald_cpp.cc:61:12: error: ‘class v8::String’ has no member named ‘WriteAscii’
     v8str->WriteAscii((char*)iov[i].iov_base, 0, iov[i].iov_len);
            ^
../src/journald_cpp.cc:66:63: error: invalid types ‘const int[int]’ for array subscript
     Local<Function> callback = Local<Function>::Cast(args[argc]);
                                                               ^
../src/journald_cpp.cc:71:12: error: ‘struct Baton’ has no member named ‘request’
     baton->request.data = baton;
            ^
../src/journald_cpp.cc:72:57: error: no matching function for call to ‘v8::Persistent<v8::Function>::New(v8::Local<v8::Function>&)’
     baton->callback = Persistent<Function>::New(callback);
                                                         ^
../src/journald_cpp.cc:72:57: note: candidate is:
In file included from /home/patrick/.node-gyp/4.0.0/include/node/node.h:42:0,
                 from ../src/journald_cpp.cc:11:
/home/patrick/.node-gyp/4.0.0/include/node/v8.h:7168:4: note: static T* v8::PersistentBase<T>::New(v8::Isolate*, T*) [with T = v8::Function]
 T* PersistentBase<T>::New(Isolate* isolate, T* that) {
    ^
/home/patrick/.node-gyp/4.0.0/include/node/v8.h:7168:4: note:   candidate expects 2 arguments, 1 provided
../src/journald_cpp.cc:76:48: error: ‘uv_default_loop’ was not declared in this scope
     int status = uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb) AsyncAfter);
                                                ^
../src/journald_cpp.cc:76:59: error: ‘struct Baton’ has no member named ‘request’
     int status = uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb) AsyncAfter);
                                                           ^
../src/journald_cpp.cc:76:68: error: ‘AsyncWork’ was not declared in this scope
     int status = uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb) AsyncAfter);
                                                                    ^
../src/journald_cpp.cc:76:80: error: ‘uv_after_work_cb’ was not declared in this scope
     int status = uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb) AsyncAfter);
                                                                                ^
../src/journald_cpp.cc:76:108: error: ‘uv_queue_work’ was not declared in this scope
     int status = uv_queue_work(uv_default_loop(), &baton->request, AsyncWork, (uv_after_work_cb) AsyncAfter);
                                                                                                            ^
../src/journald_cpp.cc:87:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
   return scope.Close(Undefined());
                ^
../src/journald_cpp.cc:87:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
   return scope.Close(Undefined());
                                ^
In file included from /home/patrick/.node-gyp/4.0.0/include/node/node.h:42:0,
                 from ../src/journald_cpp.cc:11:
/home/patrick/.node-gyp/4.0.0/include/node/v8.h:315:27: note: declared here
   friend Local<Primitive> Undefined(Isolate* isolate);
                           ^
../src/journald_cpp.cc: At global scope:
../src/journald_cpp.cc:93:16: error: variable or field ‘AsyncWork’ declared void
 void AsyncWork(uv_work_t* req) {
                ^
../src/journald_cpp.cc:93:16: error: ‘uv_work_t’ was not declared in this scope
../src/journald_cpp.cc:93:27: error: ‘req’ was not declared in this scope
 void AsyncWork(uv_work_t* req) {
                           ^
../src/journald_cpp.cc: In function ‘v8::Handle<v8::Value> SdJournalSend(const int&)’:
../src/journald_cpp.cc:88:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
journald_cpp.target.mk:88: recipe for target 'Release/obj.target/journald_cpp/src/journald_cpp.o' failed
make: *** [Release/obj.target/journald_cpp/src/journald_cpp.o] Error 1
make: Leaving directory '/tmp/patrick/node-systemd/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/patrick/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/home/patrick/.nvm/versions/node/v4.0.0/bin/node" "/home/patrick/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /tmp/patrick/node-systemd
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

npm WARN EPACKAGEJSON [email protected] No license field.
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/patrick/.nvm/versions/node/v4.0.0/bin/node" "/home/patrick/.nvm/versions/node/v4.0.0/bin/npm" "i"
npm ERR! node v4.0.0
npm ERR! npm  v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp build'.
npm ERR! This is most likely a problem with the journald package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp build
npm ERR! You can get their info via:
npm ERR!     npm owner ls journald
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/patrick/node-systemd/npm-debug.log

@gregl83
Copy link

gregl83 commented Dec 26, 2015

Indeed. I'm seeing the same thing.

Ubuntu 15.10
Node v4.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants