gentoo / dotnet

[MIRROR] Newer mono, .NET languages, and libraries
https://gitweb.gentoo.org/repo/proj/dotnet.git
78 stars 56 forks source link

libgdiplus.so.0 is not found #429

Closed EinstokFair closed 5 years ago

EinstokFair commented 5 years ago

After updating from mono-5.12 to mono 5.20, my Windows.Forms application stopped working. When I launch it, it doen't start, and prints into console the following:


Name (current) = ru-RU
Name (thread) = ru-RU
LCID = 1049
exception inside UnhandledException handler: (null) assembly:/usr/lib64/mono/4.5/mscorlib.dll type:TypeInitializationException member:(null)

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.so.0
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x000b0] in /var/tmp/portage/dev-lang/mono-5.20.1.19/work/mono-5.20.1.19-abi_x86_64.amd64/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs:134 

The file is present on disk:


# time find / -iname "libgdiplus.so*"
/usr/lib64/libgdiplus.so
/usr/lib64/debug/usr/lib64/libgdiplus.so.0.0.0.debug
/usr/lib64/libgdiplus.so.0
/usr/lib64/libgdiplus.so.0.0.0

real 8m53,934s
user 0m15,843s
sys 0m36,169s 

It comes from


$ qfile /usr/lib64/libgdiplus.so.0.0.0
dev-dotnet/libgdiplus (/usr/lib64/libgdiplus.so.0.0.0) 

I suppose, that this file is used by System.Drawing.dll (from stack trace details): There is only one such file in the system:


/usr/lib64/mono # readlink ./4.5/System.Drawing.dll
../gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 

I tried to use ld to check which path is tested, but failed:


/usr/lib64/mono/gac $ sudo ld ./System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
ld: i386 architecture of input file `./System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll' is incompatible with i386:x86-64 output
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400084 

I don't know what to check next

see also https://github.com/mono/mono/issues/14030 https://bugs.gentoo.org/682068 https://bugs.gentoo.org/682198 https://stackoverflow.com/questions/22596498/mono-and-libgdiplus-libgdi-not-found

EinstokFair commented 5 years ago

fixed with https://github.com/gentoo/dotnet/commit/cc646e0926e99d5bd0001900ac2fc5560113e2b5

cnd commented 5 years ago

ported to tree

https://github.com/gentoo/gentoo/commit/2e6dcecf9eeb485334b8e4ad517a3a39dd87393d https://github.com/gentoo/gentoo/commit/29a833b1febc0e0e6850c0b2c321e666fc647783

thank you for report & test

leio commented 5 years ago

ported to tree

That was reverted due to some deptree breakage.

leio commented 5 years ago

I don't agree with it having been handled that way (arm64 keywords should have been dropped instead), BUT I also do not see a re-keywording bug for arm (let alone arm64), which must be done as even asked about in the developer quizzes.

cnd commented 5 years ago

Yes, I've mistaken with libgdiplus update, reverted keywords to old ones for now