installing libxmljs in centos 5.x

325 views
Skip to first unread message

Angelo Chen

unread,
Jul 18, 2012, 3:23:18 AM7/18/12
to nodejs
Hi,

npm install libxmljs, and got error, some idea how to make this work?
thanks.

48 verbose true,/home/info/node_modules,/home/info/node_modules
unbuild libx...@0.5.4
149 info postuninstall libx...@0.5.4
150 error libx...@0.5.4 install: `node-waf configure build`
150 error `sh "-c" "node-waf configure build"` failed with 1
151 error Failed at the libx...@0.5.4 install script.
151 error This is most likely a problem with the libxmljs package,
151 error not with npm itself.
151 error Tell the author that this fails on your system:
151 error node-waf configure build
151 error You can get their info via:
151 error npm owner ls libxmljs
151 error There is likely additional logging output above.
152 error System Linux 2.6.18-128.1.10.el5.xs5.5.0.51xen
153 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
"libxmljs"
154 error cwd /home/info
155 error node -v v0.8.2
156 error npm -v 1.1.36
157 error code ELIFECYCLE
158 error message libx...@0.5.4 install: `node-waf configure build`
158 error message `sh "-c" "node-waf configure build"` failed with 1

mscdex

unread,
Jul 18, 2012, 5:18:53 AM7/18/12
to nod...@googlegroups.com
On Wednesday, July 18, 2012 3:23:18 AM UTC-4, Angelo Chen wrote:
npm install libxmljs, and got error, some idea how to make this work?
thanks.

You need to post the actual error that should be shown before the output you gave. 

Angelo Chen

unread,
Jul 18, 2012, 5:29:16 AM7/18/12
to nodejs
list of errors is quite long. I installed the libxml-devel package, is
that enough?

Angelo Chen

unread,
Jul 18, 2012, 5:31:09 AM7/18/12
to nodejs
looks error started from these lines:
cc1plus: warnings being treated as errors
/usr/local/include/node/ev-emul.h: In function ‘void
__ev_timer_start(__ev_timer*)’:
/usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
argument 3 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
int), int64_t, int64_t)’
/usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
argument 4 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
int), int64_t, int64_t)’
cc1plus: warnings being treated as errors
/usr/local/include/node/ev-emul.h: In function ‘void
__ev_timer_start(__ev_timer*)’:
/usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
argument 3 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
int), int64_t, int64_t)’
/usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
argument 4 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
int), int64_t, int64_t)’


On Jul 18, 5:18 pm, mscdex <msc...@gmail.com> wrote:

Ben Noordhuis

unread,
Jul 18, 2012, 7:58:07 AM7/18/12
to nod...@googlegroups.com
On Wed, Jul 18, 2012 at 11:31 AM, Angelo Chen <angelo...@gmail.com> wrote:
> looks error started from these lines:
> cc1plus: warnings being treated as errors
> /usr/local/include/node/ev-emul.h: In function ‘void
> __ev_timer_start(__ev_timer*)’:
> /usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
> argument 3 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
> int), int64_t, int64_t)’
> /usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
> argument 4 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
> int), int64_t, int64_t)’
> cc1plus: warnings being treated as errors
> /usr/local/include/node/ev-emul.h: In function ‘void
> __ev_timer_start(__ev_timer*)’:
> /usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
> argument 3 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
> int), int64_t, int64_t)’
> /usr/local/include/node/ev-emul.h:203: warning: passing ‘double’ for
> argument 4 to ‘int uv_timer_start(uv_timer_t*, void (*)(uv_timer_t*,
> int), int64_t, int64_t)’

Should be fixed in [1].

[1] https://github.com/joyent/node/commit/f6f2d42

Angelo Chen

unread,
Jul 18, 2012, 8:24:59 AM7/18/12
to nodejs
cool, how to check out this version?

Ben Noordhuis

unread,
Jul 18, 2012, 8:36:35 AM7/18/12
to nod...@googlegroups.com
On Wed, Jul 18, 2012 at 2:24 PM, Angelo Chen <angelo...@gmail.com> wrote:
> cool, how to check out this version?

Clone the repo and check out the v0.8 branch or download the v0.8
tarball from github. The changes may land in tonight's release (then
again, they may not).

Angelo Chen

unread,
Jul 18, 2012, 9:31:19 AM7/18/12
to nodejs
I did and built it, i got v0.8.3-pre.
the compile error with libxmljs go away, but still get errors:

151 info postuninstall libx...@0.5.4
152 error libx...@0.5.4 install: `node-waf configure build`
152 error `sh "-c" "node-waf configure build"` failed with 1
153 error Failed at the libx...@0.5.4 install script.

so i tried to compile it from source, node-gyp configure, I got
following:

