Skip to content

mapcairo.c: allow build with librsvg < 2.46#7462

Open
ness31 wants to merge 2 commits into
MapServer:mainfrom
ness31:librsvg
Open

mapcairo.c: allow build with librsvg < 2.46#7462
ness31 wants to merge 2 commits into
MapServer:mainfrom
ness31:librsvg

Conversation

@ness31

@ness31 ness31 commented Mar 24, 2026

Copy link
Copy Markdown

Allow building with librsvg < 2.46 (restoring branch 8.4 behavior)

@jmckenna

Copy link
Copy Markdown
Member

thanks @ness31 Can you rebase this against main branch? (we can then backport it to branch-8-6)

@ness31 ness31 changed the base branch from branch-8-6 to main March 24, 2026 16:15
@ness31

ness31 commented Mar 24, 2026

Copy link
Copy Markdown
Author

@jmckenna done thank you

@jmckenna

Copy link
Copy Markdown
Member

@ness31 I pushed a minor styling change into your PR here (to hopefully fix a failing automated test, regarding linting)

@geographika

Copy link
Copy Markdown
Member

@ness31 - what is the rationale behind supporting librsvg < 2.46? Is it tied to a Debian stable version? Looking at the release tags the last 2.45 release was in 2019.

@ness31

ness31 commented Mar 24, 2026

Copy link
Copy Markdown
Author

@geographika I'm building on Almalinux 8 embedding librsvg2-devel-2.42.7 package; otherwise I'll have to compile librsvg from source

@ltclm

ltclm commented Mar 24, 2026

Copy link
Copy Markdown

Thank you @jmckenna
We've tested this PR by applying the patch and rebuilding MapServer 8.6 using the camptocamp/mapserver base image, but unfortunately the SVG scaling issue from #7430 still persists.

Our test environment:

Base image: camptocamp/mapserver:8.6-gdal3.12
MapServer version: 8.6.0
librsvg version: 2.58.0 (Ubuntu 24.04)

The issue remains because librsvg 2.58.0 is >= 2.46, so the code still uses the rsvg_handle_render_document() path which has the viewport sizing problem with some SVG symbols.

See #7430 for our test case with SVG samples and screenshots. We're currently using an LD_PRELOAD shim to redirect to the legacy rsvg_handle_render_cairo() API as a workaround.

@johanez

johanez commented Apr 1, 2026

Copy link
Copy Markdown

We also face this. For now reverting to 8.4 (We're also using camptocamp images).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport branch-8-6 To backport a pull request to branch-8-6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants