Page MenuHomePhabricator

Deploy LilyPond 2.24 with Cairo support to shellbox containers
Closed, ResolvedPublic

Description

Could serviceops please update the LilyPond binary accessible to MediaWiki?

To unblock the parent task, we need either a Debian package for LilyPond 2.24 patched to include Cairo support, or a container with the upstream tarball.

LilyPond currently runs on the shellbox cluster, it doesn't have its own special cluster.

January 2026 Update

LilyPond with Cairo support has been backported to Debian bookworm-backports (oldstable-backports) as 2.24.4-2~bpo12+1, please see 2025-12-18 comment by @AnthonyFok. Many thanks!

After this is completed

  • revisit shellbox CPU usage and limits, as the new backend may change CPU usage/latency

Related Objects

Event Timeline

In the task description, @Jonathanischoice wrote:

We need either option 1 or 3 from this comment on T49578 to be done to enable SVG output for the Score extension. Option 2 (backport Lilypond 2.24 to Buster) is no longer tenable since Buster is now in ELTS per comment from PuckNZ.

I strongly recommend option 3 (use upstream release tarball) which can be done easily on an existing Buster shellbox, without having to build Lilypond or a new Bookworm shellbox (although, this option will also work on a rebuilt Bookworm or Trixie shellbox). Upstream Lilypond now do compiled tarball releases, and installation is described in the Score extension README. This involves downloading and extracting the (presumably x86_64) tarball from the upstream 2.24.4 release page into /usr/local/lilypond (or wherever makes sense) and symlinking Lilypond's binaries into /usr/local/bin and/or configuring the two Score extension variables $wgScoreLilyPond and $wgScoreAbc2Ly to point to the binaries as appropriate.

I do not recommend option 1 (rebuild the Lilypond shellbox with Bookworm and use the Debian packages) because the Bookworm Debian packages of Lilypond 2.24 are still broken (missing libcairo build flag). Using these packages with the Score extension configured for SVG output results in an error caused by Lilypond exiting with:
fatal error: compiled without CAIRO_BACKEND
Fixed Lilypond 2.24 packages for Bookworm might possibly appear in backports one day, but I really don't think we should wait around for who knows how long, given the total lack of communication on the relevant Debian bug from the package maintainer.

I removed this text because it's really up to the implementer to decide what is easiest. I know serviceops have a lot of experience and tooling to apply patches to Debian packages and to keep those packages up to date after the patch has been applied. For the purposes of the parent task, we don't need it to be easy, we just need it to be done.

@Jonathanischoice, is it a hard requirement to use 2.24 or is 2.25 also acceptable?

Well 2.24 is the current stable releases, and 2.25 is the dev stream. I'm not sure if it's a good idea to use 2.25 until there's at least an RC, or a 2.26 stable release? Sorry, I'm not familiar enough with what the 2.25 new features are, or breaking changes (if any).

Well 2.24 is the current stable releases, and 2.25 is the dev stream. I'm not sure if it's a good idea to use 2.25 until there's at least an RC, or a 2.26 stable release? Sorry, I'm not familiar enough with what the 2.25 new features are, or breaking changes (if any).

Right, sorry, I forgot that they were using odd/even version numbers.

Matrix raised the priority of this task from Low to Medium.Jun 17 2025, 11:07 AM
Matrix subscribed.

Changing to medium; likely T371176 and making Score more usable in dark mode depend on this task.

Thank you - improving PDF output on T181322 also depends on this.

What is the status of using Lilypond 2.24 on Debian Bookworm? I upgraded my system and now MW with Score based on Lylpond doesnt work. I cant use a shellbox and dont know how to solve this. Any Ideas? Thx

@TasteOfIT: Please see T401184#11060340 and bring this up in a support forum as our issue tracker is not meant for support requests for third-party installations ("I cant use a shellbox and dont know how to solve this."). Thanks for your understanding.

@akosiaris Do you have any suggestions for getting this task un-stuck?

@akosiaris Do you have any suggestions for getting this task un-stuck?

It needs to be scheduled by the team. I 'll bring it to the attention of their manager.

What is the status of using Lilypond 2.24 on Debian Bookworm? I upgraded my system and now MW with Score based on Lylpond doesnt work. I cant use a shellbox and dont know how to solve this. Any Ideas? Thx

For the non-WMF use case this can be solved by moving to Debian Trixie: https://tracker.debian.org/news/1550057/accepted-lilypond-2244-1-source-into-unstable/ enabled it in Debian unstable in July 2024, so this the Cairo backend is enabled in the Lilypond releasse in Debian Trixie.

The Debian LilyPond package with the Cairo backend enabled was finally backported to Debian 12 bookworm-backports (the current oldstable-backports) as "lilypond 2.24.4-2~bpo12+1" as of 2025-12-12, see:

My sincere apology for the extended delay for this backport due to personal reasons that had kept me away from Debian tasks for over a year.

