galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

build failed with node 11.x on linux #348

Open abenhamdine opened 5 years ago

abenhamdine commented 5 years ago

Hi, and thx for this useful library.

However, since we upgraded to node 11 (same with 11.1.0 and 11.2.0), the build fails on Linux.

Any idea to resolve the issue ?

> node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS
2018-11-19T16:52:41+01:00 > hummus@1.0.90 install /home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus
2018-11-19T16:52:41+01:00 node-pre-gyp WARN Using request for node-pre-gyp https download
2018-11-19T16:52:42+01:00 node-pre-gyp WARN Tried to download(404): https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.90/node-v67-linux-x64-glibc.tar.gz
2018-11-19T16:52:42+01:00 node-pre-gyp WARN Pre-built binaries not installable for hummus@1.0.90 and node@11.2.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
2018-11-19T16:52:42+01:00 node-pre-gyp WARN Pre-built binaries not found for hummus@1.0.90 and node@11.2.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
2018-11-19T16:52:42+01:00 node-pre-gyp WARN Hit error Connection closed while downloading tarball file
2018-11-19T16:52:43+01:00 make: Entering directory '/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/build'
2018-11-19T16:52:43+01:00 CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o
2018-11-19T16:52:43+01:00 make: Entering directory '/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/build'
2018-11-19T16:52:43+01:00 CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o
2018-11-19T16:52:46+01:00 rm: cannot remove './Release/.deps/Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o.d.raw': No such file or directory
2018-11-19T16:52:47+01:00 make: *** [src/deps/PDFWriter/pdfwriter.target.mk:247: Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o] Error 1
2018-11-19T16:52:47+01:00 make: Leaving directory '/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/build'
2018-11-19T16:52:47+01:00 gyp CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o
2018-11-19T16:52:47+01:00 ERR! build error
2018-11-19T16:52:47+01:00 gyp ERR! stack Error: `make` failed with exit code: 2
2018-11-19T16:52:47+01:00 gyp ERR! stack at ChildProcess.emit (events.js:182:13)
2018-11-19T16:52:47+01:00 gyp ERR! stack at ChildProcess.onExit (/home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
2018-11-19T16:52:47+01:00 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
2018-11-19T16:52:47+01:00 gyp ERR! command "/home/bas/.nvm/versions/node/v11.2.0/bin/node" "/home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding/hummus.node" "--module_name=hummus" "--module_path=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding" "--napi_version=3" "--node_abi_napi=napi"
2018-11-19T16:52:47+01:00 gyp ERR! System Linux 4.19.1+
2018-11-19T16:52:47+01:00 gyp ERR! cwd /home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus
2018-11-19T16:52:47+01:00 gyp ERR! node -v v11.2.0
2018-11-19T16:52:47+01:00 gyp ERR! node-gyp -v v3.8.0
2018-11-19T16:52:47+01:00 gyp ERR! not ok
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! build error
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! stack Error: Failed to execute '/home/bas/.nvm/versions/node/v11.2.0/bin/node /home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding/hummus.node --module_name=hummus --module_path=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding --napi_version=3 --node_abi_napi=napi' (1)
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! System Linux 4.19.1+
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! command "/home/bas/.nvm/versions/node/v11.2.0/bin/node" "/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! cwd /home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! node -v v11.2.0
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! node-pre-gyp -v v0.10.3
2018-11-19T16:52:47+01:00 node-pre-gyp ERR! not ok
2018-11-19T16:52:47+01:00 Failed to execute '/home/bas/.nvm/versions/node/v11.2.0/bin/node /home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding/hummus.node --module_name=hummus --module_path=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding --napi_version=3 --node_abi_napi=napi' (1)
2018-11-19T16:52:48+01:00 ../src/deps/PDFWriter/AbstractWrittenFont.cpp:488:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o.d.raw: No such file or directory
2018-11-19T16:52:48+01:00 compilation terminated.
2018-11-19T16:52:48+01:00 make: Leaving directory '/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/build'
2018-11-19T16:52:48+01:00 make: *** [src/deps/PDFWriter/pdfwriter.target.mk:247: Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o] Error 1
2018-11-19T16:52:48+01:00 gyp ERR! stack Error: `make` failed with exit code: 2
2018-11-19T16:52:48+01:00 gyp ERR! stack at ChildProcess.onExit (/home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
2018-11-19T16:52:48+01:00 gyp ERR! build error
2018-11-19T16:52:48+01:00 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
2018-11-19T16:52:48+01:00 gyp ERR! stack at ChildProcess.emit (events.js:182:13)
2018-11-19T16:52:48+01:00 gyp ERR! System Linux 4.19.1+
2018-11-19T16:52:48+01:00 gyp ERR! cwd /home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus
2018-11-19T16:52:48+01:00 gyp ERR! node-gyp -v v3.8.0
2018-11-19T16:52:48+01:00 gyp ERR! command "/home/bas/.nvm/versions/node/v11.2.0/bin/node" "/home/bas/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding/hummus.node" "--module_name=hummus" "--module_path=/home/bas/app_21386476-a451-424c-ad67-870442bbdbe7/node_modules/hummus/binding" "--napi_version=3" "--node_abi_napi=napi"
2018-11-19T16:52:48+01:00 gyp ERR! node -v v11.2.0
2018-11-19T16:52:48+01:00 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
2018-11-19T16:52:48+01:00 gyp ERR! not ok
2018-11-19T16:52:48+01:00 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2018-11-19T16:52:48+01:00 npm ERR! errno 1
2018-11-19T16:52:48+01:00 npm ERR! code ELIFECYCLE
2018-11-19T16:52:48+01:00 npm ERR!
2018-11-19T16:52:48+01:00 npm ERR! hummus@1.0.90 install: `node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS`
2018-11-19T16:52:48+01:00 npm ERR! Exit status 1
2018-11-19T16:52:48+01:00 npm ERR! Failed at the hummus@1.0.90 install script.
2018-11-19T16:52:49+01:00 npm ERR! /home/bas/.npm/_logs/2018-11-19T15_52_48_670Z-debug.log
2018-11-19T16:52:49+01:00 Error happened while running npm --production=false install --no-progress. Please check your configuration
istvanpp commented 5 years ago

Hi @abenhamdine , did you try to install Hummus with the following command?

sudo npm install -g --unsafe-perm hummus

Please note, the parameter -g will install it globally.

abenhamdine commented 5 years ago

@istvanpp unfortunetaly, our app is in a Paas provider and we have no control on install script.

jpascoe commented 5 years ago

npm install -g --unsafe-perm hummus or npm install --unsafe-perm hummus wont install in docker container using node:latest

galkahana commented 5 years ago

seems fine on travis builds: https://travis-ci.org/galkahana/HummusJS/builds/458925266