On Nov 27, 2008, at 04:11, Zulli, Louis P wrote:
I installed X11 2.3.2-rc2 (thanks to all who contributed), which installed new cairo libs in /usr/X11/lib. As a result, my pango in / usr/local complained, I guess since it was built against the old cairo libs.
That shouldn't be the case. The new cairo should work for things compiled against the older cairo. It's the other way around that you can get problems.
So I downloaded and tried to build pango. Compilation failed with:
In file included from pangocairo-atsui.h:27, from pangocairo-fontmap.c:29: /usr/X11/include/cairo/cairo-quartz.h:78:3: error: #error Cairo was not compiled with support for the quartz backend
Yeah, this is your problem... You're trying to build a Quartz Pango which needs a Quartz Cairo. This is an X11 Cairo and you would need to build an X11 Pango. If you want a Quartz Pango, you need to build your own Quartz Cairo... otherwise disable quartz support when you configure pango.
So my question is: Is there a reason that cairo was built in the way it was? I just downloaded cairo 1.8.4 and configured with --PREFIX=/ usr/X11. Support for quartz backend was included automatically. I then built pango and all seems well.
Yes, it's built that way because that's how it's been built since it was included in X11. Additionally, this is X11. That's why it's using the X11 backend.
Just out of curiosity, why is cairo included with the X11 package?
Because it's the main 2D graphics library for X11 used by things like GTK and other such toolkits. The fact that it now marginally works for Quartz is because of effort people have put in to port GTK and related dependencies to Quartz... not the other way around.
I used to have my own in /usr/local but having two sets of libcairos was a source of trouble.
1) If you want to use your Quartz libcairo, then just make sure X11 isn't in your path. This will cause problems right down the source tree from cairo to pango to gtk to whatever... it's not unique to cairo. 2) You can work around this by forcing your PKG_CONFIG_PATH to have / usr/local/... to be first.