Automattic / Automattic/node-canvas

Linking error to freetype on Mac OS X High Sierra

Open
#1,013 2 comments 0 reactions 0 assignees View on GitHub
Installation help
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

## Issue or Feature

After upgrading to Mac OS X High Sierra, I experienced difficulties in getting our web server that uses canvas to work. Specifically, when launching the server it crashes with the error:

```
canvas.node, 1): Symbol not found: _FT_Done_Face
```

The canvas version is ```1.6.7```

## Quick-fix
We managed to fix the problem by adding the line ```'-lfreetype'``` to ```bindings.gyp```, so that the relevant portion of that file looks like this:
```
, 4611, 4714, 4512]
}
}
}
}
}, { # 'OS!="win"'
'libraries': [
'
* Upgrade Mac OS X to High Sierra
* Upgrade XCode
* Reinstall brew
* Reinstall all brew packages
* Make sure Cairo and Freetype are installed using brew
* Require node-canvas from the source code of a node project
* npm install

To fix it, edit the file as explained above (adding ```-lfreetype```), call ```node-gyp rebuild``` from the ```node_modules/canvas``` subdirectory. Launch the web server and it should not crash.

So in short, you need to make sure that we link to freetype.

## Your Environment
* node-canvas: 1.6.7
* Using brew to install Cairo and freetype
* Node version: v6.2.2
* Mac OS X High Sierra (10.13 (17A365))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.