-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Cairo pkgconfig requires xcb-shm package which is not installed #14123
Comments
My bad. They're in |
Does this break any software? |
Not that I know of. I was writing a new formula, so I was getting this error and not understanding what's going on. Then I figured out that xcb-shm and other similar things have their pkg-config not on the default pkg-config search path, and that the proper way to get them included in the search path is to depends_on :x11 |
Can you see if this was fixed by by c21552a by any chance? It doesn't matter if it wasn't but just curious. |
It does break compilation of mypaint from sources (it is not on brew yet). |
If cairo is built with X support (the default), it will require this package. You can put your X11 pkgconfig directory (either /opt/X11/libpkgconfig or /usr/X11/lib/pkgconfig) on PKG_CONFIG_PATH as well so that it can find the libs. This is done automatically by Homebrew, but you'll have to do it manually if your are using cairo in your own software. You can also build it with "--without-x" if you don't need it, though e.g. gtk+ requires it. Eventually the default will be flipped to "without-x", when my deps branch lands with support for passing options to deps. |
I've tried doing this but it didn't help. But thanks for the info. At least I know the problem is outside brew's packages handling. On Wednesday, September 5, 2012 at 21:23 , Jack Nagel wrote:
|
thanks adammw!!! i coyped all /opt/X11/lib/pkgconfig/*.pc to /usr/local/lib/pkgconfig on my mac then be ok! |
I was trying to 'npm install canvas' (https://github.com/LearnBoost/node-canvas/wiki/Installation---OSX). Canvas requires cairo. The installation of canvas fails because of the package 'xcb-shm', required by 'cairo', was not found. I fixed this issue by copying the files like the above comment suggests and this fixes the issue but this isn't an elegant solution. |
Copying pkgconfig files is not a good idea. Symlinking is better but still not brilliant. I've just exported /opt/X11/lib/pkgconfig in my PKG_CONFIG_PATH in .bashrc and it seems to work fine now when manually building things. |
Much better. Thanks. |
@alaboszhang thanks for that pkgconfig tip - helped me finish "waf configure" step when installing py2cairo |
The fceux formula wants |
Just for the record, the pkg-config path for linking to Cairo things, such as for a gtk-engine for a theme, went a little like this before running ./configure
This thread popped up on Google when I got stumped on xcb-shm. Cheers. |
+1 for "This thread popped up on Google when I got stumped on xcb-shm." (I, too, was briefly baffled by an error, but this page proved useful to me and I solved the problem.) Specifically, I was trying to install the supporting software for The Haskell School of Expression with |
I know this was closed a little while ago but I ran into this issue this evening trying to install canvas via npm....
This is not a particularly elegant solution imho |
Still while installing canvas via npm manual export of |
+1 for @thealphanerd |
Thanks @thealphanerd ! |
But files from |
Same issue trying to install css-sprite which depends on canvas. This fixed it for me as well: I tried installing Cairo through Homebrew first so I presume I have 2 copies of it installed as the above comment mentions its installed by xquartz as well. Will this solution hold up in the long term or could updates break it? |
Thanks @adammw !! |
Running
PKG_CONFIG_PATH=
brew --prefix cairo/lib/pkgconfig pkg-config --cflags --print-errors cairo
produces:The text was updated successfully, but these errors were encountered: