Dependency on cairo and xcb-shm
johnmarkos opened this issue · 2 comments
I attempted to install brain using npm install
, and I got the following error.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
So, I attempted to install cairo, but there also appears to be a dependency upon xcb-shm. I think this may be cairo's dependency. In my case, on a Mac, I attempted to install cairo using homebrew.
At any rate, perhaps the installation instructions could be expanded to include cairo installation, since it's non-obvious? I'll be happy to send a PR if I get it working, but if somebody has already done this successfully, I'd really appreciate some pointers.
After installing cairo on a Mac with brew install
, I was able to get npm install
to work with brain.js by setting
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
as described here.
Cairo seems to only be used for the cross validation test. You don't need cairo outside running the tests. If you run npm install --production
it will skip the dev dependencies.