I hope that allows the LilyPond Cairo backend to be deployed to the WMF shellbox container, which I guess is currently on Debian 12 Bookworm?
Please let me know how it goes.

Many thanks!

AnthonyFok renamed this task from Deploy Lilypond 2.24 with cairo support to shellbox containers to Deploy LilyPond 2.24 with Cairo support to shellbox containers.Jan 9 2026, 9:00 AM
AnthonyFok assigned this task to akosiaris.
AnthonyFok updated the task description. (Show Details)
AnthonyFok updated Other Assignee, added: tstarling.

Thanks for you work on backporting LilyPond to bookworm-backports, this is useful information.

which I guess is currently on Debian 12 Bookworm?

No, it's still on bullseye.

I am unassigning myself, as I won't be actively working on this task, just merely passing the information along.

MLechvien-WMF moved this task from Inbox to Backlog on the ServiceOps board.
MLechvien-WMF subscribed.

We don't have capacity this quarter, we will reassess as part of the general Debian upgrades of next quarter

With T427820 done, we are currently running LilyPond 2.24.1. However, it appears that it is not compiled with the cairo backend: after installing libcairo2-dev, I'm getting:

root@096462156d83:/srv/app# lilypond -dbackend=cairo input.ly 
GNU LilyPond 2.24.1 (running Guile 2.2)
Processing `input.ly'
Parsing...
Interpreting music...[8]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 or 2 pages...
Drawing systems...
fatal error: compiled without CAIRO_BACKEND

So we need to either rebuild the package with Cairo or backport 2.25 (which comes with Cairo by default).

With T427820 done, we are currently running LilyPond 2.24.1. However, it appears that it is not compiled with the cairo backend

Yes, see T49578#12000440; 2.24.4+ is needed, apparently.

The Debian LilyPond package with the Cairo backend enabled was finally backported to Debian 12 bookworm-backports (the current oldstable-backports) as "lilypond 2.24.4-2~bpo12+1" as of 2025-12-12, see:

Did you mean that Cairo is enabled by default? It looks like it's default off in https://salsa.debian.org/debian/lilypond/-/blob/debian/bookworm-backports/configure . So we'd need to rebuild it with that on.

I hope that allows the LilyPond Cairo backend to be deployed to the WMF shellbox container, which I guess is currently on Debian 12 Bookworm?

It is bookworm now :-)

We're so close! The LilyPond maintainer stated in T49578 that libcairo is enabled in the 2.24.4 in bookworm-backports, it would be easy to install that version and try it and see; it worked when I tried it some months ago, but I'm not currently near a terminal to confirm, sorry.

Indeed, I believe we could just install the backports version, which seems to be quite easy: https://gerrit.wikimedia.org/r/c/mediawiki/libs/Shellbox/+/707416 (thanks @Scott_French!)

I'll see if I can find some spare cycles to test it, it really should be a quick win at this point.

(I'm currently quite busy with T418200 and other Bookworm upgrades, but hopefully latest after that.)

Hilariously, the new stable 2.26.0 was released in April, but let's not allow that to distract us from the goal! The 2.24 series satisfies T49578 just fine for now.

Change #1304606 had a related patch set uploaded (by Kamila Součková; author: Kamila Součková):

[mediawiki/libs/Shellbox@master] Rebuild score image with lilypond 2.24 (has cairo)

https://gerrit.wikimedia.org/r/1304606

After rebuilding with the backports packages, this seems to be working \o/

root@4fb2739cea58:/srv/app# lilypond -dbackend=cairo /usr/share/lilypond/2.24.4/ly/Welcome_to_LilyPond.ly
GNU LilyPond 2.24.4 (running Guile 2.2)
Processing `/usr/share/lilypond/2.24.4/ly/Welcome_to_LilyPond.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `Welcome_to_LilyPond.pdf'...
Success: compilation successfully completed

Change #1304606 merged by jenkins-bot:

[mediawiki/libs/Shellbox@master] Rebuild score image with lilypond 2.24 (has cairo)

https://gerrit.wikimedia.org/r/1304606

Change #1305432 had a related patch set uploaded (by Kamila Součková; author: Kamila Součková):

[operations/deployment-charts@master] shellbox: pick up new images

https://gerrit.wikimedia.org/r/1305432

Change #1305432 merged by jenkins-bot:

[operations/deployment-charts@master] shellbox: pick up new images

https://gerrit.wikimedia.org/r/1305432

Change #1305457 had a related patch set uploaded (by Kamila Součková; author: Kamila Součková):

[operations/deployment-charts@master] admin: increase shellbox CPU limit quota

https://gerrit.wikimedia.org/r/1305457

Change #1305457 merged by jenkins-bot:

[operations/deployment-charts@master] admin: increase shellbox CPU limit quota

https://gerrit.wikimedia.org/r/1305457

This has been deployed, so calling it resolved :-) Feel free to reopen in case something isn't working.

Raine claimed this task.

After the update, shellbox is getting throttled a bit more than before, but I don't think it justifies further bumping the already generous limits. The latency is not crazy.