Re: [Rd] How to get R to compile with PNG support

From: Dirk Eddelbuettel <>
Date: Thu, 21 Apr 2011 09:39:49 -0500

On 21 April 2011 at 09:51, Karl-Dieter Crisman wrote:
| Thanks for your replies, Dirk and Matt.

My pleasure.  

| On Thu, Apr 21, 2011 at 7:49 AM, Dirk Eddelbuettel <> wrote:
| > Random guess: did you connect via ssh without x11 forwarding?
| 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.
| 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.

You have to understand that even though this problem may seem urgent and novel to you and the Sage team, it is actually about as old as the web and R itself. In a nutshell, we all (in the people reading r-help and r-devel sense) have been explaining to folks since the late 1990s that in order to run png() to 'just create some charts for a webserver' ... you need an X11 server because that is where the font metrics come from. Or else no png for you.

| 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.

As they say: "There is no such thing as a free lunch."

Pick an X11 server (to be able to launch the 'xvfb-run' wrapper) for font metrics, or run something else like Cairo. Neither one is real cheap. Such is life. System such as Sage become so large because having things like this around on all deployment systems implies (at least to some degree) replicating fundamental OS level features because they unfortunately have supply things missing or broken across OSs.


Dirk Eddelbuettel | |

______________________________________________ mailing list
Received on Thu 21 Apr 2011 - 14:42:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Apr 2011 - 17:00:49 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive