madewokherd/wine-mono

make dev results in "System.DllNotFoundException: libgdiplus.so.0"

voltagex opened this issue · 4 comments

Compiling 7350e30 on a new Alpine VM.

alpine:~/src/wine-mono$  make dev WINE=wine64
PATH="/home/voltagex/src/wine-mono/build/mono-unix-install/bin:$PATH" LD_LIBRARY_PATH="/home/voltagex/src/wine-mono/build/mono-unix-install/lib:$LD_LIBRARY_PATH" MONO_GAC_PREFIX="/home/voltagex/src/wine-mono/build/mono-unix-install" MONO_CFG_DIR="/home/voltagex/src/wine-mono/build/mono-unix-install/etc" make -C wpf/src/Microsoft.DotNet.Wpf/src/PresentationUI MONO_PREFIX=/home/voltagex/src/wine-mono/build/mono-unix-install RESX2SRID=/home/voltagex/src/wine-mono/build/resx2srid.exe WINE_MONO_SRCDIR=/home/voltagex/src/wine-mono
make[1]: Entering directory '/home/voltagex/src/wine-mono/wpf/src/Microsoft.DotNet.Wpf/src/PresentationUI'
resgen -useSourcePath Resources/Documents.resx Resources/Documents.resources
Error: Exception has been thrown by the target of an invocation.
Inner exception: The type initializer for 'System.Drawing.GDIPlus' threw an exception.

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.so.0 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x000b0] in <d71f193776ed49f0a37d1f3263b4b558>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at System.Drawing.Image.Dispose (System.Boolean disposing) [0x00000] in <d71f193776ed49f0a37d1f3263b4b558>:0
  at System.Drawing.Image.Finalize () [0x00000] in <d71f193776ed49f0a37d1f3263b4b558>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.so.0 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x000b0] in <d71f193776ed49f0a37d1f3263b4b558>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at System.Drawing.Image.Dispose (System.Boolean disposing) [0x00000] in <d71f193776ed49f0a37d1f3263b4b558>:0
  at System.Drawing.Image.Finalize () [0x00000] in <d71f193776ed49f0a37d1f3263b4b558>:0
make[1]: *** [Makefile:30: Resources/Documents.resources] Error 255
make[1]: Leaving directory '/home/voltagex/src/wine-mono/wpf/src/Microsoft.DotNet.Wpf/src/PresentationUI'
make: *** [wpf.make:146: wpf/src/Microsoft.DotNet.Wpf/src/PresentationUI/.built] Error 2

I am cautiously logging this issue - I thought gdi would be built as part of this, but I will also try building it from https://github.com/mono/libgdiplus

Yep. installing libgdiplus fixes that error, but I don't think this is actually buildable on Alpine (musl-based) as there's a compile step that calls into a dynamically linked llvm (?) which crashes with gcompat installed.

See https://github.com/madewokherd/wine-mono/blob/develop/user-config.make.example

llvm-mingw binaries are currently downloaded from https://github.com/mstorsjo/llvm-mingw/releases/tag/20210423, but you can supply your own version and a make configuration if it helps.

I might be missing something here, where is the current download URL set?

Uh, if you were going to use something different, generally you'd build or install it separately and specify the path to it https://github.com/madewokherd/wine-mono/blob/develop/user-config.make.example#L10