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

Update has_lib.js to support Apple M1 with homebrew #1872

Merged
merged 2 commits into from
Jul 30, 2021

Conversation

rwtombaugh
Copy link
Contributor

@rwtombaugh rwtombaugh commented Jul 30, 2021

Stated instructions for compiling on OS X include using homebrew: brew install pkg-config cairo pango libpng jpeg giflib librsvg

However on Apple M1 silicon, the compile via binding.gyp will fail to locate the above library packages. This is because on M1, homebrew places all installed libraries at /opt/homebrew/lib, unlike on Intel silicon, where it would place them under /usr/local/lib.

The simple remedy is to add /opt/homebrew/lib to the SYSTEM_PATHS of has_lib.js

Fixes: #1782

  • Have you updated CHANGELOG.md?

Support from Mac M1 homebrew install of `pkg-config cairo pango libpng jpeg giflib librsvg`, which installs libraries under `/opt/homebrew/` instead `/usr/local/`
@LinusU LinusU merged commit e48cc30 into Automattic:master Jul 30, 2021
@LinusU
Copy link
Collaborator

LinusU commented Jul 30, 2021

Awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: node-canvas was built without JPEG support
2 participants