I built the current version from SVN and tried some (fairly simple) things on my system, and it worked for me as well.
I'm using Cairo 1.4.12.
One thing you may want to double-check is that your cairo libs were built with support for these formats. Check cairo-features.h (probably in /usr/include/cairo/) and look for lines like:
Same if I use GRASS_CAIROFILE=map.ps and d.mon start=cairo.
With format=png or GRASS_CAIROFILE=map.png I get a nice png file just as expected.
On 07/02/08 22:25, Lars Ahlzen wrote:
>
> One thing you may want to double-check is that your cairo libs were
> built with support for these formats. Check cairo-features.h (probably
> in /usr/include/cairo/) and look for lines like:
>
> #define CAIRO_HAS_SVG_SURFACE 1
> #define CAIRO_HAS_PDF_SURFACE 1
> #define CAIRO_HAS_PS_SURFACE 1
these are all set to 1
>
> There are checks in lib/cairodriver/Graph.c for this. You should get an
> error message if cairo lacks support for a specific format, though.
Same if I use GRASS_CAIROFILE=map.ps and d.mon start=cairo.
With format=png or GRASS_CAIROFILE=map.png I get a nice png file just as expected.
On 07/02/08 22:25, Lars Ahlzen wrote:
>
> One thing you may want to double-check is that your cairo libs were
> built with support for these formats. Check cairo-features.h (probably
> in /usr/include/cairo/) and look for lines like:
>
> #define CAIRO_HAS_SVG_SURFACE 1
> #define CAIRO_HAS_PDF_SURFACE 1
> #define CAIRO_HAS_PS_SURFACE 1
these are all set to 1
>
> There are checks in lib/cairodriver/Graph.c for this. You should get an
> error message if cairo lacks support for a specific format, though.
I can see no error message.
Any hints ?
It was as simple as compiling libcairo2 1.4.14...
Now it works !
>>> I just build grass --with-cairo, but when I try to create
>>>> postscript, pdf or svg output, I only get empty files.
>>>
>>> I'm on debian etch using the libcairo2 & libcairo2-dev 1.2.4-4
>>> packages.
>>>
>>> Is this a problem with my cairo implementation or is it a problem
>>> in the cairo driver ?
Yep, that's the same problem as Debian stable does not have 1.4.14, yet, not even in backports. But it's not a big issue to compile it, as it does not have any fancy build-deps and so it's enough to get the cairo source package (http://packages.debian.org/source/testing/cairo), apply the patches and run dpkg-buildpackage.