[racket-dev] Caching rendered icons

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jan 13 16:46:46 EST 2012

Yesterday, Neil Toronto wrote:
> On 01/12/2012 12:22 PM, Eli Barzilay wrote:
> >> Is there a way to reliably get the "compiled" directory path during
> >> expansion, and then load files from it at runtime? Can I ensure that
> >> .PNG files are distributed automatically?
> >
> > Putting other stuff in compiled directories would probably complicate
> > distributions (of both kinds), so the compile-to-bytestring is really
> > better.  (One possible thing to keep in mind is to avoid compilation
> > relying on having a display.)
> Just to double-check: ever since the big GUI rewrite, I can use 
> racket/draw without needing a display, right?

And this broke the build on three machines -- two of them are servers,
and one is a PPC machine that wasn't for anything except for the
builds in a long time.

  raco setup:  in images
  ffi-lib: couldn't open "libcairo.so.2" (libcairo.so.2: cannot open
  shared object file: No such file or directory)

One possible way out: make it fall back to the dynamic case when
there's no cairo present.  The zo files in the distribution are all
from the main machine which does have cairo installed.  (That would
further bogosify a `compiled-' prefix though.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.