[cairo] Cairo error: mandatory image surface backend feature could not be enabled

Maarten Bosmans mkbosmans at gmail.com
Sun Aug 22 14:07:18 PDT 2010


2010/8/22 NICHOLAS KLINE <nkline at kent.edu>:
> Thank you for the quick replies :-)
>
>> Please check that if you run: pkg-config --modversion pixman-1
>> you get a valid output (i.e., in your case)
>> 0.18.4
>
> With pixman already installed:
> -bash-3.2$ export PKG_CONFIG_PATH=/usr/local/lib64/lib/pkgconfig
> -bash-3.2$ pkg-config --modversion pixman-1
> 0.18.4

OK, thats good.

> OK, so I tried this suggestion:
>
> Arjen Nienhuis <a.g.nienhuis at gmail.com> Sat, Aug 21, 2010 at 11:48 AM
>> My problem was that --prefix and $PKG_CONFIG_PATH did not match.
>> Try this:
>> PREFIX=/foo
>> PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh --prefix=$PREFIX
>> For both pixman and cairo
>
> The results (again, with pixman already installed):
>
> -bash-3.2$ sudo tar -xzvf cairo-1.8.10.tar.gz
> -bash-3.2$ cd cairo-1.8.10
> -bash-3.2$ export PKG_CONFIG_PATH=/usr/local/lib64/lib/pkgconfig
> -bash-3.2$ PREFIX=/foo
> -bash-3.2$ sudo PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh
> --prefix=$PREFIX

Don't setPKG_CONFIG_PATH for the second time. The first export is OK.
It isn't working because sudo sets up a new shell without the exported
PKG_CONFIG_PATH. Why are you using sudo for configure anyway? The
normal procedure is:

./configure && make && sudo make install

> [snip configure output]
>
> *sigh*
>
> Really all I want is a PHP graphics library that I can feed my RGB
> values to and have it create radial gradient images in PNG format with
> some transparency and save those images to disk. If there is an easier
> way to reach this goal, PLEASE let me know. I've already tried GD and
> imagick and neither supports radial gradients.

Cairo is the right tool for this job. But remember that its PNG output
functions are mainly for debug purposes. It does the job, but if you
want any control about specific parameters of the png file, you have
to use another library in addition to Cairo.

> Thank you,
>
> Nick

Maarten


More information about the cairo mailing list