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

npm install fails on FreeBSD 9.0 #61

Closed
tfar opened this issue Feb 6, 2013 · 9 comments
Closed

npm install fails on FreeBSD 9.0 #61

tfar opened this issue Feb 6, 2013 · 9 comments

Comments

@tfar
Copy link

tfar commented Feb 6, 2013

Probably forgot -I/usr/local/include or something like that, since expat.h is there at:

#head /usr/local/include/expat.h 
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
   See the file COPYING for copying permission.
*/

#ifndef Expat_INCLUDED
#define Expat_INCLUDED 1
# npm install node-expat
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat

> node-expat@2.0.0 install /root/node_modules/node-expat
> node-gyp rebuild

gmake: Entering directory `/root/node_modules/node-expat/build'
  CXX(target) Release/obj.target/node_expat/node-expat.o
../node-expat.cc:6:19: warning: expat.h: No such file or directory
../node-expat.cc:71: error: expected ',' or '...' before '*' token
../node-expat.cc:71: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:191: error: 'XML_Char' has not been declared
../node-expat.cc:261: error: 'XML_Char' has not been declared
../node-expat.cc:265: error: ISO C++ forbids declaration of 'XML_LChar' with no type
../node-expat.cc:265: error: expected ';' before '*' token
../node-expat.cc:272: error: expected `;' before 'static'
../node-expat.cc:313: error: 'XML_Parser' does not name a type
../node-expat.cc:322: error: expected ',' or '...' before '*' token
../node-expat.cc:322: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:339: error: expected ',' or '...' before '*' token
../node-expat.cc:339: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:367: error: expected ',' or '...' before '*' token
../node-expat.cc:367: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:378: error: expected ',' or '...' before '*' token
../node-expat.cc:378: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:390: error: expected ',' or '...' before '*' token
../node-expat.cc:390: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:400: error: expected ',' or '...' before '*' token
../node-expat.cc:401: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:413: error: expected ',' or '...' before '*' token
../node-expat.cc:415: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::New(const v8::Arguments&)':
../node-expat.cc:57: error: 'XML_Char' was not declared in this scope
../node-expat.cc:57: error: expected primary-expression before '=' token
../node-expat.cc:60: error: expected unqualified-id before '=' token
../node-expat.cc:61: error: expected primary-expression before ',' token
../node-expat.cc:64: error: expected primary-expression before ')' token
../node-expat.cc:65: error: expected primary-expression before ')' token
../node-expat.cc:66: error: expected primary-expression before ';' token
../node-expat.cc: In constructor 'Parser::Parser(int)':
../node-expat.cc:74: error: 'parser' was not declared in this scope
../node-expat.cc:74: error: expected primary-expression before ')' token
../node-expat.cc:74: error: 'XML_ParserCreate' was not declared in this scope
../node-expat.cc: In destructor 'virtual Parser::~Parser()':
../node-expat.cc:82: error: 'parser' was not declared in this scope
../node-expat.cc:82: error: 'XML_ParserFree' was not declared in this scope
../node-expat.cc: In member function 'void Parser::attachHandlers()':
../node-expat.cc:87: error: 'parser' was not declared in this scope
../node-expat.cc:87: error: 'XML_SetUserData' was not declared in this scope
../node-expat.cc:88: error: 'XML_SetElementHandler' was not declared in this scope
../node-expat.cc:89: error: 'XML_SetCharacterDataHandler' was not declared in this scope
../node-expat.cc:90: error: 'XML_SetCdataSectionHandler' was not declared in this scope
../node-expat.cc:91: error: 'XML_SetProcessingInstructionHandler' was not declared in this scope
../node-expat.cc:92: error: 'XML_SetCommentHandler' was not declared in this scope
../node-expat.cc:93: error: 'XML_SetXmlDeclHandler' was not declared in this scope
../node-expat.cc:94: error: 'XML_SetEntityDeclHandler' was not declared in this scope
../node-expat.cc: In member function 'bool Parser::parseString(v8::String&, int)':
../node-expat.cc:149: error: 'parser' was not declared in this scope
../node-expat.cc:149: error: 'XML_GetBuffer' was not declared in this scope
../node-expat.cc:153: error: 'XML_ParseBuffer' was not declared in this scope
../node-expat.cc:153: error: 'XML_STATUS_ERROR' was not declared in this scope
../node-expat.cc: In member function 'bool Parser::parseBuffer(v8::Local<v8::Object>, int)':
../node-expat.cc:165: error: 'parser' was not declared in this scope
../node-expat.cc:165: error: 'XML_Parse' was not declared in this scope
../node-expat.cc:165: error: 'XML_STATUS_ERROR' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::SetEncoding(const v8::Arguments&)':
../node-expat.cc:178: error: 'XML_Char' was not declared in this scope
../node-expat.cc:178: error: expected primary-expression before '=' token
../node-expat.cc:178: error: expected type-specifier before 'XML_Char'
../node-expat.cc:178: error: expected `;' before 'XML_Char'
../node-expat.cc:179: error: expected primary-expression before ',' token
../node-expat.cc:181: error: expected primary-expression before ')' token
../node-expat.cc:183: error: expected primary-expression before ';' token
../node-expat.cc: In member function 'int Parser::setEncoding(int*)':
../node-expat.cc:193: error: 'parser' was not declared in this scope
../node-expat.cc:193: error: 'XML_SetEncoding' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::GetError(const v8::Arguments&)':
../node-expat.cc:203: error: expected initializer before '*' token
../node-expat.cc:204: error: 'error' was not declared in this scope
../node-expat.cc:201: warning: unused variable 'parser'
../node-expat.cc: In member function 'int Parser::stop()':
../node-expat.cc:224: error: 'parser' was not declared in this scope
../node-expat.cc:224: error: 'XML_TRUE' was not declared in this scope
../node-expat.cc:224: error: 'XML_StopParser' was not declared in this scope
../node-expat.cc: In member function 'int Parser::resume()':
../node-expat.cc:241: error: 'parser' was not declared in this scope
../node-expat.cc:241: error: 'XML_ResumeParser' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::Reset(const v8::Arguments&)':
../node-expat.cc:248: error: 'XML_Char' was not declared in this scope
../node-expat.cc:248: error: expected primary-expression before '=' token
../node-expat.cc:251: error: expected unqualified-id before '=' token
../node-expat.cc:252: error: expected primary-expression before ',' token
../node-expat.cc:255: error: expected primary-expression before ')' token
../node-expat.cc: In member function 'int Parser::reset(int*)':
../node-expat.cc:263: error: 'parser' was not declared in this scope
../node-expat.cc:263: error: 'XML_ParserReset' was not declared in this scope
../node-expat.cc: In member function 'uint32_t Parser::getCurrentLineNumber()':
../node-expat.cc:282: error: 'parser' was not declared in this scope
../node-expat.cc:282: error: 'XML_GetCurrentLineNumber' was not declared in this scope
../node-expat.cc: In member function 'uint32_t Parser::getCurrentColumnNumber()':
../node-expat.cc:295: error: 'parser' was not declared in this scope
../node-expat.cc:295: error: 'XML_GetCurrentColumnNumber' was not declared in this scope
../node-expat.cc: In member function 'int32_t Parser::getCurrentByteIndex()':
../node-expat.cc:308: error: 'parser' was not declared in this scope
../node-expat.cc:308: error: 'XML_GetCurrentByteIndex' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::StartElement(void*, int)':
../node-expat.cc:328: error: expected initializer before '*' token
../node-expat.cc:328: error: 'atts1' was not declared in this scope
../node-expat.cc:333: error: 'name' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::EndElement(void*, int)':
../node-expat.cc:344: error: 'name' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::Text(void*, int)':
../node-expat.cc:373: error: 's' was not declared in this scope
../node-expat.cc:373: error: 'len' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::ProcessingInstruction(void*, int)':
../node-expat.cc:384: error: 'target' was not declared in this scope
../node-expat.cc:385: error: 'data' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::Comment(void*, int)':
../node-expat.cc:395: error: 'data' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::XmlDecl(void*, int)':
../node-expat.cc:407: error: 'version' was not declared in this scope
../node-expat.cc:408: error: expected primary-expression before '?' token
../node-expat.cc:408: error: expected primary-expression before ')' token
../node-expat.cc:409: error: 'standalone' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::EntityDecl(void*, int)':
../node-expat.cc:421: error: 'entityName' was not declared in this scope
../node-expat.cc:422: error: 'is_parameter_entity' was not declared in this scope
../node-expat.cc:423: error: 'value' was not declared in this scope
../node-expat.cc:423: error: 'value_length' was not declared in this scope
../node-expat.cc:424: error: 'base' was not declared in this scope
../node-expat.cc:425: error: 'systemId' was not declared in this scope
../node-expat.cc:426: error: 'publicId' was not declared in this scope
../node-expat.cc:427: error: 'notationName' was not declared in this scope
gmake: *** [Release/obj.target/node_expat/node-expat.o] Error 1
gmake: Leaving directory `/root/node_modules/node-expat/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System FreeBSD 9.0-RELEASE-p4
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/node_modules/node-expat
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.3
gyp ERR! not ok 
npm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System FreeBSD 9.0-RELEASE-p4
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-expat"
npm ERR! cwd /root
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.4
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0
@TooTallNate
Copy link
Contributor

