libgdiplus icon indicating copy to clipboard operation
libgdiplus copied to clipboard

libgdiplus bundled with official mono release is missing X11 support on Mac

Open QianNangong opened this issue 4 years ago • 1 comments

GdipCreateFromXDrawable_linux is only available when both cario and libgdiplus are built with X11 support, however it is not included in the latest package.

keqing@cute Debug % DYLD_LIBRARY_PATH=/usr/X11/lib MONO_MWF_MAC_FORCE_X11=1 mono pq.exe
Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme

Unhandled Exception:
System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (System.IntPtr drawable, System.IntPtr display) [0x00000] in <398ba7f369174c94887f7efecb847cb2>:0 
  at System.Drawing.Graphics.FromHwnd (System.IntPtr hwnd) [0x000ef] in <398ba7f369174c94887f7efecb847cb2>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00010] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.Form..ctor () [0x0001e] in <0c88fb805ea044c89bd73615d815986d>:0 
  at pq.MainForm..ctor () [0x00000] in <b521501ff8b44fcd927157eff10ce06a>:0 
  at (wrapper remoting-invoke-with-check) pq.MainForm..ctor()
  at pq.MainClass.Main (System.String[] args) [0x00001] in <b521501ff8b44fcd927157eff10ce06a>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (System.IntPtr drawable, System.IntPtr display) [0x00000] in <398ba7f369174c94887f7efecb847cb2>:0 
  at System.Drawing.Graphics.FromHwnd (System.IntPtr hwnd) [0x000ef] in <398ba7f369174c94887f7efecb847cb2>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00010] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <0c88fb805ea044c89bd73615d815986d>:0 
  at System.Windows.Forms.Form..ctor () [0x0001e] in <0c88fb805ea044c89bd73615d815986d>:0 
  at pq.MainForm..ctor () [0x00000] in <b521501ff8b44fcd927157eff10ce06a>:0 
  at (wrapper remoting-invoke-with-check) pq.MainForm..ctor()
  at pq.MainClass.Main (System.String[] args) [0x00001] in <b521501ff8b44fcd927157eff10ce06a>:0 

QianNangong avatar Oct 08 '21 02:10 QianNangong

That is intentional. Apple no longer supports the X11 server and the libraries shipped with it are notoriously outdated. Most importantly it gets problematic because it ships its own version of Cairo that collides with any newer version installed by Homebrew.

filipnavara avatar Oct 08 '21 05:10 filipnavara