Open Chris911 opened 8 years ago
This might help as well:
> libpq@1.8.2 install /Users/chris/Documents/Development/Busbud/napi/node_modules/libpq
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/addon/src/connection.o
../src/connection.cc:653:5: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete errBuff;
^
[]
../src/connection.cc:644:19: note: allocated with 'new[]' here
char* errBuff = new char[255];
^
../src/connection.cc:658:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete errBuff;
^
[]
../src/connection.cc:644:19: note: allocated with 'new[]' here
char* errBuff = new char[255];
^
2 warnings generated.
/Users/chris/Documents/Development/Busbud/napi/node_modules/.bin/touch: line 1: syntax error near unexpected token `('
/Users/chris/Documents/Development/Busbud/napi/node_modules/.bin/touch: line 1: `var touch = require("../touch")'
make: *** [Release/obj.target/addon/src/connection.o] Error 2
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/chris/.nvm/versions/node/v6.1.0/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.0.0
gyp ERR! command "/Users/chris/.nvm/versions/node/v6.1.0/bin/node" "/Users/chris/.nvm/versions/node/v6.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/chris/Documents/Development/Busbud/napi/node_modules/libpq
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Same here on Arch, node 6.1.0
make: Entering directory '/home/dev/project/node_modules/libpq/build'
CXX(target) Release/obj.target/addon/src/connection.o
In file included from ../src/addon.h:4:0,
from ../src/connection.cc:1:
../node_modules/nan/nan.h:602:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:602:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^~
../node_modules/nan/nan.h:603:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^~~~~~~~~~~~~~
../node_modules/nan/nan.h:608:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:608:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^~
../node_modules/nan/nan.h:613:20: error: variable or field ‘AddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:613:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^~
../node_modules/nan/nan.h:614:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^~~~~~~~~~~~~~
../node_modules/nan/nan.h:619:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:619:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^~
addon.target.mk:92: recipe for target 'Release/obj.target/addon/src/connection.o' failed
make: *** [Release/obj.target/addon/src/connection.o] Error 1
Same in Ubuntu 12.04, node v6.2
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'libpq' ]
2 info using npm@3.9.0
3 info using node@v6.2.0
...
5158 warn In npm@3.9.0 replacing bundled version of node-gyp with node-gyp@3.3.1
5159 verbose stack Error: libpq@1.8.2 install: `node-gyp rebuild`
5159 verbose stack Exit status 1
5159 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:245:16)
5159 verbose stack at emitTwo (events.js:106:13)
5159 verbose stack at EventEmitter.emit (events.js:191:7)
5159 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
5159 verbose stack at emitTwo (events.js:106:13)
5159 verbose stack at ChildProcess.emit (events.js:191:7)
5159 verbose stack at maybeClose (internal/child_process.js:850:16)
5159 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
5160 verbose pkgid libpq@1.8.2
5161 verbose cwd /home/vagrant/task/server
5162 error Linux 3.2.0-23-generic-pae
5163 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "libpq"
5164 error node v6.2.0
5165 error npm v3.9.0
5166 error code ELIFECYCLE
5167 error libpq@1.8.2 install: `node-gyp rebuild`
5167 error Exit status 1
5168 error Failed at the libpq@1.8.2 install script 'node-gyp rebuild'.
5168 error Make sure you have the latest version of node.js and npm installed.
5168 error If you do, this is most likely a problem with the libpq package,
5168 error not with npm itself.
5168 error Tell the author that this fails on your system:
5168 error node-gyp rebuild
5168 error You can get information on how to open an issue for this project with:
5168 error npm bugs libpq
5168 error Or if that isn't available, you can get their info via:
5168 error npm owner ls libpq
5168 error There is likely additional logging output above.
5169 verbose exit [ 1, true ]
Im getting this as well. Last comment was in May. Have any of you found any work-around?
Not sure what the issue is - I have no problem installing this on any version of node...probably something missing in your environment related to the C libpq not being found on the path or something? Can you type pg_config
on your path without issue? That command should provide the path to libpq. the gypfile runs pg_config
to find the location of libpq.h
Here's mine @brianc:
BINDIR = /usr/local/Cellar/postgresql/9.4.1/bin
DOCDIR = /usr/local/Cellar/postgresql/9.4.1/share/doc/postgresql
HTMLDIR = /usr/local/Cellar/postgresql/9.4.1/share/doc/postgresql
INCLUDEDIR = /usr/local/Cellar/postgresql/9.4.1/include
PKGINCLUDEDIR = /usr/local/Cellar/postgresql/9.4.1/include
INCLUDEDIR-SERVER = /usr/local/Cellar/postgresql/9.4.1/include/server
LIBDIR = /usr/local/Cellar/postgresql/9.4.1/lib
PKGLIBDIR = /usr/local/Cellar/postgresql/9.4.1/lib
LOCALEDIR = /usr/local/Cellar/postgresql/9.4.1/share/locale
MANDIR = /usr/local/Cellar/postgresql/9.4.1/share/man
SHAREDIR = /usr/local/Cellar/postgresql/9.4.1/share/postgresql
SYSCONFDIR = /usr/local/Cellar/postgresql/9.4.1/etc
PGXS = /usr/local/Cellar/postgresql/9.4.1/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--disable-debug' '--prefix=/usr/local/Cellar/postgresql/9.4.1' '--datadir=/usr/local/Cellar/postgresql/9.4.1/share/postgresql' '--docdir=/usr/local/Cellar/postgresql/9.4.1/share/doc/postgresql' '--enable-thread-safety' '--with-bonjour' '--with-gssapi' '--with-ldap' '--with-openssl' '--with-pam' '--with-libxml' '--with-libxslt' '--with-perl' '--with-tcl' '--with-tclconfig=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib' '--with-uuid=e2fs' 'CC=clang'
CC = clang
CPPFLAGS = -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2
CFLAGS_SL =
LDFLAGS = -L../../../src/common -Wl,-dead_strip_dylibs
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
VERSION = PostgreSQL 9.4.1
@Chris911 you're error looks weird:
/Users/chris/Documents/Development/Busbud/napi/node_modules/.bin/touch: line 1: syntax error near unexpected token
(' /Users/chris/Documents/Development/Busbud/napi/node_modules/.bin/touch: line 1:
var touch = require("../touch")' make: *\ [Release/obj.target/addon/src/connection.o] Error 2
Particularly the syntax error in a ./touch
javascript file. I don't know where the file is coming from or why there's a syntax error in it. Dumb question...but have you done a rm -rf node_modules && npm i
? Sometimes this unfortunately helps.
Yes I have. I can give it another shot today with Node latest.
I just reverified I can compile on node@6.1
and node@6.2
- I saw the same error @samdj had until I deleted node_modules
and reinstalled, but everything else worked without a hitch.
The only other thing I can think of is maybe npm i
isn't setting up the path to node-gyp
properly when its running so when it attempts to execute a build the node-gyp
command is missing. Can you try cloning this module and running npm i && npm test
from the root of the project dir?
If that fails try doing these commands from the root of the project dir:
npm i node-gyp
export PATH=$PATH:node_modules/.bin
which node-gyp
node-gyp rebuild
npm i
And see which ones fail
I feel like this might be some weird environment issue
I'm running into issues when compiling libpq 1.8.2 (through pg-native 1.10.0) on both 6.0.0 and 6.1.0. Node 6 seems to be covered in your CI tests so I'm not sure why it's failing here. Here's the logs from
npm-debug.log
.This is on OS X running node 6.1.0 and npm 3.8.6.