gyp info it worked if it ends with ok
gyp info using node...@0.6.0
gyp info using no...@0.8.3-pre | linux | ia32
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use
the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/node-gyp/
lib/install.js:68:16)
gyp ERR! stack at Object.commands.forEach.self.commands.(anonymous
function) [as install] (/usr/local/lib/node_modules/node-gyp/lib/node-
gyp.js:56:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/node-gyp/
lib/configure.js:147:20)
gyp ERR! stack at /usr/local/lib/node_modules/node-gyp/lib/
configure.js:87:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:
534:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at maybeClose (child_process.js:634:16)
gyp ERR! stack at Socket.ChildProcess.spawn.stdin
(child_process.js:805:11)
gyp ERR! stack at Socket.EventEmitter.emit (events.js:88:17)
gyp ERR! stack at Socket._destroy.destroyed (net.js:358:10)
gyp ERR! System Linux 2.6.18-128.1.10.el5.xs5.5.0.51xen
gyp ERR! command "node" "/usr/local/bin/node-gyp" "configure"
gyp ERR! cwd /home/info/libxmljs
gyp ERR! node -v v0.8.3-pre
gyp ERR! node-gyp -v v0.6.0
gyp ERR! not ok

On Jul 18, 8:36 pm, Ben Noordhuis <i...@bnoordhuis.nl> wrote:

Ben Noordhuis

unread,
Jul 18, 2012, 10:37:39 AM7/18/12
to nod...@googlegroups.com
That's a feature (as it were) of node-gyp.

Normally, you'd point it to the proper version with --target 0.8.2 but
that won't work here because the change hasn't landed in a release
yet.

mscdex

unread,
Jul 18, 2012, 12:41:38 PM7/18/12
to nod...@googlegroups.com
On Wednesday, July 18, 2012 9:31:19 AM UTC-4, Angelo Chen wrote:
I did and built it, i got v0.8.3-pre.
the compile error with libxmljs go away, but still get errors:

Ok, so do: npm --nodedir /path/to/v0.8/head/you/downloaded install libxmljs 

Angelo Chen

unread,
Jul 18, 2012, 8:36:15 PM7/18/12
to nodejs
I did:

npm -nodedir /root/temp/node install libxmljs

still get:

rebuild error Error: `make` failed with exit code: 2
gyp ERR! rebuild error at ChildProcess.onExit (/usr/local/lib/
node_modules/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! rebuild error at ChildProcess.EventEmitter.emit
(events.js:91:17)
gyp ERR! rebuild error at Process._handle.onexit (child_process.js:
674:10)
gyp ERR! not ok
npm ERR! libx...@0.5.4 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1

Angelo Chen

unread,
Jul 18, 2012, 8:49:59 PM7/18/12
to nodejs
looks like following in the log started the problem:

281 verbose unsafe-perm in lifecycle false
282 silly exec sh "-c" "node-gyp rebuild"
283 silly sh,-c,node-gyp rebuild,/home/billing/node_modules/libxmljs
spawning
284 info libx...@0.5.4 Failed to exec install script
285 info /home/billing/node_modules/libxmljs unbuild
286 verbose from cache /home/billing/node_modules/libxmljs/
package.json
287 info preuninstall libx...@0.5.4
288 info uninstall libx...@0.5.4
289 verbose true,/home/billing/node_modules,/home/billing/node_modules
unbuild libx...@0.5.4
290 info postuninstall libx...@0.5.4


On Jul 19, 12:41 am, mscdex <msc...@gmail.com> wrote:

mscdex

unread,
Jul 18, 2012, 9:45:29 PM7/18/12
to nod...@googlegroups.com
On Wednesday, July 18, 2012 8:36:15 PM UTC-4, Angelo Chen wrote:
I did:

npm -nodedir /root/temp/node install libxmljs

There should be two dashes I think: --nodedir 

Angelo Chen

unread,
Jul 18, 2012, 10:15:37 PM7/18/12
to nodejs
you are right, it needs two dashes, but got compiler errors:

../src/xml_namespace.cc: In constructor
‘libxmljs::XmlNamespace::XmlNamespace(xmlNs*)’:
../src/xml_namespace.cc:67: error: ‘struct _xmlNs’ has no member named
‘context’
../src/xml_namespace.cc:70: error: ‘struct _xmlNs’ has no member named
‘context’
../src/xml_namespace.cc: In destructor ‘virtual
libxmljs::XmlNamespace::~XmlNamespace()’:
../src/xml_namespace.cc:79: error: ‘struct _xmlNs’ has no member named
‘context’
../src/xml_namespace.cc:82: error: ‘struct _xmlNs’ has no member named
‘context’
make: *** [Release/obj.target/liblibxmljs/src/xml_namespace.o] Error 1

mscdex

unread,
Jul 18, 2012, 10:53:42 PM7/18/12
to nod...@googlegroups.com
On Wednesday, July 18, 2012 10:15:37 PM UTC-4, Angelo Chen wrote:
you are right, it needs two dashes, but got compiler errors:

It looks like the version of libxml2 that CentOS 5.x ships with (2.6.26) is too old. You need at least 2.6.27 to fix this particular compiler error.
Reply all
Reply to author
Forward
0 new messages