FS#67726 - [gtk-sharp-2] Assembly map is incorrect

Attached to Project: Arch Linux
Opened by Greg Toombs (reinderien) - Wednesday, 26 August 2020, 15:43 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 15:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

gtk-sharp-2 2.12.45-2 is incompatible with the version of /etc/mono/config installed from extra/mono 6.10.0.104-1.

Any applications that depend on this package will throw the following stack trace:

System.DllNotFoundException
libglib-2.0-0.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) GLib.Marshaller.g_utf16_to_utf8(char*,intptr,intptr,intptr,intptr&)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00028] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
at GLib.Global.set_ProgramName (System.String value) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
at Gtk.Application.SetPrgname () [0x0000c] in <e2cf54bd50544b3dbf94649395d8c893>:0
at Gtk.Application.Init () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0

The solution is to add the following lines to /etc/mono/config (pairs are shown with old line first, new line second):

<dllmap dll="libgdk-x11-2.0" target="libgdk-x11-2.0.so.0" os="!windows"/>
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0" os="!windows"/>

<dllmap dll="libgtk-x11-2.0" target="libgtk-x11-2.0.so.0" os="!windows"/>
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" os="!windows"/>

<dllmap dll="libglib-2.0" target="libglib-2.0.so.0" os="!windows"/>
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0" os="!windows"/>

<dllmap dll="libgobject-2.0" target="libgobject-2.0.so.0" os="!windows"/>
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0" os="!windows"/>
This task depends upon

Closed by  freswa (frederik)
Sunday, 13 September 2020, 15:44 GMT
Reason for closing:  Not a bug
Comment by Greg Toombs (reinderien) - Wednesday, 26 August 2020, 18:13 GMT
It is also missing

<dllmap dll="libgdk_pixbuf-2.0" target="libgdk_pixbuf-2.0.so.0" os="!windows"/>
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0" os="!windows"/>
Comment by Greg Toombs (reinderien) - Thursday, 27 August 2020, 02:34 GMT
I think I know what happened here. I had been using a private copy of Mono.GtkSharp version 2.12.0.1 from NuGet, and it's the binaries from this package that relied on the alternately-named GTK DLLs.

It's debatable whether it's worth explicitly accommodating Mono.GtkSharp in the default system-wide configuration (even if it is the "official" package from Mono, https://github.com/netonjm/GtkSharp.NuGet).

Loading...