racket
racket copied to clipboard
Regression since Racket 8.5: fonts are required to build successfully.
We are compiling Racket in a minimalist container (Void Linux x86_64 glibc), and Racket 8.4 builds fine without any true-type fonts installed.
However, since 8.5 (and also in snapshot 8.5.0.8), raco setup fails when no fonts are found:
raco setup: error: during building docs for <pkgs>/racket-doc/scribblings/guide/guide.scrbl
raco setup: draw-polygon in dc<%>: drawing context is not ok: (wrapper-object:bitmap-dc% ...)
raco setup: context...:
raco setup: .../private/arrow-higher-order.rkt:375:33: ...row-higher-order.rkt:375:33
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/pict-lib/pict/private/utils.rkt:653:9
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/pict-lib/pict/private/pict.rkt:1805:6: loop
raco setup: [repeats 1 more time]
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/pict-lib/pict/private/pict.rkt:1969:0: convert-pict/bytes
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/pict-lib/pict/private/pict.rkt:1919:0: convert-pict
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1261:4: render-content method in render-mixin
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/base-render.rkt:974:4: render-content method in render%
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1207:4: do-render-paragraph method in render-mixin
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/base-render.rkt:969:4: render-nested-flow method in render
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1775:4: render-nested-flow method in render-mixin
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1194:6: loop
raco setup: [repeats 2 more times]
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1118:4: render-part-content method in render-mixin
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1184:14: loop
raco setup: /destdir/racket-8.6/usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1118:4: render-part-content method in render-mixin
raco setup: ...
raco setup:
failed
Installing e.g. the liberation-ttf fonts fixes this problem.
If fonts are required for building, it would be good to get a better error message. Else, this may be a regression from 8.4
my understanding is racket is supposed/designed to be built without any fonts. However, I ran into the same problem when packaging 8.5 for opensuse tumbleweed. On tumbleweed, my investigation showed it had less to do with Racket itself but more to do with pango 1.50.7. Building Racket 8.4 with pango 1.50.7 had the same errors. I can't pinpoint the root cause though.
The pango changelog has an entry "layout: Try harder to survive without fonts" for 1.50.7. What was the last version of pango that you know worked?
I think it was 1.50.6. Also see this thread on Slack
In Guix we're still on Pango 1.48.10, and our builds succeed, but we do regularly see an error from Fontconfig during raco setup like this, from https://ci.guix.gnu.org/log/f4d5949a1c3jb65i53bs9xcw7zjs2dj2-racket-8.5:
raco setup: 1 making: <pkgs>/drracket/drscheme
raco setup: 1 making: <pkgs>/drracket/drscheme/private
raco setup: 1 making: <pkgs>/drracket/gui-debugger
raco setup: 5 making: <pkgs>/racket-doc/scribblings/style
raco setup: 0 making: <pkgs>/redex-examples/redex/examples/racket-machine
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
raco setup: 1 making: <pkgs>/drracket/gui-debugger/icons
raco setup: 1 making: <pkgs>/drracket/help
Could also be related to https://gitlab.gnome.org/GNOME/pango/-/issues/588 which I found as well. ;)
FWIW it fails on Void with Pango 1.50.7.