addaleax / lzma-native

Node.js interface to the native liblzma compression library (.xz file format, among others)
MIT License
105 stars 37 forks source link

Error building lzma-native on linux with npm=7.6.3 and node=14.16.0 #112

Open lastuniverse opened 3 years ago

lastuniverse commented 3 years ago
...
  SOLINK_MODULE(target) Release/obj.target/lzma_native.node
g++: error: /home/roman/work/git/webmc/node_modules/lzma-native/build/liblzma/build/lib/liblzma.a: 
No such file or directory
make: *** [lzma_native.target.mk:147: Release/obj.target/lzma_native.node] Error 1
make: Exit from dir «/home/roman/work/git/webmc/node_modules/lzma-native/build»
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.3.18-lp152.75-default
gyp ERR! command "/usr/bin/node14" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/roman/work/git/webmc/node_modules/lzma-native
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /home/roman/work/git/webmc/node_modules/lzma-native
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
...
addaleax commented 3 years ago

@lastuniverse You need to include steps to reproduce in a bug report, or at least mention which version of this package you’re using.

lastuniverse commented 2 years ago

You need to include steps to reproduce in a bug report, or at least mention which version of this package you’re using.

OS: OpenSUSE Leap 15.2 Linux Core: 5.3.18-lp152.98-default Arch: 64bit CPU: 16 x Intel Core i7-10700F nodejs: v14.17.5 npm: 8.1.3

i am install this -> https://github.com/michaljaz/webmc/blob/master/docs/DEVELOPMENT.md

git clone https://github.com/michaljaz/webmc
cd ./webmc
npm install

get error in console for lzma-native@4.0.6 -> https://pastebin.com/HMjkGYRs

hmm... in dir node_modules/lzma-native:

bin
binding.gyp
CHANGELOG.md
deps
index.js
liblzma-build.sh
liblzma-config.sh
LICENSE
package.json
prebuilds
README.md
README.md.xz
src

not present folder ~/work/222/webmc/node_modules/lzma-native/build

ok, testing last version:

mkdir ~/test
cd ~/test
npm install lzma-native

not present folder ~/test/node_modules/lzma-native/build

cd ~/test/node_modules/lzma-native
npm install

get error in console for lzma-native@8.0.1

Scanning the drive for archives:

ERROR: No more files
xz-5.2.3-windows.7z

System ERROR: unknow error -2147024872

in folder ~/work/333/node_modules/lzma-native/deps not present archive file xz-5.2.3-windows.7z

it is not clear why you need an archive for windows if I have linux?

ok, testing github version:

rm -rf ~/test
mkdir ~/test
cd ~/test
git clone https://github.com/addaleax/lzma-native
cd ~/test/lzma-native
npm install

get error in console for lzma-native@8.0.3

g++: error: /home/roman/test/lzma-native/build/liblzma/build/lib/liblzma.a: Нет такого файла или каталога
make: *** [lzma_native.target.mk:147: Release/obj.target/lzma_native.node] Ошибка 1
make: выход из каталога «/home/roman/test/lzma-native/build»
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.3.18-lp152.98-default
gyp ERR! command "/usr/bin/node14" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/roman/test/lzma-native
gyp ERR! node -v v14.17.5
gyp ERR! node-gyp -v v8.3.0
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /home/roman/test/lzma-native
npm ERR! command failed
npm ERR! command sh -c node-gyp-build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/roman/.npm/_logs/2021-11-14T06_08_54_458Z-debug.log

error: /home/roman/test/lzma-native/build/liblzma/build/lib/liblzma.a: No such file or directory

in folder ~/test/lzma-native/build/liblzma/build/ : subfolder lib is epsent subfolder lib64 is present