2013-09-12 2 views
0

Попытка установить pg. Вот полный лог:: использование незаявленного идентификатора 'NODE_PSYMBOL'

$ npm install pg --save 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm http GET https://registry.npmjs.org/pg 
npm http 304 https://registry.npmjs.org/pg 
npm http GET https://registry.npmjs.org/generic-pool/2.0.3 
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0 
npm http 304 https://registry.npmjs.org/generic-pool/2.0.3 
npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0 
npm http GET https://registry.npmjs.org/cloned/0.0.1 
npm http GET https://registry.npmjs.org/async 
npm http 304 https://registry.npmjs.org/cloned/0.0.1 
npm http 304 https://registry.npmjs.org/async 
npm http GET https://registry.npmjs.org/rmdir 
npm http 304 https://registry.npmjs.org/rmdir 

> [email protected] install /Users/David/Developer/hs-app/node_modules/pg 
> node-gyp rebuild || (exit 0) 

    CXX(target) Release/obj.target/binding/src/binding.o 
../src/binding.cc:49:51: warning: 'New' is deprecated [-Wdeprecated-declarations] 
    Local<FunctionTemplate> t = FunctionTemplate::New(New); 
               ^
../src/binding.cc:54:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    emit_symbol = NODE_PSYMBOL("emit"); 
       ^
../src/binding.cc:55:23: error: use of undeclared identifier 'NODE_PSYMBOL' 
    severity_symbol = NODE_PSYMBOL("severity"); 
        ^
../src/binding.cc:56:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    code_symbol = NODE_PSYMBOL("code"); 
       ^
../src/binding.cc:57:21: error: use of undeclared identifier 'NODE_PSYMBOL' 
    detail_symbol = NODE_PSYMBOL("detail"); 
        ^
../src/binding.cc:58:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    hint_symbol = NODE_PSYMBOL("hint"); 
       ^
../src/binding.cc:59:23: error: use of undeclared identifier 'NODE_PSYMBOL' 
    position_symbol = NODE_PSYMBOL("position"); 
        ^
../src/binding.cc:60:31: error: use of undeclared identifier 'NODE_PSYMBOL' 
    internalPosition_symbol = NODE_PSYMBOL("internalPosition"); 
          ^
../src/binding.cc:61:28: error: use of undeclared identifier 'NODE_PSYMBOL' 
    internalQuery_symbol = NODE_PSYMBOL("internalQuery"); 
         ^
../src/binding.cc:62:20: error: use of undeclared identifier 'NODE_PSYMBOL' 
    where_symbol = NODE_PSYMBOL("where"); 
       ^
../src/binding.cc:63:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    file_symbol = NODE_PSYMBOL("file"); 
       ^
../src/binding.cc:64:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    line_symbol = NODE_PSYMBOL("line"); 
       ^
../src/binding.cc:65:22: error: use of undeclared identifier 'NODE_PSYMBOL' 
    routine_symbol = NODE_PSYMBOL("routine"); 
        ^
../src/binding.cc:66:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    name_symbol = NODE_PSYMBOL("name"); 
       ^
../src/binding.cc:67:20: error: use of undeclared identifier 'NODE_PSYMBOL' 
    value_symbol = NODE_PSYMBOL("value"); 
       ^
../src/binding.cc:68:19: error: use of undeclared identifier 'NODE_PSYMBOL' 
    type_symbol = NODE_PSYMBOL("dataTypeID"); 
       ^
../src/binding.cc:69:22: error: use of undeclared identifier 'NODE_PSYMBOL' 
    channel_symbol = NODE_PSYMBOL("channel"); 
        ^
../src/binding.cc:70:22: error: use of undeclared identifier 'NODE_PSYMBOL' 
    payload_symbol = NODE_PSYMBOL("payload"); 
        ^
../src/binding.cc:71:22: error: use of undeclared identifier 'NODE_PSYMBOL' 
    command_symbol = NODE_PSYMBOL("command"); 
        ^
../src/binding.cc:73:45: error: address of overloaded function 'Connect' does not match required type 'void (const v8::FunctionCallbackInfo<v8::Value> &)' 
    NODE_SET_PROTOTYPE_METHOD(t, "connect", Connect); 
              ^~~~~~~ 
../src/binding.cc:447:8: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const char *') 
    bool Connect(const char* conninfo) 
    ^
../src/binding.cc:107:3: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const v8::Arguments &') 
    Connect(const Arguments& args) 
^
/Users/David/.node-gyp/0.11.4/src/node.h:152:60: note: passing argument to parameter 'callback' here 
             v8::FunctionCallback callback) { 
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=] 
1 warning and 20 errors generated. 
make: *** [Release/obj.target/binding/src/binding.o] Error 1 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:103:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:789:12) 
gyp ERR! System Darwin 12.4.0 
gyp ERR! command "node" "/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/David/Developer/hs-app/node_modules/pg 
gyp ERR! node -v v0.11.4 
gyp ERR! node-gyp -v v0.10.9 
gyp ERR! not ok 
[email protected] node_modules/pg 
├── [email protected] 
└── [email protected] ([email protected], [email protected]) 

ответ

0

сопровождающему node-postgres, Brian C, ответил следующее в issue I had opened на GitHub:

Родные привязок обыкновение собираться на v.0.11.x еще. Каждая второстепенная версия за последние 4 года существенно изменила уровень C/C++, и встроенные привязки всегда прерываются. Я не собираюсь исправлять их до тех пор, пока не будет ближе к выпуску v0.12.0, потому что код по-прежнему находится в потоке на конце узла и снова сломается.

Хорошие новости, вы не обливало:

  1. использования неродных привязок (require('pg')), который установлен, даже если компиляция завершится неудачно
  2. использовать узел v0.10.x
Смежные вопросы