Open johnweland opened 4 years ago
Leaving a dot here as I'm in the same boat currently. Looking forward to an ARM64 build.
I am also missing an ARM build, I don't think it is 64. I have a raspberry pi 3 running Raspberry Pi OS and I am trying to use a discord bot that required canvas.
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-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@14.8.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing pixman-1.pc
to the PKG_CONFIG_PATH environment variable
No package pixman-1 found
gyp: Call to pkg-config pixman-1 --libs returned exit status 1 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 4.19.118-v7+
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/pi/newcalxp/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/pi/newcalxp/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/pi/newcalxp/node_modules/canvas
gyp ERR! node -v v14.8.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/pi/newcalxp/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/pi/newcalxp/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/pi/newcalxp/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:1051:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 4.19.118-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/newcalxp/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/newcalxp/node_modules/canvas
node-pre-gyp ERR! node -v v14.8.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/pi/newcalxp/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/pi/newcalxp/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN notsup Unsupported engine for openvg@0.4.5: wanted: {"node":">=0.8 <0.11"} (current: {"node":"14.8.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: openvg@0.4.5
npm WARN discord-tutorial-bot@1.0.0 No repository field.
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! /home/pi/.npm/_logs/2020-11-03T21_19_36_436Z-debug.log
FYI: was able to build the package without error (Raspberry PI 3, Ubuntu 20.04 arm64):
$ sudo apt-get update
$ sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
$ yarn add canvas
https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems
See also: https://github.com/Automattic/node-canvas/issues/1511
Given today's announcement from AWS re ARM based Lambda being generally available, will the std npm deploy ship with an appropriate binary?
It is painful to use node-canvas on Apple Silicon. Please provide prebuilt binaries for arm64.
Same issues on Arch aarch64, I fixed it by installing pango & cairo, so pacman -S cairo pango
I hit this when I did an upgrade my base image from: node:15.10-stretch
to node:16.14-stretch
.
In the image is already this:
RUN apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
to be able to build it from source...
The build was trying to download this URL: `
`
latest version of rsvp(https://github.com/tildeio/rsvp.js ) and then a global install of node-pre-gyp is required again followed by installing latest version of canvas. Worked for me. Mac M1, Node 16.14.2
Any updates?
Found a proposed solution here for M1 Mac. ✅
TL;DR:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
node_modules
The issue shouldn't be closed since there are still no ARM64 binaries available. Can one of maintainers reopen?
Any update on this? Prebuilt arm images would be greatly appreciated :)
I really hope the latest version will have arm64 pre-builds added eventually as I need to them to contribute to a project
This seems to be a drop-in replacement (minus some changes to font loading iirc) without the need for build during install for arm: https://github.com/Brooooooklyn/canvas
Issue or Feature
There seems to be a missing arm64 build of canvas, build from source fails on arm64 as well.
Steps to Reproduce
Your Environment
Logs
when attempting to build directly on my Pi4
When attempting --build-from-source
Works fine on AMD64 architecture just not ARM64.