Closed donlion closed 9 years ago
looks like native modules aren't working for you. are you able to install the xz module independently?
npm install xz
same problem for me
$ node --version
v0.10.26
$ npm --version
1.4.4
TOUCH Release/obj.target/deps/xz.stamp
CXX(target) Release/obj.target/node_xz/src/c++/node_xz.o
../src/c++/node_xz.cpp:4:18: fatal error: lzma.h: Datei oder Verzeichnis nicht gefunden
#include "lzma.h"
^
compilation terminated.
after installing the package liblzma-dev
(on debian) the following error occurs:
TOUCH Release/obj.target/deps/xz.stamp
CXX(target) Release/obj.target/node_xz/src/c++/node_xz.o
CXX(target) Release/obj.target/node_xz/src/c++/engine.o
SOLINK_MODULE(target) Release/obj.target/node_xz.node
/usr/bin/ld: ./Release/obj/gen/xz-5.0.5/src/liblzma/.libs/liblzma.a(liblzma_la-common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
./Release/obj/gen/xz-5.0.5/src/liblzma/.libs/liblzma.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/node_xz.node] Fehler 1
make: Leaving directory `/usr/local/lib/node_modules/xz/build'
I have no idea hat the problem is here.
Can you try doing
brew install xz
(assuming you are on mac) and try again?
i have installed the packages xz-utils
and xzdec
on debian, no success:
/bin/bash ../../libtool --tag=CC --mode=link gcc -std=gnu99 -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -g -O2 -o lzmainfo lzmainfo-lzmainfo.o lzmainfo-tuklib_progname.o lzmainfo-tuklib_exit.o ../../src/liblzma/liblzma.la
libtool: link: gcc -std=gnu99 -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -g -O2 -o .libs/lzmainfo lzmainfo-lzmainfo.o lzmainfo-tuklib_progname.o lzmainfo-tuklib_exit.o ../../src/liblzma/.libs/liblzma.so -pthread
make[4]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src/lzmainfo'
Making all in scripts
make[4]: Entering directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src/scripts'
make[4]: Für das Ziel »all« ist nichts zu tun.
make[4]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src/scripts'
make[4]: Entering directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src'
make[4]: Für das Ziel »all-am« ist nichts zu tun.
make[4]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src'
make[3]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/src'
Making all in po
make[3]: Entering directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/po'
make[3]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/po'
Making all in tests
make[3]: Entering directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/tests'
make[3]: Für das Ziel »all« ist nichts zu tun.
make[3]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5/tests'
make[3]: Entering directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5'
make[3]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5'
make[2]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5'
make[1]: Leaving directory `/usr/local/lib/node_modules/xz/build/Release/obj/gen/xz-5.0.5'
TOUCH Release/obj.target/deps/xz.stamp
CXX(target) Release/obj.target/node_xz/src/c++/node_xz.o
CXX(target) Release/obj.target/node_xz/src/c++/engine.o
SOLINK_MODULE(target) Release/obj.target/node_xz.node
/usr/bin/ld: ./Release/obj/gen/xz-5.0.5/src/liblzma/.libs/liblzma.a(liblzma_la-common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
./Release/obj/gen/xz-5.0.5/src/liblzma/.libs/liblzma.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/node_xz.node] Fehler 1
make: Leaving directory `/usr/local/lib/node_modules/xz/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.14-0.bpo.2-amd64
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/xz
gyp ERR! node -v v0.10.26
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! xz@1.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xz@1.0.3 install script.
npm ERR! This is most likely a problem with the xz 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 xz
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.14-0.bpo.2-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "xz"
npm ERR! cwd /home/defel/code/playground
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/defel/code/playground/npm-debug.log
npm ERR! not ok code 0
Same thing here. npm-debug.log
This seems to be a general issue with the xz package and has been reported: https://github.com/robey/node-xz/issues/2
The workaround provided there has a good chance of working for most users here, I guess (i.e. CFLAGS="-fPIC" npm install peerwiki
works for me).
If you want, you can also use my own implementation of liblzma bindings for node.js in the meantime: https://github.com/addaleax/lzma-native resp. https://www.npmjs.org/package/lzma-native I have added code for compability with node-xz a week ago, so you can use it as a drop-in replacement.
And by the way, this looks like a really cool project!
Send me a PR that switches the dep to your module and I'll merge it :) On Fri 28 Nov 2014 at 20:36 Hauke Henningsen notifications@github.com wrote:
This seems to be a general issue with the xz package and has been reported: robey/node-xz#2 https://github.com/robey/node-xz/issues/2 The workaround provided there has a good chance of working for most users here, I guess (i.e. CFLAGS="-fPIC" npm install peerwiki works for me).
If you want, you can also use my own implementation of liblzma bindings for node.js in the meantime: https://github.com/addaleax/lzma-native resp. https://www.npmjs.org/package/lzma-native I have added code for compability with node-xz a week ago, so you can use it as a drop-in replacement.
And by the way, this looks like a really cool project!
— Reply to this email directly or view it on GitHub https://github.com/mafintosh/peerwiki/issues/2#issuecomment-64923668.
Just did, it’s pretty much search and replace
npm ERR! xz@1.0.3 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the xz@1.0.3 install script. npm ERR! This is most likely a problem with the xz 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 xz npm ERR! There is likely additional logging output above. npm ERR! System Darwin 13.4.0