Skip to content
Prev 39902 / 63421 Next

How to get R to compile with PNG support

Thanks for your replies, Dirk and Matt.
On Thu, Apr 21, 2011 at 7:49 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
Almost certainly, yes.  (I am an interlocutor right now for someone
who is actually doing this, my apologies.)
But it's a machine we just ssh into, I'm pretty sure, though it does
serve up web pages.
That is quite likely.  So it sounds like for png() to be set to use
the X11 device, there has to (somewhere) be a visual output -
presumably that is the part LOGICAL(ans)[i++] = X11; in Matt's answer.
Yeah, and I saw your SO answer on this (after the fact) as well.

In some sense, we are just trying to get graphics on one machine.
Note that we have installed the cairo devel package on this very
machine, but it's not being picked up - maybe it's looking in the
wrong place?  That is one of the reasons this is confusing.

But in a larger sense, because of Sage's "batteries included"
philosophy (which we know not everyone agrees with!), we would like to
have a one-shot way so that *everyone* will see R graphics, not just
people whose binary happens to have been compiled on a machine that
has X and a display.  If that means adding 22.5 MB to our tarball for
Cairo... maybe, maybe not.

I won't copy Matt's message here, but I appreciate the pointers to
exactly where these things are defined very much - without knowing
where to look, it would be a long slog.   Hopefully we'll have some
success!  Thanks for the replies, and for any other ideas.

Karl-Dieter