jalagar / animated-art-engine

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file
MIT License
166 stars 64 forks source link

Canvas/Cairo Issue - can't run 'make all' [canvas.node, 0x0001): symbol not found in flat namespace '_cairo_fill'] #178

Open NetworkEntity opened 1 year ago

NetworkEntity commented 1 year ago

I am facing an issue with the canvas module. The error message I am encountering reads: "Error: dlopen(/Users/admin/Desktop/xxxxxxxxxx/xxxxxxxxxxxxx/animated-art-engine-main/step2_spritesheet_to_generative_sheet/node_modules/canvas/build/Release/canvas.node, 0x0001): symbol not found in flat namespace '_cairo_fill'".

I'm running node v16.14.2 and npm v8.5.0 For the modules i'm running: canvas v2.11.0 and cairo v1.16.0

I'm doing this on arm64 architecture (Apple Silicone M1 max) which is where i think some of the issue is stemming from.

Any advice would be greatly appreciated!


Error Message:

nft-animated-generator@3.1.3 generate node index.js "1" "1"

node:internal/modules/cjs/loader:1187 return process.dlopen(module, path.toNamespacedPath(filename)); ^

Error: dlopen(/Users/admin/Desktop/xxxxxxxx/xxxxxxxxxx/animated-art-engine-main/step2_spritesheet_to_generative_sheet/node_modules/canvas/build/Release/canvas.node, 0x0001): symbol not found in flat namespace '_cairo_fill' at Object.Module._extensions..node (node:internal/modules/cjs/loader:1187:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/Users/admin/Desktop/xxxxxxxxxxx/xxxxxxxxxx/animated-art-engine-main/step2_spritesheet_to_generative_sheet/node_modules/canvas/lib/bindings.js:3:18) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) { code: 'ERR_DLOPEN_FAILED' }

jalagar commented 1 year ago

Hmm there aren't usually issues with a M1 mac, were you able to google the error?

gabmacinas commented 1 year ago

Hmm there aren't usually issues with a M1 mac, were you able to google the error?

I'm able to find this issue if your brew is using intel, you can check using the activity monitor and if the app 'rust' is in Rosetta then reinstalling could be your solution. Link to StackOverflow setting up Homebrew on Mac Silicon