mscdex / node-mariasql

A node.js binding to MariaDB's non-blocking (MySQL-compatible) client library
MIT License
485 stars 73 forks source link

Error while attempting download and install from npm #138

Closed Katamori closed 8 years ago

Katamori commented 8 years ago

I saw it's been mentioned already, or at least in a similar manner, but a lot of time has been changed since, so I post this issue again.

When I attempt do download the npm via npm install mariasql, I got the following message

npm ERR! mariasql@0.2.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mariasql@0.2.5 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 mariasql 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 mariasql npm ERR! There is likely additional logging output above.

In addition, here's the entire content of npm-debug.log

Any ideas, what can cause it?

mscdex commented 8 years ago

The link to your debug log seems to be broken. Can you repost the link?

Katamori commented 8 years ago

Oh, yes! I'm sorry, I have no idea, what happened.

http://pastebin.com/DbaYqvCf

mscdex commented 8 years ago

Do you have a build environment installed? For Windows this would mean Python 2.7 and either Visual Studio 2015 Express for Desktop or the more experimental, but smaller, Visual C++ Build Tools 2015 with Windows (8.1) SDK.

rkoberg commented 8 years ago

Here is my error log from OSX el capitan, Python 2.7.11, npm 3.9.5, node 6.2.0 (node 6.2.0 seems to cause several errors with node-gyp): https://drive.google.com/file/d/0B-Hj2fdjrkzUcG5Bck52Z2JWa3M/view?usp=sharing

mscdex commented 8 years ago

@rkoberg You have to post the actual console output instead of the npm-debug.log file, since the latter does not actually capture compiler and similar messages. However, it looks like you might be missing Xcode or something since that log shows two other addons failing to compile in the same way.

rkoberg commented 8 years ago

I have xcode (and mariadb):

[rkoberg@mbp ~/Sites/fwi/este (master *)]$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
[rkoberg@mbp ~/Sites/fwi/este (master *)]$ xcode-select -v
xcode-select version 2343.
[rkoberg@mbp ~/Sites/fwi/este (master *)]$ mysql --version
mysql  Ver 15.1 Distrib 10.1.14-MariaDB, for osx10.11 (x86_64) using readline 5.1

I think it is caused by node-gyp level and not working with node 6.2.0. For node-gyp, I have: clean, rebuild, install, build, but still get the following errors from the console output:

[rkoberg@mbp ~/Sites/fwi/este (master *)]$ npm i mariasql --save

> bufferutil@1.2.1 install /Users/rkoberg/Sites/fwi/este/node_modules/bufferutil
> node-gyp rebuild

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
error: invalid argument '-fgnu89-inline' not allowed with 'C++/ObjC++'
make: *** [Release/obj.target/bufferutil/src/bufferutil.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: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_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rkoberg/Sites/fwi/este/node_modules/bufferutil
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> fsevents@1.0.12 install /Users/rkoberg/Sites/fwi/este/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
error: invalid argument '-fgnu89-inline' not allowed with 'C++/ObjC++'
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/rkoberg/Sites/fwi/este/node_modules/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_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/rkoberg/Sites/fwi/este/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64"
gyp ERR! cwd /Users/rkoberg/Sites/fwi/este/node_modules/fsevents
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /Users/rkoberg/Sites/fwi/este/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node --module_name=fse --module_path=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Darwin 15.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/rkoberg/Sites/fwi/este/node_modules/fsevents
node-pre-gyp ERR! node -v v6.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.25
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /Users/rkoberg/Sites/fwi/este/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node --module_name=fse --module_path=/Users/rkoberg/Sites/fwi/este/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64' (1)
npm WARN install:fsevents@1.0.12 fsevents@1.0.12 install: `node-pre-gyp install --fallback-to-build`
npm WARN install:fsevents@1.0.12 Exit status 1

> utf-8-validate@1.2.1 install /Users/rkoberg/Sites/fwi/este/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
error: invalid argument '-fgnu89-inline' not allowed with 'C++/ObjC++'
make: *** [Release/obj.target/validation/src/validation.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: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_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rkoberg/Sites/fwi/este/node_modules/utf-8-validate
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1

> mariasql@0.2.6 install /Users/rkoberg/Sites/fwi/este/node_modules/mariasql
> node-gyp rebuild

  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aes.o
error: invalid argument '-fgnu89-inline' not allowed with 'C++/ObjC++'
make: *** [Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aes.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: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_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rkoberg/Sites/fwi/este/node_modules/mariasql
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "mariasql" "--save"
npm ERR! node v6.2.0
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE

npm ERR! mariasql@0.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mariasql@0.2.6 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 mariasql 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 mariasql
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rkoberg/Sites/fwi/este/npm-debug.log
[rkoberg@mbp ~/Sites/fwi/este (master *)]$ 
rkoberg commented 8 years ago

I updated the link above with the latest error log in case something has changed from recent work.

mscdex commented 8 years ago

@rkoberg That output is better. It's complaining about a gcc compiler flag. Did you install the Xcode Command Line Tools from within Xcode (Xcode -> Preferences -> Downloads)?

rkoberg commented 8 years ago

No, through the Terminal with xcode-select. I should add that installing pg and mysql worked, even though it threw the same errors as for mariasql.

mscdex commented 8 years ago

@rkoberg Ok, if you have the Command Line Tools installed then I'm not sure what is missing. You might try asking on the node-gyp issue tracker.

zoonage commented 8 years ago

I've also got this on Debian 8.0

npm ERR! mariasql@0.2.6 install: \`node-gyp rebuild\`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mariasql@0.2.6 install script.
npm ERR! This is most likely a problem with the mariasql 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 mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "mariasql"
npm ERR! cwd /opt/monitoring/master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /opt/monitoring/master/npm-debug.log
npm ERR! not ok code 0
mscdex commented 8 years ago

@zoonage You need to post the console output that comes before that text, as that is where the real error will be.

zoonage commented 8 years ago

@mscdex

here is the whole output of npm install mariasql

monitoring@monitoring:~/master$ npm  install mariasql
npm WARN package.json fs@0.0.2 No description
npm WARN package.json fs@0.0.2 No repository field.
npm WARN package.json fs@0.0.2 No README data
npm WARN package.json net@1.0.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json net@1.0.2 No README data
-
> mariasql@0.2.6 install /opt/monitoring/master/node_modules/mariasql
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/monitoring/master/node_modules/mariasql
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! mariasql@0.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mariasql@0.2.6 install script.
npm ERR! This is most likely a problem with the mariasql 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 mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "-V" "install" "mariasql"
npm ERR! cwd /opt/monitoring/master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /opt/monitoring/master/npm-debug.log
npm ERR! not ok code 0
mscdex commented 8 years ago

A few things that pop out to me:

ghost commented 8 years ago

same on freebsd node v6

In file included from ../deps/libmariadbclient/include/mysql/services.h:35: ../deps/libmariadbclient/include/mysql/service_encryption.h:38:10: fatal error: 'alloca.h' file not found

include

     ^