Can you try to recompile, this time with the V=1 env variable set as well so that we can see the commands being run?

@jimX11
Copy link

jimX11 commented Mar 6, 2013

I pigtailed the FreeBSD issue in #61 with Issue #60. @TooTallNate does the info below help?

Same error using node 0.8.21, npm 1.2.12.

[jjm@rocky:~/src] export V=1 && npm -d install node-expat
npm info it worked if it ends with ok
npm info using npm@1.2.12
npm info using node@v0.8.21
npm info trying registry request attempt 1 at 10:27:14
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat
npm info install node-expat@2.0.0 into /usr/home/jjm/src
npm info installOne node-expat@2.0.0
npm info /usr/home/jjm/src/node_modules/node-expat unbuild
npm info preinstall node-expat@2.0.0
npm info build /usr/home/jjm/src/node_modules/node-expat
npm info linkStuff node-expat@2.0.0
npm info install node-expat@2.0.0

> node-expat@2.0.0 install /usr/home/jjm/src/node_modules/node-expat
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.4
gyp info using node@0.8.21 | freebsd | ia32
gyp info spawn python
gyp info spawn args [ '/usr/home/jjm/src/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/jjm/src/node_modules/node-expat/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/jjm/src/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/jjm/.node-gyp/0.8.21/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/jjm/.node-gyp/0.8.21',
gyp info spawn args   '-Dmodule_root_dir=/usr/home/jjm/src/node_modules/node-expat',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gmake: Entering directory `/usr/home/jjm/src/node_modules/node-expat/build'
gyp  cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlparse.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmlparse.o ../deps/libexpat/lib/xmlparse.c
 info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmltok.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmltok.o ../deps/libexpat/lib/xmltok.c
  cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlrole.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o ../deps/libexpat/lib/xmlrole.c
  rm -f Release/obj.target/deps/libexpat/libexpat.a && ar crsT Release/obj.target/deps/libexpat/libexpat.a Release/obj.target/expat/deps/libexpat/lib/xmlparse.o Release/obj.target/expat/deps/libexpat/lib/xmltok.o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/node_expat/node-expat.o.d.raw  -c -o Release/obj.target/node_expat/node-expat.o ../node-expat.cc
  lockf ./Release/linker.lock g++ -shared -pthread -rdynamic -m32  -Wl,-soname=node_expat.node -o Release/obj.target/node_expat.node -Wl,--start-group Release/obj.target/node_expat/node-expat.o Release/obj.target/deps/libexpat/libexpat.a -Wl,--end-group 
/usr/bin/ld:Release/obj.target/deps/libexpat/libexpat.a: file format not recognized; treating as linker script
/usr/bin/ld:Release/obj.target/deps/libexpat/libexpat.a:1: syntax error
gmake: *** [Release/obj.target/node_expat.node] Error 1
gmake: Leaving directory `/usr/home/jjm/src/node_modules/node-expat/build
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/home/jjm/src/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System FreeBSD 9.1-RELEASE
gyp ERR! command "node" "/usr/home/jjm/src/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/home/jjm/src/node_modules/node-expat
gyp ERR! node -v v0.8.21
gyp ERR! node-gyp -v v0.8.4
gyp ERR! not ok 
npm info node-expat@2.0.0 Failed to exec install script
npm info /usr/home/jjm/src/node_modules/node-expat unbuild
npm info preuninstall node-expat@2.0.0
npm info uninstall node-expat@2.0.0
npm info postuninstall node-expat@2.0.0
npm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System FreeBSD 9.1-RELEASE
npm ERR! command "node" "/usr/local/bin/npm" "-d" "install" "node-expat"
npm ERR! cwd /usr/home/jjm/src
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.2.12
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/home/jjm/src/npm-debug.log
npm ERR! not ok code 0

@jimX11
Copy link

jimX11 commented Mar 12, 2013

Install works! Thanks someone!

[jjm@rocky ~/src]$ npm -d install node-expat
npm info it worked if it ends with ok
npm info using npm@1.2.12
npm info using node@v0.8.21
npm info trying registry request attempt 1 at 15:51:56
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat
npm info install node-expat@2.0.0 into /usr/home/jjm/src
npm info installOne node-expat@2.0.0
npm info /usr/home/jjm/src/node_modules/node-expat unbuild
npm info preuninstall node-expat@2.0.0
npm info uninstall node-expat@2.0.0
npm info postuninstall node-expat@2.0.0
npm info preinstall node-expat@2.0.0
npm info build /usr/home/jjm/src/node_modules/node-expat
npm info linkStuff node-expat@2.0.0
npm info install node-expat@2.0.0

> node-expat@2.0.0 install /usr/home/jjm/src/node_modules/node-expat
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@0.9.1
gyp info using node@0.8.21 | freebsd | ia32
gyp info spawn python
gyp info spawn args [ '/usr/home/jjm/src/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/jjm/src/node_modules/node-expat/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/jjm/src/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/jjm/.node-gyp/0.8.21/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/jjm/.node-gyp/0.8.21',
gyp info spawn args   '-Dmodule_root_dir=/usr/home/jjm/src/node_modules/node-expat',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gmake: Entering directory `/usr/home/jjm/src/node_modules/node-expat/build'
gyp   cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlparse.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmlparse.o ../deps/libexpat/lib/xmlparse.c
info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmltok.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmltok.o ../deps/libexpat/lib/xmltok.c
  cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink  -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlrole.o.d.raw  -c -o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o ../deps/libexpat/lib/xmlrole.c
  rm -f Release/obj.target/deps/libexpat/libexpat.a && ar crs Release/obj.target/deps/libexpat/libexpat.a Release/obj.target/expat/deps/libexpat/lib/xmlparse.o Release/obj.target/expat/deps/libexpat/lib/xmltok.o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  ln -f "Release/obj.target/deps/libexpat/libexpat.a" "Release/libexpat.a" 2>/dev/null || (rm -rf "Release/libexpat.a" && cp -af "Release/obj.target/deps/libexpat/libexpat.a" "Release/libexpat.a")
  g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/jjm/.node-gyp/0.8.21/src -I/home/jjm/.node-gyp/0.8.21/deps/uv/include -I/home/jjm/.node-gyp/0.8.21/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib  -fPIC -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/node_expat/node-expat.o.d.raw  -c -o Release/obj.target/node_expat/node-expat.o ../node-expat.cc
  lockf ./Release/linker.lock g++ -shared -pthread -rdynamic -m32  -Wl,-soname=node_expat.node -o Release/obj.target/node_expat.node -Wl,--start-group Release/obj.target/node_expat/node-expat.o Release/obj.target/deps/libexpat/libexpat.a -Wl,--end-group 
  ln -f "Release/obj.target/node_expat.node" "Release/node_expat.node" 2>/dev/null || (rm -rf "Release/node_expat.node" && cp -af "Release/obj.target/node_expat.node" "Release/node_expat.node")
gmake: Leaving directory `/usr/home/jjm/src/node_modules/node-expat/build'
gyp info ok 
npm info postinstall node-expat@2.0.0
node-expat@2.0.0 node_modules/node-expat
npm info ok

@tfar
Copy link
Author

tfar commented Mar 14, 2013

Still failing for me.

% npm -d install node-expat
npm info it worked if it ends with ok
npm info using npm@1.2.12
npm info using node@v0.8.21
npm info trying registry request attempt 1 at 14:37:23
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat
npm info install node-expat@2.0.0 into /tmp
npm info installOne node-expat@2.0.0
npm info /tmp/node_modules/node-expat unbuild
npm info preinstall node-expat@2.0.0
npm info build /tmp/node_modules/node-expat
npm info linkStuff node-expat@2.0.0
npm info install node-expat@2.0.0

node-expat@2.0.0 install /tmp/node_modules/node-expat
node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.3
gyp info using node@0.8.21 | freebsd | x64
gyp http GET http://nodejs.org/dist/v0.8.21/node-v0.8.21.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.21/node-v0.8.21.tar.gz
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/tmp/node_modules/node-expat/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/tfar/.node-gyp/0.8.21/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/tfar/.node-gyp/0.8.21',
gyp info spawn args '-Dmodule_root_dir=/tmp/node_modules/node-expat',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory /tmp/node_modules/node-expat/build' CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o AR(target) Release/obj.target/deps/libexpat/libexpat.a CXX(target) Release/obj.target/node_expat/node-expat.o SOLINK_MODULE(target) Release/obj.target/node_expat.node /usr/bin/ld:Release/obj.target/deps/libexpat/libexpat.a: file format not recognized; treating as linker script /usr/bin/ld:Release/obj.target/deps/libexpat/libexpat.a:1: syntax error gmake: *** [Release/obj.target/node_expat.node] Error 1 gmake: Leaving directory/tmp/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: gmake failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System FreeBSD 9.0-RELEASE-p4
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /tmp/node_modules/node-expat
gyp ERR! node -v v0.8.21
gyp ERR! node-gyp -v v0.8.3
gyp ERR! not ok
npm info node-expat@2.0.0 Failed to exec install script
npm info /tmp/node_modules/node-expat unbuild
npm info preuninstall node-expat@2.0.0
npm info uninstall node-expat@2.0.0
npm info postuninstall node-expat@2.0.0
npm ERR! node-expat@2.0.0 install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System FreeBSD 9.0-RELEASE-p4
npm ERR! command "node" "/usr/local/bin/npm" "-d" "install" "node-expat"
npm ERR! cwd /tmp
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.2.12
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm-debug.log
npm ERR! not ok code 0

@jimX11
Copy link

jimX11 commented Mar 15, 2013

@tfar, the install failed for both of us when using a node-gyp version of 0.8.something. My install failed, then I upgraded node-gyp to 0.9.1 from 0.8.something. After the node-gyp upgrade, the node-expat install worked. Maybe that'll work for you too, upgrade node-gyp to 0.9.1 and try again.

npm -d install node-gyp

@tfar
Copy link
Author

tfar commented Mar 15, 2013

Just tried it...see below:

# npm -d install node-gyp
npm info it worked if it ends with ok
npm info using npm@1.2.12
npm info using node@v0.8.21
npm info trying registry request attempt 1 at 16:03:45
npm http GET https://registry.npmjs.org/node-gyp
npm http 200 https://registry.npmjs.org/node-gyp
npm info retry fetch attempt 1 at 16:03:59
npm http GET https://registry.npmjs.org/node-gyp/-/node-gyp-0.9.1.tgz
npm http 200 https://registry.npmjs.org/node-gyp/-/node-gyp-0.9.1.tgz
npm info shasum 0d70b01012f942c60a7b7fc502159f9d6e4e3f7e
npm info shasum /root/tmp/npm-16793/1363359839469-0.699536481872201/tmp.tgz
npm info shasum 47dd3ac40425fd01ccf807fcaed1d56d0349b5b9
npm info shasum /root/.npm/node-gyp/0.9.1/package.tgz
npm info install node-gyp@0.9.1 into /root
npm info installOne node-gyp@0.9.1
npm info /root/node_modules/node-gyp unbuild
npm info preinstall node-gyp@0.9.1
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/graceful-fs
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/glob
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/fstream
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/mkdirp
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/minimatch
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/npmlog
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/osenv
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/nopt
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/rimraf
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/tar
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/which
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/request
npm info trying registry request attempt 1 at 16:04:16
npm http GET https://registry.npmjs.org/semver
npm http 200 https://registry.npmjs.org/graceful-fs
npm http 200 https://registry.npmjs.org/mkdirp
npm info retry fetch attempt 1 at 16:04:22
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/fstream
npm http 200 https://registry.npmjs.org/glob
npm info retry fetch attempt 1 at 16:04:25
npm http GET https://registry.npmjs.org/glob/-/glob-3.1.21.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/npmlog
npm http 200 https://registry.npmjs.org/osenv
npm http 200 https://registry.npmjs.org/minimatch
npm info retry fetch attempt 1 at 16:04:27
npm http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.11.tgz
npm http 200 https://registry.npmjs.org/nopt
npm http 200 https://registry.npmjs.org/tar
npm info retry fetch attempt 1 at 16:04:28
npm http GET https://registry.npmjs.org/tar/-/tar-0.1.16.tgz
npm http 200 https://registry.npmjs.org/which
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/glob/-/glob-3.1.21.tgz
npm http 200 https://registry.npmjs.org/semver
npm info retry fetch attempt 1 at 16:04:30
npm http GET https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
npm http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.11.tgz
npm info shasum de3e5f8961c88c787ee1368df849ac4413eca8d7
npm info shasum /root/tmp/npm-16793/1363359862536-0.3177286167629063/tmp.tgz
npm info shasum b9d384dcdcfb81dad54faba07dbc94ad5d1718c6
npm info shasum /root/.npm/mkdirp/0.3.5/package.tgz
npm info shasum d29e0a055dea5138f4d07ed40e8982e83c2066cd
npm info shasum /root/tmp/npm-16793/1363359865018-0.6920507664326578/tmp.tgz
npm info shasum 0dc06172d8ccedad47c2364eda6e8a2d6bd4f737
npm info shasum /root/.npm/glob/3.1.21/package.tgz
npm info shasum a0ef5fa776aa6fbd3ce1ebb74efb8a48c6abf4db
npm info shasum /root/tmp/npm-16793/1363359867461-0.5988371779676527/tmp.tgz
npm info shasum 02a7f21164c94c186b6502008c19fb7c785715f9
npm info shasum /root/.npm/minimatch/0.2.11/package.tgz
npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.16.tgz
npm http 200 https://registry.npmjs.org/semver/-/semver-1.1.4.tgz
npm info shasum 2e5a4e72bab03472cc97f72753b4508912ef5540
npm info shasum /root/tmp/npm-16793/1363359870237-0.6962587414309382/tmp.tgz
npm info shasum cc31fdde68c969a718f8eb7ac30b5aea841ca015
npm info shasum /root/.npm/semver/1.1.4/package.tgz
npm info shasum 4e0d9cd1fe08c9cfd1e6edb497153d1636617fee
npm info shasum /root/tmp/npm-16793/1363359868584-0.7168067991733551/tmp.tgz
npm info shasum 2da4c2ee3ffb2d5a8fa6e2f63b06bba08203c743
npm info shasum /root/.npm/tar/0.1.16/package.tgz
npm http 200 https://registry.npmjs.org/request
npm info install graceful-fs@1.2.0 into /root/node_modules/node-gyp
npm info install fstream@0.1.22 into /root/node_modules/node-gyp
npm info install rimraf@2.1.4 into /root/node_modules/node-gyp
npm info install npmlog@0.0.2 into /root/node_modules/node-gyp
npm info install osenv@0.0.3 into /root/node_modules/node-gyp
npm info install nopt@2.1.1 into /root/node_modules/node-gyp
npm info install which@1.0.5 into /root/node_modules/node-gyp
npm info install mkdirp@0.3.5 into /root/node_modules/node-gyp
npm info install glob@3.1.21 into /root/node_modules/node-gyp
npm info install minimatch@0.2.11 into /root/node_modules/node-gyp
npm info install semver@1.1.4 into /root/node_modules/node-gyp
npm info install tar@0.1.16 into /root/node_modules/node-gyp
npm info install request@2.9.203 into /root/node_modules/node-gyp
npm info installOne graceful-fs@1.2.0
npm info installOne fstream@0.1.22
npm info installOne rimraf@2.1.4
npm info installOne npmlog@0.0.2
npm info installOne osenv@0.0.3
npm info installOne nopt@2.1.1
npm info installOne which@1.0.5
npm info installOne mkdirp@0.3.5
npm info installOne glob@3.1.21
npm info installOne minimatch@0.2.11
npm info installOne semver@1.1.4
npm info installOne tar@0.1.16
npm info installOne request@2.9.203
npm info /root/node_modules/node-gyp/node_modules/graceful-fs unbuild
npm info /root/node_modules/node-gyp/node_modules/fstream unbuild
npm info /root/node_modules/node-gyp/node_modules/rimraf unbuild
npm info /root/node_modules/node-gyp/node_modules/npmlog unbuild
npm info /root/node_modules/node-gyp/node_modules/osenv unbuild
npm info /root/node_modules/node-gyp/node_modules/nopt unbuild
npm info /root/node_modules/node-gyp/node_modules/which unbuild
npm info /root/node_modules/node-gyp/node_modules/mkdirp unbuild
npm info /root/node_modules/node-gyp/node_modules/glob unbuild
npm info /root/node_modules/node-gyp/node_modules/minimatch unbuild
npm info /root/node_modules/node-gyp/node_modules/semver unbuild
npm info /root/node_modules/node-gyp/node_modules/tar unbuild
npm info /root/node_modules/node-gyp/node_modules/request unbuild
npm info preinstall which@1.0.5
npm info preinstall osenv@0.0.3
npm info preinstall graceful-fs@1.2.0
npm info preinstall rimraf@2.1.4
npm info preinstall npmlog@0.0.2
npm info preinstall semver@1.1.4
npm info preinstall nopt@2.1.1
npm info preinstall minimatch@0.2.11
npm info preinstall mkdirp@0.3.5
npm info preinstall glob@3.1.21
npm info preinstall fstream@0.1.22
npm info preinstall tar@0.1.16
npm info build /root/node_modules/node-gyp/node_modules/which
npm info build /root/node_modules/node-gyp/node_modules/osenv
npm info build /root/node_modules/node-gyp/node_modules/graceful-fs
npm info build /root/node_modules/node-gyp/node_modules/rimraf
npm info build /root/node_modules/node-gyp/node_modules/semver
npm info build /root/node_modules/node-gyp/node_modules/mkdirp
npm info linkStuff which@1.0.5
npm info linkStuff osenv@0.0.3
npm info linkStuff graceful-fs@1.2.0
npm info linkStuff rimraf@2.1.4
npm info linkStuff semver@1.1.4
npm info linkStuff mkdirp@0.3.5
npm info install osenv@0.0.3
npm info install graceful-fs@1.2.0
npm info install rimraf@2.1.4
npm info install mkdirp@0.3.5
npm info postinstall osenv@0.0.3
npm info postinstall graceful-fs@1.2.0
npm info postinstall rimraf@2.1.4
npm info postinstall mkdirp@0.3.5
npm info install which@1.0.5
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/abbrev
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/ansi
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/sigmund
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/inherits
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/inherits
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/lru-cache
npm info install semver@1.1.4
npm info postinstall which@1.0.5
npm info postinstall semver@1.1.4
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/inherits
npm info trying registry request attempt 1 at 16:04:40
npm http GET https://registry.npmjs.org/block-stream
npm info preinstall request@2.9.203
npm info build /root/node_modules/node-gyp/node_modules/request
npm info linkStuff request@2.9.203
npm info install request@2.9.203
npm info postinstall request@2.9.203
npm http 200 https://registry.npmjs.org/ansi
npm http 200 https://registry.npmjs.org/sigmund
npm info install ansi@0.1.2 into /root/node_modules/node-gyp/node_modules/npmlog
npm info installOne ansi@0.1.2
npm info /root/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi unbuild
npm info preinstall ansi@0.1.2
npm info build /root/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi
npm info linkStuff ansi@0.1.2
npm info install ansi@0.1.2
npm info postinstall ansi@0.1.2
npm info build /root/node_modules/node-gyp/node_modules/npmlog
npm info linkStuff npmlog@0.0.2
npm info install npmlog@0.0.2
npm info postinstall npmlog@0.0.2
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/inherits
npm info install inherits@1.0.0 into /root/node_modules/node-gyp/node_modules/glob
npm info installOne inherits@1.0.0
npm info install inherits@1.0.0 into /root/node_modules/node-gyp/node_modules/fstream
npm info installOne inherits@1.0.0
npm info /root/node_modules/node-gyp/node_modules/glob/node_modules/inherits unbuild
npm info /root/node_modules/node-gyp/node_modules/fstream/node_modules/inherits unbuild
npm http 200 https://registry.npmjs.org/abbrev
npm info preinstall inherits@1.0.0
npm info install abbrev@1.0.4 into /root/node_modules/node-gyp/node_modules/nopt
npm info installOne abbrev@1.0.4
npm info /root/node_modules/node-gyp/node_modules/nopt/node_modules/abbrev unbuild
npm info build /root/node_modules/node-gyp/node_modules/glob/node_modules/inherits
npm info linkStuff inherits@1.0.0
npm info install inherits@1.0.0
npm info postinstall inherits@1.0.0
npm info build /root/node_modules/node-gyp/node_modules/glob
npm info preinstall inherits@1.0.0
npm info linkStuff glob@3.1.21
npm info install glob@3.1.21
npm info postinstall glob@3.1.21
npm info build /root/node_modules/node-gyp/node_modules/fstream/node_modules/inherits
npm info linkStuff inherits@1.0.0
npm info install inherits@1.0.0
npm info postinstall inherits@1.0.0
npm info build /root/node_modules/node-gyp/node_modules/fstream
npm info linkStuff fstream@0.1.22
npm info install fstream@0.1.22
npm info postinstall fstream@0.1.22
npm info preinstall abbrev@1.0.4
npm info build /root/node_modules/node-gyp/node_modules/nopt/node_modules/abbrev
npm info linkStuff abbrev@1.0.4
npm info install abbrev@1.0.4
npm info postinstall abbrev@1.0.4
npm info build /root/node_modules/node-gyp/node_modules/nopt
npm info linkStuff nopt@2.1.1
npm info install nopt@2.1.1
npm info postinstall nopt@2.1.1
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/lru-cache
npm info retry fetch attempt 1 at 16:04:49
npm http GET https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.2.tgz
npm http 200 https://registry.npmjs.org/block-stream
npm info install inherits@1.0.0 into /root/node_modules/node-gyp/node_modules/tar
npm info install block-stream@0.0.6 into /root/node_modules/node-gyp/node_modules/tar
npm info installOne inherits@1.0.0
npm info installOne block-stream@0.0.6
npm info /root/node_modules/node-gyp/node_modules/tar/node_modules/inherits unbuild
npm info /root/node_modules/node-gyp/node_modules/tar/node_modules/block-stream unbuild
npm info preinstall inherits@1.0.0
npm info build /root/node_modules/node-gyp/node_modules/tar/node_modules/inherits
npm info linkStuff inherits@1.0.0
npm info install inherits@1.0.0
npm info postinstall inherits@1.0.0
npm info preinstall block-stream@0.0.6
npm info build /root/node_modules/node-gyp/node_modules/tar/node_modules/block-stream
npm info linkStuff block-stream@0.0.6
npm info install block-stream@0.0.6
npm info postinstall block-stream@0.0.6
npm info build /root/node_modules/node-gyp/node_modules/tar
npm info linkStuff tar@0.1.16
npm info install tar@0.1.16
npm info postinstall tar@0.1.16
npm http 200 https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.2.tgz
npm info shasum 62b95a10cc7f8d85f3737506fe82cdcf3fa04d4b
npm info shasum /root/tmp/npm-16793/1363359889914-0.12398952967487276/tmp.tgz
npm info shasum 784111599d1ba7b38ab55ecaad1287a2163ac47a
npm info shasum /root/.npm/lru-cache/2.2.2/package.tgz
npm info install sigmund@1.0.0 into /root/node_modules/node-gyp/node_modules/minimatch
npm info install lru-cache@2.2.2 into /root/node_modules/node-gyp/node_modules/minimatch
npm info installOne sigmund@1.0.0
npm info installOne lru-cache@2.2.2
npm info /root/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund unbuild
npm info /root/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache unbuild
npm info preinstall sigmund@1.0.0
npm info build /root/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund
npm info linkStuff sigmund@1.0.0
npm info install sigmund@1.0.0
npm info postinstall sigmund@1.0.0
npm info preinstall lru-cache@2.2.2
npm info build /root/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache
npm info linkStuff lru-cache@2.2.2
npm info install lru-cache@2.2.2
npm info postinstall lru-cache@2.2.2
npm info build /root/node_modules/node-gyp/node_modules/minimatch
npm info linkStuff minimatch@0.2.11
npm info install minimatch@0.2.11
npm info postinstall minimatch@0.2.11
npm info build /root/node_modules/node-gyp
npm info linkStuff node-gyp@0.9.1
npm WARN prefer global node-gyp@0.9.1 should be installed with -g
npm info install node-gyp@0.9.1
npm info postinstall node-gyp@0.9.1
node-gyp@0.9.1 node_modules/node-gyp
├── osenv@0.0.3
├── graceful-fs@1.2.0
├── rimraf@2.1.4
├── mkdirp@0.3.5
├── which@1.0.5
├── semver@1.1.4
├── request@2.9.203
├── npmlog@0.0.2 (ansi@0.1.2)
├── glob@3.1.21 (inherits@1.0.0)
├── fstream@0.1.22 (inherits@1.0.0)
├── nopt@2.1.1 (abbrev@1.0.4)
├── tar@0.1.16 (inherits@1.0.0, block-stream@0.0.6)
└── minimatch@0.2.11 (sigmund@1.0.0, lru-cache@2.2.2)
npm info ok 

# npm -d install node-expat
npm info it worked if it ends with ok
npm info using npm@1.2.12
npm info using node@v0.8.21
npm info trying registry request attempt 1 at 16:05:04
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat
npm info install node-expat@2.0.0 into /root
npm info installOne node-expat@2.0.0
npm info /root/node_modules/node-expat unbuild
npm info preinstall node-expat@2.0.0
npm info build /root/node_modules/node-expat
npm info linkStuff node-expat@2.0.0
npm info install node-expat@2.0.0

> node-expat@2.0.0 install /root/node_modules/node-expat
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@0.9.1
gyp info using node@0.8.21 | freebsd | x64
gyp info spawn python
gyp info spawn args [ '/root/node_modules/node-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/node_modules/node-expat/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/0.8.21/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/0.8.21',
gyp info spawn args   '-Dmodule_root_dir=/root/node_modules/node-expat',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory `/root/node_modules/node-expat/build'
  CXX(target) Release/obj.target/node_expat/node-expat.o
../node-expat.cc:6:19: warning: expat.h: No such file or directory
../node-expat.cc:71: error: expected ',' or '...' before '*' token
../node-expat.cc:71: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:191: error: 'XML_Char' has not been declared
../node-expat.cc:261: error: 'XML_Char' has not been declared
../node-expat.cc:265: error: ISO C++ forbids declaration of 'XML_LChar' with no type
../node-expat.cc:265: error: expected ';' before '*' token
../node-expat.cc:272: error: expected `;' before 'static'
../node-expat.cc:313: error: 'XML_Parser' does not name a type
../node-expat.cc:322: error: expected ',' or '...' before '*' token
../node-expat.cc:322: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:339: error: expected ',' or '...' before '*' token
../node-expat.cc:339: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:367: error: expected ',' or '...' before '*' token
../node-expat.cc:367: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:378: error: expected ',' or '...' before '*' token
../node-expat.cc:378: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:390: error: expected ',' or '...' before '*' token
../node-expat.cc:390: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:400: error: expected ',' or '...' before '*' token
../node-expat.cc:401: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc:413: error: expected ',' or '...' before '*' token
../node-expat.cc:415: error: ISO C++ forbids declaration of 'XML_Char' with no type
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::New(const v8::Arguments&)':
../node-expat.cc:57: error: 'XML_Char' was not declared in this scope
../node-expat.cc:57: error: expected primary-expression before '=' token
../node-expat.cc:60: error: expected unqualified-id before '=' token
../node-expat.cc:61: error: expected primary-expression before ',' token
../node-expat.cc:64: error: expected primary-expression before ')' token
../node-expat.cc:65: error: expected primary-expression before ')' token
../node-expat.cc:66: error: expected primary-expression before ';' token
../node-expat.cc: In constructor 'Parser::Parser(int)':
../node-expat.cc:74: error: 'parser' was not declared in this scope
../node-expat.cc:74: error: expected primary-expression before ')' token
../node-expat.cc:74: error: 'XML_ParserCreate' was not declared in this scope
../node-expat.cc: In destructor 'virtual Parser::~Parser()':
../node-expat.cc:82: error: 'parser' was not declared in this scope
../node-expat.cc:82: error: 'XML_ParserFree' was not declared in this scope
../node-expat.cc: In member function 'void Parser::attachHandlers()':
../node-expat.cc:87: error: 'parser' was not declared in this scope
../node-expat.cc:87: error: 'XML_SetUserData' was not declared in this scope
../node-expat.cc:88: error: 'XML_SetElementHandler' was not declared in this scope
../node-expat.cc:89: error: 'XML_SetCharacterDataHandler' was not declared in this scope
../node-expat.cc:90: error: 'XML_SetCdataSectionHandler' was not declared in this scope
../node-expat.cc:91: error: 'XML_SetProcessingInstructionHandler' was not declared in this scope
../node-expat.cc:92: error: 'XML_SetCommentHandler' was not declared in this scope
../node-expat.cc:93: error: 'XML_SetXmlDeclHandler' was not declared in this scope
../node-expat.cc:94: error: 'XML_SetEntityDeclHandler' was not declared in this scope
../node-expat.cc: In member function 'bool Parser::parseString(v8::String&, int)':
../node-expat.cc:149: error: 'parser' was not declared in this scope
../node-expat.cc:149: error: 'XML_GetBuffer' was not declared in this scope
../node-expat.cc:153: error: 'XML_ParseBuffer' was not declared in this scope
../node-expat.cc:153: error: 'XML_STATUS_ERROR' was not declared in this scope
../node-expat.cc: In member function 'bool Parser::parseBuffer(v8::Local<v8::Object>, int)':
../node-expat.cc:165: error: 'parser' was not declared in this scope
../node-expat.cc:165: error: 'XML_Parse' was not declared in this scope
../node-expat.cc:165: error: 'XML_STATUS_ERROR' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::SetEncoding(const v8::Arguments&)':
../node-expat.cc:178: error: 'XML_Char' was not declared in this scope
../node-expat.cc:178: error: expected primary-expression before '=' token
../node-expat.cc:178: error: expected type-specifier before 'XML_Char'
../node-expat.cc:178: error: expected `;' before 'XML_Char'
../node-expat.cc:179: error: expected primary-expression before ',' token
../node-expat.cc:181: error: expected primary-expression before ')' token
../node-expat.cc:183: error: expected primary-expression before ';' token
../node-expat.cc: In member function 'int Parser::setEncoding(int*)':
../node-expat.cc:193: error: 'parser' was not declared in this scope
../node-expat.cc:193: error: 'XML_SetEncoding' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::GetError(const v8::Arguments&)':
../node-expat.cc:203: error: expected initializer before '*' token
../node-expat.cc:204: error: 'error' was not declared in this scope
../node-expat.cc:201: warning: unused variable 'parser'
../node-expat.cc: In member function 'int Parser::stop()':
../node-expat.cc:224: error: 'parser' was not declared in this scope
../node-expat.cc:224: error: 'XML_TRUE' was not declared in this scope
../node-expat.cc:224: error: 'XML_StopParser' was not declared in this scope
../node-expat.cc: In member function 'int Parser::resume()':
../node-expat.cc:241: error: 'parser' was not declared in this scope
../node-expat.cc:241: error: 'XML_ResumeParser' was not declared in this scope
../node-expat.cc: In static member function 'static v8::Handle<v8::Value> Parser::Reset(const v8::Arguments&)':
../node-expat.cc:248: error: 'XML_Char' was not declared in this scope
../node-expat.cc:248: error: expected primary-expression before '=' token
../node-expat.cc:251: error: expected unqualified-id before '=' token
../node-expat.cc:252: error: expected primary-expression before ',' token
../node-expat.cc:255: error: expected primary-expression before ')' token
../node-expat.cc: In member function 'int Parser::reset(int*)':
../node-expat.cc:263: error: 'parser' was not declared in this scope
../node-expat.cc:263: error: 'XML_ParserReset' was not declared in this scope
../node-expat.cc: In member function 'uint32_t Parser::getCurrentLineNumber()':
../node-expat.cc:282: error: 'parser' was not declared in this scope
../node-expat.cc:282: error: 'XML_GetCurrentLineNumber' was not declared in this scope
../node-expat.cc: In member function 'uint32_t Parser::getCurrentColumnNumber()':
../node-expat.cc:295: error: 'parser' was not declared in this scope
../node-expat.cc:295: error: 'XML_GetCurrentColumnNumber' was not declared in this scope
../node-expat.cc: In member function 'int32_t Parser::getCurrentByteIndex()':
../node-expat.cc:308: error: 'parser' was not declared in this scope
../node-expat.cc:308: error: 'XML_GetCurrentByteIndex' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::StartElement(void*, int)':
../node-expat.cc:328: error: expected initializer before '*' token
../node-expat.cc:328: error: 'atts1' was not declared in this scope
../node-expat.cc:333: error: 'name' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::EndElement(void*, int)':
../node-expat.cc:344: error: 'name' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::Text(void*, int)':
../node-expat.cc:373: error: 's' was not declared in this scope
../node-expat.cc:373: error: 'len' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::ProcessingInstruction(void*, int)':
../node-expat.cc:384: error: 'target' was not declared in this scope
../node-expat.cc:385: error: 'data' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::Comment(void*, int)':
../node-expat.cc:395: error: 'data' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::XmlDecl(void*, int)':
../node-expat.cc:407: error: 'version' was not declared in this scope
../node-expat.cc:408: error: expected primary-expression before '?' token
../node-expat.cc:408: error: expected primary-expression before ')' token
../node-expat.cc:409: error: 'standalone' was not declared in this scope
../node-expat.cc: In static member function 'static void Parser::EntityDecl(void*, int)':
../node-expat.cc:421: error: 'entityName' was not declared in this scope
../node-expat.cc:422: error: 'is_parameter_entity' was not declared in this scope
../node-expat.cc:423: error: 'value' was not declared in this scope
../node-expat.cc:423: error: 'value_length' was not declared in this scope
../node-expat.cc:424: error: 'base' was not declared in this scope
../node-expat.cc:425: error: 'systemId' was not declared in this scope
../node-expat.cc:426: error: 'publicId' was not declared in this scope
../node-expat.cc:427: error: 'notationName' was not declared in this scope
gmake: *** [Release/obj.target/node_expat/node-expat.o] Error 1
gmake: Leaving directory `/root/node_modules/node-expat/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/node_modules/node-gyp/lib/build.js:256:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System FreeBSD 9.0-RELEASE-p4
gyp ERR! command "node" "/root/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /root/node_modules/node-expat
gyp ERR! node -v v0.8.21
gyp ERR! node-gyp -v v0.9.1
gyp ERR! not ok 
npm info node-expat@2.0.0 Failed to exec install script
npm info /root/node_modules/node-expat unbuild
npm info preuninstall node-expat@2.0.0
npm info uninstall node-expat@2.0.0
npm info postuninstall node-expat@2.0.0
npm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat 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 node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System FreeBSD 9.0-RELEASE-p4
npm ERR! command "node" "/usr/local/bin/npm" "-d" "install" "node-expat"
npm ERR! cwd /root
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.2.12
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

@gibbitz
Copy link

gibbitz commented Apr 9, 2013

updating node-gyp didn't work for me on CentOS 5. Still getting "file format not recognized; treating as linker script" per ticket 60. I'm running gcc 4.7.2, ar 2.23, Python 2.7.3, node 0.8.2, npm 1.2.11, node-gyp 0.9.5. I just noticed that the error reports node-gyp as 0.8.4, though node-gyp --version reports 0.9.5. I did npm cache clean and even closed and re-opened my session. no love. Any other advice?

@TooTallNate
Copy link
Contributor

That's cause you're not updating npm's copy of node-gyp: https://github.com/TooTallNate/node-gyp/wiki/Updating-npm's-bundled-node-gyp

@gibbitz
Copy link

gibbitz commented Apr 9, 2013

HA! that appears to have done it. Thanks.

@sonnyp sonnyp closed this as completed Nov 19, 2015
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

5 participants