Compatibility Issue Report: cairo-fdr Library Naming Change in Cairo 1.18

zengjianqi163@163.co zengjianqi163 at 163.com
Tue Jul 8 02:33:48 UTC 2025


Hi cairo,

During compatibility analysis of the upgrade from Cairo 1.16 to 1.18, I identified an issue: the library cairo-fdr.so has been renamed to libcairo-fdr.so.
This change stems from the build system migration from Autotools to Meson (starting in 1.17), where util/cairo-fdr/Makefile.am was replaced by meson.build.

In Meson, the library() function generates libcairo-fdr.so without the original linker flags (-module -no-undefined -avoid-version), 
which previously ensured the output lacked the lib prefix and versioning while prohibiting undefined symbols.
Consequently, applications using dlopen("cairo-fdr.so") will fail after upgrading to Cairo 1.18 due to the missing library name.

If this change is intentional, please disregard this report. Otherwise, I propose three solutions:

Solution 1: Add a symbolic link
Approach: Create cairo-fdr.so → libcairo-fdr.so
Pros: Preserves current Meson logic.
Cons: Retains non-original library generation; potential hidden risks.
Patch: 0001-Meson-provide-the-missing-library-cairo-fdr.so.patch

Solution 2: Recompile with original flags
Approach: Compile fdr.c separately with -module -no-undefined to generate cairo-fdr.so.
Pros: Matches original behavior.
Cons: Slight increase in build time (recompilation).
Patch: 0002-Meson-provide-the-missing-library-cairo-fdr.so.patch

Solution 3: Modify Meson to omit lib prefix
Approach: Adjust Meson to output cairo-fdr.so directly.
Pros: Restores pre-1.18 compatibility.
Cons: Breaks future upgrades (applications may expect libcairo-fdr.so).
Patch: 0003-Meson-provide-the-missing-library-cairo-fdr.so.patch

Attached patches demonstrate each approach. I welcome further discussion or feedback.


Best regards,
zengjianqi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Meson-provide-the-missing-library-cairo-fdr.so.patch
Type: application/octet-stream
Size: 1146 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20250708/247e4758/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Meson-provide-the-missing-library-cairo-fdr.so.patch
Type: application/octet-stream
Size: 1600 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20250708/247e4758/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Meson-provide-the-missing-library-cairo-fdr.so.patch
Type: application/octet-stream
Size: 1363 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20250708/247e4758/attachment-0002.obj>


More information about the cairo mailing list