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

Details

Description:
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: libgdiplus.so.0

(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 Schloßer (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/libgdiplus.so.0: 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 giflib.so.

readelf -Ws giflib-5.1.9-1/usr/lib/libgif.so|grep GifQuantizeBuffer|wc -l
0

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

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

which quite frankly will break more than just libgdiplus
Comment by Sebastian Schloßer (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.

Loading...