X11 needed
Opened this issue · 18 comments
I'm unable to generate graphics, because X11 isn't available on Heroku. Have you run into this problem? I get "Error in png(file=t) : X11 is not available" with the following code:
t <- tempfile()
png(file=t)
png(t,type="cairo",width=200,height=200)
I actually haven't tried to do any graphing with it, but let me try some things out.
PDF work fine, but no luck for PNG and SVG. I'm not sure about others.
Don't call png twice. Just once like so:
pnt(file=t,type='cairo',...)
Well I still get the same error but with the second call only:
Error in png(t, type = "cairo", width = 200, height = 200) : X11 is not available
What does the output of capabilities() say?
On Tue, Nov 15, 2011 at 2:14 PM, Joseph Ridgway
reply@reply.github.com
wrote:
Well I still get the same error but with the second call only:
Error in png(t, type = "cairo", width = 200, height = 200) : X11 is not available
Reply to this email directly or view it on GitHub:
#1 (comment)
capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Is that too hard to read? :) Looks like all graphics are false.
There you go: no png, no cairo capabilities() so you won't be able to
create graphics.
On Tue, Nov 15, 2011 at 2:18 PM, Joseph Ridgway
reply@reply.github.com
wrote:
capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Reply to this email directly or view it on GitHub:
#1 (comment)
Do you have any idea how I can install cairo, png etc?
Oh, if you can install R from source, then you can install cairo and
png. I'm not familiar with the Heroku platform, so you got me there.
The configure flags for R are --with-cairo and --with-libpng.
On Tue, Nov 15, 2011 at 2:22 PM, Joseph Ridgway
reply@reply.github.com
wrote:
Do you have any idea how I can install cairo, png etc?
Reply to this email directly or view it on GitHub:
#1 (comment)
Heroku already has libcairo installed, so it should just be a matter of the right config flags as Jeff said. You can look at https://github.com/noahhl/rookonheroku/blob/master/bin/installR.sh and try adjusting accordingly and building from a heroku run bash
session. I'll try to get it to work later and update the build script accordingly.
I figured that was the next step. Thanks!
Thanks guys!
I've finally recompiled with the --with-cairo and --with-libpng flags but capabilities() still returns false for cairo:
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE
Any idea what I should try next?
Noah, what makes you think Heroku has Cairo installed already? All I can find is /usr/lib/libcairo.so.2 and /usr/lib/libcairo.so.2.10800.10. Also, while compiling R, I get:
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... no
I got this working after a lot of trial and error - I installed cairo, which also entailed fontconfig and pixman. It was a while back, so I don't remember each and every step, but here are the rough steps I jotted down (run from Heroku):
export PKG_CONFIG_PATH=/app/bin/lib/pkgconfig
export LDFLAGS=/app/bin/lib
fontconfig
curl fontconfig
./configure --prefix=/app/bin
make
make install
pixman
curl pixman
./configure --prefix=/app/bin
make
make install
cairo
curl cairo
./configure --prefix=/app/bin
make
make install
configure cairo
./configure --prefix=/app/bin
make
make install -i
I'm looking to get PNG, Cairo etc. working on Heroku with R... trying to get my mind wrapped around custom buildpacks... so the installation of fontconfig, pixmand, cairo etc. you included as part of your vulcan build?
I have the same problem, "so the installation of fontconfig, pixmand, cairo etc. you included as part of your vulcan build?" I don't understand how to do that.