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

nodejs v14.6.0 error while compiling #34478

Closed
seisdr opened this issue Jul 22, 2020 · 11 comments
Closed

nodejs v14.6.0 error while compiling #34478

seisdr opened this issue Jul 22, 2020 · 11 comments
Labels
zlib Issues and PRs related to the zlib subsystem.

Comments

@seisdr
Copy link

seisdr commented Jul 22, 2020

I been trying to build nodejs for 3 days now haha
here's the output

../deps/zlib/contrib/optimizations/chunkcopy.h:52:5: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
     const unsigned char FAR* s) {
     ^
  cc -o /root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o ../deps/zlib/contrib/optimizations/inflate.c '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DHAVE_HIDDEN' '-DADLER32_SIMD_SSSE3' '-DINFLATE_CHUNK_SIMD_SSE2' '-DCRC32_SIMD_SSE42_PCLMUL' -I../deps/zlib  -pthread -Wall -Wextra -Wno-unused-parameter -m32 -O3 -fno-omit-frame-pointer  -MMD -MF /root/node-v14.6.0/out/Release/.deps//root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o.d.raw   -c
In file included from ../deps/zlib/contrib/optimizations/chunkcopy.h:32:0,
                 from ../deps/zlib/contrib/optimizations/inffast_chunk.c:10:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function 'v_load64_dup':
/usr/lib/gcc/i686-linux-gnu/5/include/emmintrin.h:625:1: error: inlining failed in call to always_inline '_mm_set1_epi64x': target specific option mismatch
 _mm_set1_epi64x (long long __A)
 ^
In file included from ../deps/zlib/contrib/optimizations/inffast_chunk.c:10:0:
../deps/zlib/contrib/optimizations/chunkcopy.h:215:10: error: called from here
   return _mm_set1_epi64x(i64);
          ^
deps/zlib/zlib.target.mk:109: recipe for target '/root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inffast_chunk.o' failed
make[1]: *** [/root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inffast_chunk.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ../deps/zlib/contrib/optimizations/inflate.c:87:0:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function 'loadchunk':
../deps/zlib/contrib/optimizations/chunkcopy.h:52:5: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
     const unsigned char FAR* s) {
     ^
In file included from ../deps/zlib/contrib/optimizations/chunkcopy.h:32:0,
                 from ../deps/zlib/contrib/optimizations/inflate.c:87:
../deps/zlib/contrib/optimizations/chunkcopy.h: In function 'v_load64_dup':
/usr/lib/gcc/i686-linux-gnu/5/include/emmintrin.h:625:1: error: inlining failed in call to always_inline '_mm_set1_epi64x': target specific option mismatch
 _mm_set1_epi64x (long long __A)
 ^
In file included from ../deps/zlib/contrib/optimizations/inflate.c:87:0:
../deps/zlib/contrib/optimizations/chunkcopy.h:215:10: error: called from here
   return _mm_set1_epi64x(i64);
          ^
deps/zlib/zlib.target.mk:109: recipe for target '/root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o' failed
make[1]: *** [/root/node-v14.6.0/out/Release/obj.target/zlib/deps/zlib/contrib/optimizations/inflate.o] Error 1
@richardlau
Copy link
Member

What OS/arch are you compiling for? You could try to see if #33044 makes a difference.

@seisdr
Copy link
Author

seisdr commented Jul 22, 2020

32bit i386
ubuntu

@richardlau
Copy link
Member

32bit i386
ubuntu

I think this is a duplicate of #33019.

@richardlau richardlau added the zlib Issues and PRs related to the zlib subsystem. label Jul 22, 2020
@seisdr
Copy link
Author

seisdr commented Jul 22, 2020

do I need to compile it again

@seisdr
Copy link
Author

seisdr commented Jul 22, 2020

as #33019 (comment)

@seisdr
Copy link
Author

seisdr commented Jul 22, 2020

I just want to download dependencies of project it failed so I'm guessing I'm need to download least version of nodejs or I don't need? it gonna a long time to compile anyway
here's the error output

ameer@localhost:~/pdf.js$ npm i

> canvas@2.6.1 install /root/pdf.js/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v57-li
nux-glibc-ia32.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@8.17.0 (node-v57 ABI, glibc) (falling back to source compile with no
de-gyp)
/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.86-g0c14827
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "-
-module=/root/pdf.js/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/root/pdf.js/node_modules/canvas/bu
ild/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /root/pdf.js/node_modules/canvas
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configu
re --fallback-to-build --module=/root/pdf.js/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/pdf.js/no
de_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/pdf.js/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 3.10.86-g0c14827
node-pre-gyp ERR! command "/usr/bin/node" "/root/pdf.js/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/pdf.js/node_modules/canvas
node-pre-gyp ERR! node -v v8.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module
=/root/pdf.js/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/pdf.js/node_modules/canvas/build/Release
 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/wintersmith/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@2.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-22T19_18_48_604Z-debug.log
ameer@localhost:~/pdf.js$ npm i

> canvas@2.6.1 install /root/pdf.js/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v57-li
nux-glibc-ia32.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@8.17.0 (node-v57 ABI, glibc) (falling back to source compile with no
de-gyp)
/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.86-g0c14827
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "-
-module=/root/pdf.js/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/root/pdf.js/node_modules/canvas/bu
ild/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /root/pdf.js/node_modules/canvas
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configu
re --fallback-to-build --module=/root/pdf.js/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/pdf.js/no
de_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/pdf.js/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 3.10.86-g0c14827
node-pre-gyp ERR! command "/usr/bin/node" "/root/pdf.js/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/pdf.js/node_modules/canvas
node-pre-gyp ERR! node -v v8.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module
=/root/pdf.js/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/pdf.js/node_modules/canvas/build/Release
 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN eslint-plugin-mozilla@2.4.0 requires a peer of eslint@^6.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-mozilla@2.4.0 requires a peer of prettier@^1.17.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/wintersmith/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"l
inux","arch":"ia32"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@2.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-22T19_33_40_841Z-debug.log
ameer@localhost:~/pdf.js$

@seisdr
Copy link
Author

seisdr commented Jul 22, 2020

ameer@localhost:~/pdf.js$ npm i

> pdf.js@2.0.0 postinstall /root/pdf.js
> node -e "require('child_process').execSync('cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js');"

/root/pdf.js/node_modules/puppeteer/install.js:175
            } catch {
                    ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
child_process.js:650
    throw err;
    ^

Error: Command failed: cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js
/root/pdf.js/node_modules/puppeteer/install.js:175
            } catch {
                    ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

    at checkExecSyncError (child_process.js:607:13)
    at Object.execSync (child_process.js:647:13)
    at [eval]:1:26
    at ContextifyScript.Script.runInThisContext (vm.js:50:33)
    at Object.runInThisContext (vm.js:139:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:653:30)
    at evalScript (bootstrap_node.js:479:27)
    at startup (bootstrap_node.js:180:9)
    at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pdf.js@2.0.0 postinstall: `node -e "require('child_process').execSync('cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js');"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pdf.js@2.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-22T21_09_12_300Z-debug.log
ameer@localhost:~/pdf.js$ see
bash: /usr/bin/see: /usr/bin/perl: bad interpreter: No such file or directory
ameer@localhost:~/pdf.js$

@aduh95
Copy link
Contributor

aduh95 commented Aug 8, 2020

@seisdr the last two console dump have very little to do with the original issue, it shows you are using Node.js v8.17.0; Node.js v8.x support has ended last year, if you want assistance you should be using a more recent version (list of currently supported versions can be found in the CHANGELOG).

Regarding the original issue, since the subject is already covered by #33019, you can close this one and continue the discussion over there. If you need assistance rather than report a technical issue, please open a new issue over at nodejs/help.

@bnoordhuis
Copy link
Member

I'll close this per the previous comment (thanks @aduh95.)

@redouaane
Copy link

try {} catch {}
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:653:30)
at evalScript (bootstrap_node.js:479:27)
at startup (bootstrap_node.js:180:9)
at bootstrap_node.js:625:3

@redouaane
Copy link

i have this issue when i type in my terminal node -e "try {} catch {}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants