From edd at debian.org  Thu Apr 21 16:39:49 2011
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 21 Apr 2011 09:39:49 -0500
Subject: [Rd] How to get R to compile with PNG support
In-Reply-To: <BANLkTinfcQJtotd4macXNjfmOxfekaDDEA@mail.gmail.com>
References: <BANLkTinAtiXhxhSRhEEu0aDZsZuELOQu+g@mail.gmail.com>
	<19888.6629.380047.505281@max.nulle.part>
	<BANLkTinfcQJtotd4macXNjfmOxfekaDDEA@mail.gmail.com>
Message-ID: <19888.16821.533699.499469@max.nulle.part>


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 <edd at debian.org> 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

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



[Rd] How to get R to compile with PNG support
Dirk Eddelbuettel