Open
Description
Issue or Feature
There seems to be a missing arm64 build of canvas, build from source fails on arm64 as well.
Steps to Reproduce
npm install
npm install --build-from-source
Your Environment
- Version of node-canvas: 2.6.1;
- Environment: node 14.9.0; Ubuntu 20.04 (Raspberry Pi 4);
Logs
when attempting to build directly on my Pi4
> [email protected] install /home/jweland/apps/discordbot/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-v83-linux-glibc-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-1016-raspi
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/jweland/apps/discordbot/node_modules/canvas
gyp ERR! node -v v14.9.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/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/jweland/apps/discordbot/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1047:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 5.4.0-1016-raspi
node-pre-gyp ERR! command "/usr/bin/node" "/home/jweland/apps/discordbot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/jweland/apps/discordbot/node_modules/canvas
node-pre-gyp ERR! node -v v14.9.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/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN [email protected] requires a peer of @types/better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sqlite@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/jweland/.npm/_logs/2020-09-04T19_08_35_668Z-debug.log
When attempting --build-from-source
> [email protected] install /home/jweland/apps/discordbot/node_modules/canvas
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
/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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-1016-raspi
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/jweland/apps/discordbot/node_modules/canvas
gyp ERR! node -v v14.9.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/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/jweland/apps/discordbot/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1047:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 5.4.0-1016-raspi
node-pre-gyp ERR! command "/usr/bin/node" "/home/jweland/apps/discordbot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/jweland/apps/discordbot/node_modules/canvas
node-pre-gyp ERR! node -v v14.9.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/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jweland/apps/discordbot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/jweland/apps/discordbot/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN [email protected] requires a peer of discord.js-commando@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @types/better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of better-sqlite3@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sqlite@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/jweland/.npm/_logs/2020-09-04T19_11_05_625Z-debug.log
Works fine on AMD64 architecture just not ARM64.