Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Installation error #47

Open
Signum opened this issue Jan 7, 2016 · 6 comments
Open

Installation error #47

Signum opened this issue Jan 7, 2016 · 6 comments

Comments

@Signum
Copy link

Signum commented Jan 7, 2016

I tried to install the "node-grok" module but failed. I'm very new to NodeJS so don't know yet how to debug the actual cause yet. Sorry.

Environment is Ubuntu 15.10, 64 bit, NodeJS 4.2.4.

> [email protected] install /home/chaas/node_modules/node-grok/node_modules/oniguruma
> node-gyp rebuild

make: Entering directory '/home/chaas/node_modules/node-grok/node_modules/oniguruma/build'
  CC(target) Release/obj.target/oniguruma/deps/onig/regcomp.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regenc.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regerror.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regexec.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regext.o
  CC(target) Release/obj.target/oniguruma/deps/onig/reggnu.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regparse.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regposerr.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regposix.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regsyntax.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regtrav.o
  CC(target) Release/obj.target/oniguruma/deps/onig/regversion.o
  CC(target) Release/obj.target/oniguruma/deps/onig/st.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/ascii.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/big5.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/cp1251.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/euc_jp.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/euc_kr.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/euc_tw.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/gb18030.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_1.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_2.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_3.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_4.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_5.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_6.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_7.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_8.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_9.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_10.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_11.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_13.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_14.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_15.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/iso8859_16.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/koi8.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/koi8_r.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/mktable.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/sjis.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/unicode.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/utf16_be.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/utf16_le.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/utf32_be.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/utf32_le.o
  CC(target) Release/obj.target/oniguruma/deps/onig/enc/utf8.o
  AR(target) Release/obj.target/oniguruma.a
  COPY Release/oniguruma.a
  CXX(target) Release/obj.target/onig_scanner/src/onig-cache.o
onig_scanner.target.mk:106: recipe for target 'Release/obj.target/onig_scanner/src/onig-cache.o' failed
make: Leaving directory '/home/chaas/node_modules/node-grok/node_modules/oniguruma/build'

More output:

In file included from ../src/onig-reg-exp.h:7:0,
                 from ../src/onig-cache.h:4,
                 from ../src/onig-cache.cc:1:
../node_modules/nan/nan.h:260:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../node_modules/nan/nan.h:255:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../node_modules/nan/nan.h:660:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:660:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:664:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:664:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:671:67: error: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/onig-reg-exp.h:7,
                 from ../src/onig-cache.h:4,
                 from ../src/onig-cache.cc:1:
/home/chaas/.node-gyp/4.2.4/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/chaas/.node-gyp/4.2.4/include/node/node_buffer.h:31:40: note:   conversion of argument 3 would be ill-formed:
In file included from ../src/onig-reg-exp.h:7:0,
                 from ../src/onig-cache.h:4,
                 from ../src/onig-cache.cc:1:
../node_modules/nan/nan.h:671:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/onig-reg-exp.h:7,
                 from ../src/onig-cache.h:4,
                 from ../src/onig-cache.cc:1:
/home/chaas/.node-gyp/4.2.4/include/node/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/chaas/.node-gyp/4.2.4/include/node/node_buffer.h:43:40: note:   conversion of argument 2 would be ill-formed:
In file included from ../src/onig-reg-exp.h:7:0,
                 from ../src/onig-cache.h:4,
                 from ../src/onig-cache.cc:1:
../node_modules/nan/nan.h:671:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:675:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:682:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/onig_scanner/src/onig-cache.o] Error 1
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_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 4.2.0-22-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/chaas/node_modules/node-grok/node_modules/oniguruma
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.2.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-grok"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE

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! This is most likely a problem with the oniguruma 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 their info via:
npm ERR!     npm owner ls oniguruma
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/chaas/projekte/logclinic/milestone4/npm-debug.log
@nathansobo
Copy link
Contributor

@Signum You might try cloning this repository and running npm install in the directory? It looks like we have some recent commits that haven't been published yet to npm that might help you. I don't have immediate insight on what is going wrong with compilation here. Perhaps @zcbenz would?

@davideghz
Copy link

let's try apt-get remove gyp

reference:
nodejs/node-gyp#363 (comment)

@mbg
Copy link

mbg commented Apr 2, 2016

I ran into the same problem on Windows. It turned out that I didn't have a PYTHON environment variable set to the python executable. Setting that environment variable fixed this problem for me.

@watilde
Copy link

watilde commented Apr 4, 2016

For my case, I've fixed a similar issue with this by updating gcc version to v4.8.x on Ubuntu!
See also: nodejs/nan#448

@carlsoncs
Copy link

I'm having a similar issue as well, here is the output:

npm ERR! Linux 4.2.0-36-generic
npm ERR! argv "/home/christopher/.nvm/versions/node/v6.2.0/bin/node" "/home/christopher/.nvm/versions/node/v6.2.0/bin/npm" "install"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE

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 oniguruma 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 oniguruma
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls oniguruma
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/src/atom/npm-debug.log

I'm going to try cloning the repository and reinstalling...

@BobHarper1
Copy link

Same problem here when trying to install with npm. Cloning from github and installing the same problem again.

Windows 10 64-bit, Node v4.1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants