Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#62211 - giflib breaks API (f.e. libgdiplus which breaks mono apps)

Attached to Project: Arch Linux
Opened by Eric (ozwigh) - Tuesday, 02 April 2019, 03:06 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 02 April 2019, 12:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Levente Polyak (anthraxx)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


updating libgdiplus to 5.6.x breaks mono apps:

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException:

(detailed crash log attached)

Additional info:
package version(s): 5.6 - 5.6.1

Steps to reproduce:
1) update libgdiplus to 5.6.x
2) run any GUI mono app (for example - keepass), it'll crash

Rolling back libgdiplus to 4.2 temporarily mitigates the problem.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 02 April 2019, 12:37 GMT
Reason for closing:  Fixed
Comment by Sebastian Schweizer (Sebastian256) - Tuesday, 02 April 2019, 09:12 GMT
When I set MONO_LOG_LEVEL=debug then I get:
Mono: DllImport unable to load library '/usr/lib/ undefined symbol: GifQuantizeBuffer'.

The combination libgdiplus 5.6.1-1 and giflib 5.1.8-1 works for me, upgrading giflib to 5.1.9-1 breaks keepass (see also  FS#62214 , I somehow didn't find this one here and opened the duplicate - sorry)
Comment by Levente Polyak (anthraxx) - Tuesday, 02 April 2019, 09:38 GMT
giflib is to blame, they moved quantize.c out of SOURCES therefor not available in OBJECTS for creation of

readelf -Ws giflib-5.1.9-1/usr/lib/|grep GifQuantizeBuffer|wc -l

readelf -Ws giflib-5.1.8-1/usr/lib/|grep GifQuantizeBuffer
58: 00000000000097fe 2578 FUNC GLOBAL DEFAULT 11 GifQuantizeBuffer

which results in:
/usr/bin/ld: ../src/.libs/ undefined reference to `GifQuantizeBuffer'

which quite frankly will break more than just libgdiplus
Comment by Sebastian Schweizer (Sebastian256) - Tuesday, 02 April 2019, 11:52 GMT
Thanks for the quick patch, giflib 5.1.9-2 resolves the issue.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 02 April 2019, 12:37 GMT
Thanks, Levente.